Docs / Guide

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

PythonNode.jsUse
schemaschemaValidate structured output. Both SDKs send schema_ on the wire.
providerproviderOverride the configured LLM provider.
modelmodelOverride the provider model.
only_main_contentonlyMainContentRemove page boilerplate before extraction.
webhook_urlwebhookUrlReceive completion without polling.
webhook_secretwebhookSecretSign the webhook payload.