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

# Web search

> Search the web and return results with title, URL, and snippet.

<Warning>
  This endpoint is in beta. Its request and response shapes may change without the usual deprecation window.
</Warning>


## OpenAPI

````yaml post /v3/tools/web/search
openapi: 3.1.0
info:
  description: Schema-driven generative API that orchestrates LLM-powered workflows.
  title: Task API
  version: 3.0.0
servers:
  - description: Production
    url: https://api.opper.ai
  - description: Local development
    url: http://localhost:8080
security:
  - BearerAuth: []
tags:
  - description: Schema-driven function management and execution
    name: Functions
  - description: OpenAI-compatible chat completions
    name: Chat
  - description: OpenAI Responses API compatible endpoint
    name: Responses
  - description: Google-compatible interactions endpoint
    name: Interactions
  - description: Model registry and capabilities
    name: Models
  - description: Synchronous image generation
    name: Images
  - description: Text-to-speech and speech-to-text
    name: Audio
  - description: Asynchronous video generation
    name: Videos
  - description: Reusable file storage for media inputs and generated outputs
    name: Files
  - description: Async generation status and downloads
    name: Artifacts
  - description: OpenAI-compatible embeddings
    name: Embeddings
  - description: Recorded HTTP request/response generations
    name: Generations
  - description: System health and status
    name: System
  - description: Roundtable endpoint — fan out a query to multiple LLMs and combine results
    name: Roundtable
  - description: Web search, fetch, and other utility tools
    name: Tools
paths:
  /v3/tools/web/search:
    post:
      tags:
        - Tools
      summary: Web search
      description: Search the web and return results with title, URL, and snippet.
      operationId: webSearch
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebSearchRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebSearchResponse'
          description: Successful response
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad request
        '401':
          description: Unauthorized - missing or invalid API key
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal server error
components:
  schemas:
    WebSearchRequest:
      properties:
        allowed_domains:
          description: Restrict results to these domains (e.g. "go.dev" or "pkg.go.dev").
          items:
            type: string
          type: array
        country:
          description: >-
            Two-letter ISO-3166 alpha-2 country code (e.g. "se" or "us") biasing
            results to that region. Case-insensitive.
          type: string
        engine:
          description: >-
            Search backend. auto (default) routes to Opper's default engine
            (Jina today). jina and exa pin a specific backend (when configured
            server-side).
          enum:
            - auto
            - jina
            - exa
          type: string
        excluded_domains:
          description: Exclude results from these domains (e.g. "reddit.com").
          items:
            type: string
          type: array
        max_results:
          description: >-
            Maximum results per page. 0 uses the engine default (typically 5).
            Must be between 0 and 20.
          type: integer
        max_total_results:
          description: >-
            Cap on total results accumulated across pages. 0 disables
            pagination. Silently ignored on engines without paginated search.
          type: integer
        query:
          description: Search query string. Required.
          type: string
        search_context_size:
          description: >-
            Per-result snippet length in characters. very_low ≈ 1000; low ≈
            5000; medium ≈ 10000 (default); high ≈ 30000; full returns the full
            extracted page content (capped ~50000).
          enum:
            - very_low
            - low
            - medium
            - high
            - full
          type: string
      required:
        - query
      type: object
    WebSearchResponse:
      properties:
        results:
          items:
            properties:
              published_at:
                description: >-
                  Publication date when reported by the engine. Empty when
                  unknown.
                type: string
              score:
                description: >-
                  Relevance score when reported by the engine. Omitted on
                  engines that don't expose one (e.g. Jina).
                type: number
              snippet:
                description: >-
                  Short text excerpt from the page. Length is bounded by the
                  request's search_context_size.
                type: string
              title:
                description: Page title as reported by the search engine.
                type: string
              url:
                description: Canonical URL of the result page.
                type: string
            required:
              - title
              - url
              - snippet
            type: object
          type: array
      required:
        - results
      type: object
    ErrorResponse:
      properties:
        error:
          properties:
            code:
              type: string
            details:
              description: Any value
            message:
              type: string
          required:
            - code
            - message
          type: object
        meta:
          type: object
      required:
        - error
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: API Key
      description: API key authentication. Pass your API key as a Bearer token.
      scheme: bearer
      type: http

````