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

# Execute Web Search

> Perform a web search and immediately fetch content for the returned URLs.

Use this when you want both snippets and page contents from one call.

If you want to selectively fetch content (i.e. let the LLM decide which URLs to read),
use `/search-lite` and then call `/open-urls` separately.



## OpenAPI

````yaml POST /web-search/search
openapi: 3.1.0
info:
  title: Onyx API
  description: Onyx API for AI-powered enterprise search and chat
  version: Development
servers:
  - url: https://cloud.onyx.app/api
security: []
paths:
  /web-search/search:
    post:
      tags:
        - public
      summary: Execute Web Search
      description: >-
        Perform a web search and immediately fetch content for the returned
        URLs.


        Use this when you want both snippets and page contents from one call.


        If you want to selectively fetch content (i.e. let the LLM decide which
        URLs to read),

        use `/search-lite` and then call `/open-urls` separately.
      operationId: execute_web_search
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebSearchToolRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebSearchWithContentResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerAuth: []
components:
  schemas:
    WebSearchToolRequest:
      properties:
        queries:
          items:
            type: string
          type: array
          minItems: 1
          title: Queries
          description: List of search queries to send to the configured provider.
        max_results:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Results
          description: >-
            Optional cap on number of results to return per query. Defaults to
            10.
          default: 10
      type: object
      required:
        - queries
      title: WebSearchToolRequest
    WebSearchWithContentResponse:
      properties:
        search_provider_type:
          $ref: '#/components/schemas/WebSearchProviderType'
        content_provider_type:
          anyOf:
            - $ref: '#/components/schemas/WebContentProviderType'
            - type: 'null'
        search_results:
          items:
            $ref: '#/components/schemas/LlmWebSearchResult'
          type: array
          title: Search Results
        full_content_results:
          items:
            $ref: '#/components/schemas/LlmOpenUrlResult'
          type: array
          title: Full Content Results
      type: object
      required:
        - search_provider_type
        - search_results
        - full_content_results
      title: WebSearchWithContentResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    WebSearchProviderType:
      type: string
      enum:
        - google_pse
        - serper
        - exa
        - searxng
      title: WebSearchProviderType
    WebContentProviderType:
      type: string
      enum:
        - onyx_web_crawler
        - firecrawl
        - exa
      title: WebContentProviderType
    LlmWebSearchResult:
      properties:
        document_citation_number:
          type: integer
          title: Document Citation Number
        unique_identifier_to_strip_away:
          anyOf:
            - type: string
            - type: 'null'
          title: Unique Identifier To Strip Away
        type:
          type: string
          const: web_search
          title: Type
          default: web_search
        url:
          type: string
          title: Url
        title:
          type: string
          title: Title
        snippet:
          type: string
          title: Snippet
      type: object
      required:
        - document_citation_number
        - url
        - title
        - snippet
      title: LlmWebSearchResult
      description: Result from a web search query
    LlmOpenUrlResult:
      properties:
        document_citation_number:
          type: integer
          title: Document Citation Number
        unique_identifier_to_strip_away:
          anyOf:
            - type: string
            - type: 'null'
          title: Unique Identifier To Strip Away
        type:
          type: string
          const: open_url
          title: Type
          default: open_url
        content:
          type: string
          title: Content
      type: object
      required:
        - document_citation_number
        - content
      title: LlmOpenUrlResult
      description: Result from opening/fetching a URL
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Authorization header with Bearer token

````