> ## Documentation Index
> Fetch the complete documentation index at: https://docs.beecrawl.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Extract structured data



## OpenAPI

````yaml /docs/openapi.yaml post /extract
openapi: 3.0.3
info:
  title: BeeCrawl API
  version: 0.1.0
  description: Self-hostable web scraping, crawling, search, and extraction API.
servers:
  - url: https://api.beecrawl.dev
    description: BeeCrawl hosted deployment
  - url: http://127.0.0.1:8000
    description: Local development
security:
  - apiKey: []
tags:
  - name: Scraping
  - name: Discovery
  - name: Async jobs
  - name: Search
  - name: Extraction
paths:
  /extract:
    post:
      tags:
        - Extraction
      summary: Extract structured data
      operationId: extractData
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExtractRequest'
      responses:
        '200':
          description: Extracted data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExtractResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    ExtractRequest:
      type: object
      required:
        - url
        - schema
      properties:
        url:
          type: string
          format: uri
        schema:
          type: object
          additionalProperties:
            type: string
        timeout_seconds:
          type: integer
          default: 30
        wait_for_ms:
          type: integer
          default: 0
        use_browser:
          type: string
          enum:
            - never
            - auto
            - always
          default: auto
        provider:
          $ref: '#/components/schemas/LlmProvider'
        llm:
          $ref: '#/components/schemas/LlmProvider'
    ExtractResponse:
      type: object
      properties:
        url:
          type: string
          format: uri
        data:
          type: object
          additionalProperties:
            type: string
            nullable: true
        scrape:
          type: object
          additionalProperties: true
        metadata:
          type: object
          properties:
            provider:
              type: string
            model:
              type: string
              nullable: true
    LlmProvider:
      type: object
      properties:
        provider:
          type: string
          default: openai-compatible
        api_key:
          type: string
        base_url:
          type: string
          format: uri
        model:
          type: string
    Error:
      type: object
      additionalProperties: true
  responses:
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-Web-Extract-Api-Key
      description: API key. X-Api-Key and Bearer authentication are also accepted.

````