> ## 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.

# Search the web



## OpenAPI

````yaml /docs/openapi.yaml post /search
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:
  /search:
    post:
      tags:
        - Search
      summary: Search the web
      operationId: searchWeb
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchRequest'
      responses:
        '200':
          description: Search results.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    SearchRequest:
      type: object
      required:
        - query
      properties:
        query:
          type: string
        limit:
          type: integer
          minimum: 1
          default: 5
        lang:
          type: string
          default: en
        country:
          type: string
          default: us
        scrapeOptions:
          $ref: '#/components/schemas/SearchScrapeOptions'
    SearchResponse:
      type: object
      properties:
        requestId:
          type: string
        query:
          type: string
        results:
          type: array
          items:
            $ref: '#/components/schemas/SearchResult'
        metadata:
          $ref: '#/components/schemas/SearchMetadata'
    SearchScrapeOptions:
      type: object
      properties:
        formats:
          type: array
          items:
            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
    SearchResult:
      type: object
      properties:
        url:
          type: string
          format: uri
        title:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        markdown:
          type: string
          nullable: true
        metadata:
          type: object
          additionalProperties: true
        scrapeError:
          type: string
          nullable: true
    SearchMetadata:
      type: object
      properties:
        provider:
          type: string
        count:
          type: integer
        scrapedCount:
          type: integer
        elapsedMs:
          type: integer
          nullable: true
    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.

````