POST
/extract
AI-Powered Structured Extraction

Extract structured data from web pages using AI. Define your desired output structure with JSON Schema, and our AI will intelligently extract the information.

Use Cases:

  • Extract product information from e-commerce pages
  • Parse job listings into structured format
  • Extract contact information and business details
  • Convert news articles into structured data
  • Scrape pricing tables and specifications

How It Works:

  1. Provide a URL and a JSON Schema defining your desired structure
  2. Our AI analyzes the page content
  3. Extracts data matching your schema
  4. Returns validated JSON output

Schema Definition:

Use JSON Schema to define your desired output structure:

  • Field types: string, number, boolean, array, object
  • Field descriptions: Help the AI understand what to extract
  • Required fields: Mark critical fields as required
  • Nested structures: Support for complex, nested data

Example Schema:

{
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "description": "Product name or title"
    },
    "price": {
      "type": "number",
      "description": "Current price in USD"
    },
    "availability": {
      "type": "boolean",
      "description": "Whether the product is in stock"
    },
    "features": {
      "type": "array",
      "items": {"type": "string"},
      "description": "List of key product features"
    }
  },
  "required": ["title", "price"]
}

Authorization

YOUR_API_KEY
AuthorizationBearer <token>

Enter your API key from the Thunderbit Dashboard. The header format will be: Authorization: Bearer YOUR_API_KEY

In: header

Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

url*stringrequired

The URL of the web page to extract data from

Example:https://thunderbit.com/playground
schemaobject

JSON Schema. Optional — when omitted, Thunderbit auto-generates a schema from the page content.

Example:
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Product name"
    },
    "price": {
      "type": "number",
      "description": "Product price"
    },
    "currency": {
      "type": "string",
      "description": "Currency unit"
    }
  },
  "required": [
    "name",
    "price"
  ]
}
timeoutnumberdefault:60000

Request timeout in milliseconds, default 30000

Required range:5000 <= x <= 120000
Example:
60000
waitFornumberdefault:0

Time to wait (in milliseconds) after page load for dynamic content to render (default: 0, max: 10000)

Required range:0 <= x <= 10000
Example:
2000
renderModestringdefault:"none"

JavaScript rendering mode. none = no JS rendering (default); basic = standard rendering; full = extended wait for dynamic content

Value in"none" | "basic" | "full"
formatsany[]

Output formats (same shape as the Distill formats array).

Example:
[
  "markdown",
  "links",
  "images"
]

Response

application/json

Success response

successboolean
Example:
true
dataobject
Show child attributes
urlstring
Example:https://thunderbit.com/playground
dataobject[]

Extracted structured data matching your schema, returned as an array where each item is a key-value map

Example:
[
  {
    "name": "iPhone 15 Pro",
    "price": 999,
    "currency": "USD",
    "availability": true,
    "rating": 4.7,
    "features": [
      "A17 Pro chip with 6-core GPU",
      "Pro camera system with 48MP main camera",
      "Titanium design with textured matte glass"
    ]
  }
]
linksobject[]

Links extracted from the page.

Show child attributes
textstring

Visible link text.

Example:Read more
hrefstring

Resolved absolute URL.

Example:https://example.com/article
imagesobject[]

Images extracted from the page.

Show child attributes
srcstring

Image source URL.

Example:https://example.com/hero.png
altstring

Image alt text.

Example:Hero banner
widthinteger

Image width in pixels.

heightinteger

Image height in pixels.

summarystring

Page summary (LLM format).

answerstring

Answer to the question supplied in the question format.

highlightsstring[]

Highlighted passages.

metadataobject
Show child attributes
titlestring

Page title extracted from tag or Open Graph

Example:iPhone 15 Pro - Apple
descriptionstring

Meta description or excerpt

Example:The ultimate iPhone with A17 Pro chip.
languagestring

Detected language code (ISO 639-1)

Example:en
authorstring

Article author if available

Example:
null
publishedDatestring

Publication date if available

Example:
null
imagestring

Featured image URL from Open Graph or Twitter Card

Example:https://example.com/product/iphone-15-pro.jpg
sourceURLstring

Source URL

Example:https://example.com/product/iphone-15-pro
statusCodeinteger

HTTP status code

Example:
200
contentLengthinteger

Length of the markdown content in characters

Example:
5000