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

# /search

> The `/search` endpoint allows you to retrieve web content.

<Card title="Get your API key" icon="key" href="https://app.linkup.so" horizontal="True">
  Create a Linkup account for free to get your API key.
</Card>

For an explanation of `depth`, `outputType`, and the other parameters,
see the [Search overview](/pages/documentation/endpoints/search/overview).


## OpenAPI

````yaml https://api.linkup.so/v1/openapi.json POST /v1/search
openapi: 3.1.0
info:
  title: Linkup API
  description: >-
    Search the web in real time to get trustworthy, source-backed answers. Find
    the latest news and comprehensive results from the most relevant sources.
    Use natural language queries to quickly gather facts, citations, and
    context.
  version: '1.0'
  contact: {}
servers:
  - url: https://api.linkup.so
security: []
tags: []
paths:
  /v1/search:
    post:
      tags:
        - Search
      summary: /search
      description: The `/search` endpoint allows you to retrieve web content.
      operationId: search
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchInput'
      responses:
        '200':
          content:
            searchResults:
              schema:
                $ref: '#/components/schemas/SearchResultsOutput'
            sourcedAnswer:
              schema:
                $ref: '#/components/schemas/SourcedAnswerOutput'
            structured:
              schema:
                description: >-
                  When you pick `structured` for the `outputType` parameter, you
                  will get the object corresponding to the JSON schema you used
                  in the `structuredOutputSchema` param.
                properties: {}
                type: object
            structuredWithSources:
              schema:
                $ref: '#/components/schemas/StructuredWithSourcesOutput'
          description: Successful response
        '400':
          description: Bad Request - Invalid parameters
        '401':
          description: Unauthorized - Invalid or missing API key
        '402':
          description: >-
            Payment Required - No API key provided. Returns x402 payment details
            in the `payment-required` header for pay-per-request with USDC.
        '429':
          description: Too Many Requests - Rate limit exceeded or insufficient credits
      security:
        - bearer: []
