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

# Search the web

> Returns a stable, normalized list of web search results.



## OpenAPI

````yaml /openapi-search-ask-v1.json post /search
openapi: 3.1.0
info:
  title: Reprompt Search and Ask API
  version: 1.0.0
  description: >-
    Search returns normalized web results. Ask returns a fast, single-hop
    narrative answer grounded in web results; it is not a deep-research
    workflow.
servers:
  - url: https://api.repromptai.com/v1
security: []
paths:
  /search:
    post:
      tags:
        - Search & Answers
      summary: Search the web
      description: Returns a stable, normalized list of web search results.
      operationId: search
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QueryRequest'
            example:
              query: >-
                What is the difference between a web search API and a research
                agent?
      responses:
        '200':
          description: Normalized web search results.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          $ref: '#/components/responses/InvalidQuery'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/UpstreamFailure'
      security:
        - HTTPBearer: []
components:
  schemas:
    QueryRequest:
      type: object
      additionalProperties: false
      required:
        - query
      properties:
        query:
          type: string
          minLength: 1
          maxLength: 1000
          description: Natural-language web query.
    SearchResponse:
      type: object
      required:
        - query
        - results
      properties:
        query:
          type: string
        answer_box:
          $ref: '#/components/schemas/AnswerBox'
        knowledge_graph:
          $ref: '#/components/schemas/KnowledgeGraph'
        results:
          type: array
          items:
            $ref: '#/components/schemas/SearchResult'
    AnswerBox:
      type: object
      properties:
        title:
          type: string
        answer:
          type: string
        snippet:
          type: string
        url:
          type: string
          format: uri
        date:
          type: string
    KnowledgeGraph:
      type: object
      properties:
        title:
          type: string
        type:
          type: string
        description:
          type: string
        website:
          type: string
          format: uri
        facts:
          type: object
          additionalProperties:
            type: string
    SearchResult:
      type: object
      required:
        - title
        - url
        - position
      properties:
        title:
          type: string
          description: Result title.
        url:
          type: string
          format: uri
          description: Canonical result URL.
        snippet:
          type: string
          description: Search-result excerpt.
        position:
          type: integer
          minimum: 1
          description: One-based result rank.
        date:
          type: string
          description: Date supplied by the result, when available.
    ErrorResponse:
      type: object
      properties:
        detail:
          type: string
  responses:
    Unauthorized:
      description: The API key is missing, invalid, or revoked.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: The API key cannot access this organization or endpoint.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InvalidQuery:
      description: >-
        The request is invalid, query is missing/blank, or Ask found no web
        results.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    RateLimited:
      description: A rate or usage limit has been exceeded.
      headers:
        Retry-After:
          schema:
            type: integer
          description: Seconds to wait before retrying, when provided.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    UpstreamFailure:
      description: A required search or answer provider is temporarily unavailable.
      headers:
        Retry-After:
          schema:
            type: integer
          description: Seconds to wait before retrying.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````