Skip to main content
POST
/
v1
/
web
/
ai-extract
AI extract structured data from a web page
curl --request POST \
  --url https://api.weblinq.dev/v1/web/ai-extract \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "url": "<string>",
  "waitTime": 0,
  "responseType": "json",
  "prompt": "<string>",
  "response_format": {
    "type": "json_schema",
    "json_schema": {}
  },
  "instructions": "<string>"
}'
{
  "success": true,
  "data": {
    "extracted": {},
    "text": "<string>",
    "metadata": {
      "url": "<string>",
      "timestamp": "<string>",
      "model": "<string>",
      "responseType": "json",
      "extractionType": "prompt",
      "fieldsExtracted": 123,
      "inputTokens": 123,
      "outputTokens": 123
    }
  },
  "creditsCost": 123,
  "requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "timestamp": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Enter your API token or session token

Body

application/json

AI extract parameters

url
string<uri>
required
waitTime
integer
default:0
Required range: 0 <= x <= 5000
responseType
enum<string>
default:json
Available options:
json,
text
prompt
string
Required string length: 1 - 1000
response_format
object
instructions
string
Maximum length: 500

Response

AI extract completed successfully

success
boolean
required
data
object
required
requestId
string<uuid>
required

Unique request identifier for tracing

timestamp
string<date-time>
required

ISO timestamp when the response was generated

creditsCost
number

Credits consumed by this operation

I