components:
  schemas:
    SearchInput:
      type: object
      properties:
        excludeDomains:
          description: >-
            The domains you want to exclude of the search. By default, don't
            restrict the search.
          example:
            - wikipedia.org
          type: array
          items:
            example: wikipedia.org
            type: string
        fromDate:
          description: >-
            The date from which the search results should be considered, in ISO
            8601 format (YYYY-MM-DD). It must be before `toDate`, if provided,
            and later than 1970-01-01.
          example: '2025-01-01'
          anyOf:
            - type: string
            - type: 'null'
        includeDomains:
          description: >-
            The domains you want to search on. By default, don't restrict the
            search. You can provide up to 100 domains.
          example:
            - microsoft.com
            - agolution.com
          maxItems: 100
          type: array
          items:
            example: microsoft.com
            type: string
        q:
          description: >-
            The natural language question for which you want to retrieve
            context.
          example: What is Microsoft's 2024 revenue?
          type: string
        structuredOutputSchema:
          default: null
          format: json
          description: >-
            Required only when `outputType` is `structured`. Provide a JSON
            schema (as a string) representing the desired response format. The
            root must be of type `object`.
        toDate:
          description: >-
            The date until which the search results should be considered, in ISO
            8601 format (YYYY-MM-DD). It must be later than `fromDate`, if
            provided, or than 1970-01-01.
          example: '2025-01-01'
          anyOf:
            - type: string
            - type: 'null'
        depth:
          type: string
          enum:
            - deep
            - fast
            - standard
          description: >-
            Defines the precision of the search. [BETA] `fast` is a sub-second
            search mode optimized for simple, focused queries; `standard`
            leverages agentic search to handle broader queries spanning multiple
            topics or sources, while remaining fast; `deep` leverages several
            iterations of agentic search to return comprehensive results,
            optimizing for coverage.
        includeImages:
          default: false
          description: Defines whether the API should include images in its results.
          anyOf:
            - type: boolean
            - type: string
        includeInlineCitations:
          default: false
          description: >-
            Relevant only when `outputType` is `sourcedAnswer`. Defines whether
            the answer should include inline citations.
          anyOf:
            - type: boolean
            - type: string
        includeSources:
          default: false
          description: >-
            Relevant only when `outputType` is `structured`. Defines whether the
            response should include sources. **Please note that it modifies the
            schema of the response, see below**
          anyOf:
            - type: boolean
            - type: string
        maxResults:
          description: >-
            The maximum number of results to return. The number of results will
            always be ≤ to maxResults.
          example: 5
          type: number
          minimum: 1
        outputType:
          type: string
          enum:
            - searchResults
            - sourcedAnswer
            - structured
          description: >-
            The type of output you want to get. Use `structured` for a
            custom-formatted response defined by `structuredOutputSchema`.
      required:
        - q
        - depth
        - outputType
      id: SearchInput
      example:
        depth: deep
        excludeDomains:
          - wikipedia.org
        includeDomains:
          - microsoft.com
          - agolution.com
        outputType: sourcedAnswer
        q: What is Microsoft's 2024 revenue?
    SearchResultsOutput:
      type: object
      properties:
        results:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/TextSearchResultOutput'
              - $ref: '#/components/schemas/ImageSearchResultOutput'
          description: List of search results.
      required:
        - results
      id: SearchResultsOutput
    SourcedAnswerOutput:
      type: object
      properties:
        answer:
          type: string
          description: The answer to your question.
          example: >-
            Microsoft's revenue for fiscal year 2024 was $245.1 billion,
            reflecting a 16% increase from the previous year.
        sources:
          type: array
          items:
            $ref: '#/components/schemas/Source'
          description: List of sources used to answer the question.
          example:
            - name: Microsoft 2024 Annual Report
              snippet: >-
                Highlights from fiscal year 2024 compared with fiscal year 2023
                included: Microsoft Cloud revenue increased 23% to $137.4
                billion.
              url: https://www.microsoft.com/investor/reports/ar24/index.html
      required:
        - answer
        - sources
      id: SourcedAnswerOutput
    StructuredWithSourcesOutput:
      type: object
      properties:
        data:
          type: object
          propertyNames:
            type: string
          additionalProperties: true
          description: >-
            The object corresponding to the JSON schema you used in the
            `structuredOutputSchema` param.
        sources:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/TextSearchResultOutput'
              - $ref: '#/components/schemas/ImageSearchResultOutput'
          description: List of sources used to answer the question.
      required:
        - data
        - sources
      id: StructuredWithSourcesOutput
    TextSearchResultOutput:
      type: object
      properties:
        name:
          type: string
          description: The title or name of the resource.
          example: Microsoft 2024 Annual Report
        url:
          description: The URL of the resource.
          example: https://www.microsoft.com/investor/reports/ar24/index.html
          format: uri
          type: string
        content:
          type: string
          description: Extracted text content associated with the resource.
          example: >-
            Highlights from fiscal year 2024 compared with fiscal year 2023
            included: Microsoft Cloud revenue increased 23% to $137.4 billion.
        favicon:
          anyOf:
            - type: string
              const: ''
            - type: string
              format: uri
          description: The favicon URL, if available.
          example: https://www.microsoft.com/favicon.ico
          format: uri
        type:
          type: string
          const: text
          description: The type of the resource.
          enum:
            - text
          example: text
      required:
        - name
        - url
        - content
        - favicon
        - type
      id: TextSearchResultOutput
    ImageSearchResultOutput:
      type: object
      properties:
        name:
          type: string
          description: The title or name of the resource.
          example: Microsoft 2024 Annual Report
        url:
          description: The URL of the resource.
          example: https://www.microsoft.com/investor/reports/ar24/index.html
          format: uri
          type: string
        type:
          type: string
          const: image
          description: The type of the resource.
          enum:
            - image
          example: image
      required:
        - name
        - url
        - type
      id: ImageSearchResultOutput
    Source:
      type: object
      properties:
        name:
          type: string
          description: The title or name of the resource.
          example: Microsoft 2024 Annual Report
        url:
          description: The URL of the resource.
          example: https://www.microsoft.com/investor/reports/ar24/index.html
          format: uri
          type: string
        favicon:
          anyOf:
            - type: string
              const: ''
            - type: string
              format: uri
          description: The favicon URL, if available.
          example: https://www.microsoft.com/favicon.ico
          format: uri
        snippet:
          type: string
          description: Extracted text content associated with the source.
          example: >-
            Highlights from fiscal year 2024 compared with fiscal year 2023
            included...
      required:
        - name
        - url
        - favicon
        - snippet
      id: Source
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````