SDK Extract
Extract structured data
Submit one or more URLs with a prompt and optional JSON Schema.
Start extraction
curl -X POST "https://api.datablue.dev/v1/extract" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"urls":["https://example.com/product"],"prompt":"Extract the product name and price","schema_":{"type":"object","properties":{"name":{"type":"string"},"price":{"type":"number"}}}}'Example response
{
"success": true,
"job_id": "job_01HXYZ",
"status": "started",
"message": "Extraction started for 1 URLs",
"total_urls": 1
}Check the job
The SDK currently submits extraction jobs. Poll the public status route or use a webhook for completion.
curl "https://api.datablue.dev/v1/extract/job_01HXYZ" \ -H "Authorization: Bearer YOUR_API_KEY"
Example response
{
"success": true,
"job_id": "job_01HXYZ",
"status": "completed",
"total_urls": 1,
"completed_urls": 1,
"data": [
{
"url": "https://example.com/product",
"extract": {
"name": "Example",
"price": 49
}
}
]
}Options
| Python | Node.js | Use |
|---|---|---|
schema | schema | Validate structured output. Both SDKs send schema_ on the wire. |
provider | provider | Override the configured LLM provider. |
model | model | Override the provider model. |
only_main_content | onlyMainContent | Remove page boilerplate before extraction. |
webhook_url | webhookUrl | Receive completion without polling. |
webhook_secret | webhookSecret | Sign the webhook payload. |
