---
title: "AI-Powered Structured Extraction"
method: POST
path: "/extract"
tags: ["Extract"]
---

# AI-Powered Structured Extraction

`POST /extract`

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:**
```json
{
  "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"]
}
```

## Request body

- object
  - `url` string, required — The URL of the web page to extract data from
  - `schema` object, required — Data structure definition in JSON Schema format
  - `timeout` number — Request timeout in milliseconds, default 30000

## Response `200`

Success response

- object
  - `success` boolean
  - `data` object
    - `url` string
    - `extract` object — Extracted structured data matching your schema
    - `metadata` object
      - `sourceURL` string
      - `statusCode` integer
      - `extractedAt` string, date-time
      - `confidence` number — AI confidence score (0-1) for the extraction quality
      - `processingTime` integer — Time taken to process in milliseconds

---

[API](https://skmtc.dev/thunderbit/apis/thunderbit-open-api.md) · [All operations](https://skmtc.dev/thunderbit/apis/thunderbit-open-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/thunderbit/thunderbit-open-api/revisions/45aa863b3172/schema)
