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

# Web Search

> AI-powered web search. Returns structured results with URLs, titles, authors, dates, highlights, and relevance scores.



## OpenAPI

````yaml /api-reference/openapi.json post /global/web-search/v1
openapi: 3.1.0
info:
  title: Croma Marketplace API
  version: 1.0.0
  description: >-
    Government-data APIs for Colombia, Peru, and global web search. Croma
    normalizes public-sector data into structured JSON for product teams and AI
    agents.
servers:
  - url: https://api.croma.run
security: []
paths:
  /global/web-search/v1:
    post:
      tags:
        - Global
        - Exa
      summary: Web Search
      description: >-
        AI-powered web search. Returns structured results with URLs, titles,
        authors, dates, highlights, and relevance scores.
      operationId: web_search
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - query
              properties:
                query:
                  type: string
                  minLength: 3
                  maxLength: 300
                  description: Natural-language search query.
                limit:
                  type: integer
                  minimum: 1
                  maximum: 25
                  default: 10
                  description: Number of results to return.
              additionalProperties: false
            example:
              query: croma api colombia
      responses:
        '200':
          description: Successful response
          headers:
            X-Request-Id:
              description: >-
                Unique id for the request (req_…). Include it in support
                reports.
              schema:
                type: string
            X-RateLimit-Limit:
              description: Requests allowed in the current window.
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: Requests left before you are throttled.
              schema:
                type: integer
            X-RateLimit-Reset:
              description: ISO 8601 timestamp when the window resets.
              schema:
                type: string
                format: date-time
            X-Cache:
              description: HIT or MISS. Cached hits still count against your quota.
              schema:
                type: string
                enum:
                  - HIT
                  - MISS
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebSearchResponse'
        '400':
          description: Invalid request body
          headers:
            X-Request-Id:
              description: >-
                Unique id for the request (req_…). Include it in support
                reports.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Missing or invalid API key
          headers:
            X-Request-Id:
              description: >-
                Unique id for the request (req_…). Include it in support
                reports.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '429':
          description: Rate limit exceeded
          headers:
            X-Request-Id:
              description: >-
                Unique id for the request (req_…). Include it in support
                reports.
              schema:
                type: string
            X-RateLimit-Limit:
              description: Requests allowed in the current window.
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: Requests left before you are throttled.
              schema:
                type: integer
            X-RateLimit-Reset:
              description: ISO 8601 timestamp when the window resets.
              schema:
                type: string
                format: date-time
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: Internal error
          headers:
            X-Request-Id:
              description: >-
                Unique id for the request (req_…). Include it in support
                reports.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      security:
        - bearerAuth: []
      externalDocs:
        description: Interactive documentation and examples
        url: https://usecroma.com/global/web-search
components:
  schemas:
    WebSearchResponse:
      type: object
      required:
        - data
      properties:
        data:
          type: object
          required:
            - results
          properties:
            results:
              type: array
              items:
                type: object
                required:
                  - url
                  - title
                  - published_at
                  - author
                  - highlights
                  - score
                properties:
                  url:
                    type: string
                    format: uri
                  title:
                    type:
                      - string
                      - 'null'
                  published_at:
                    type:
                      - string
                      - 'null'
                    format: date-time
                  author:
                    type:
                      - string
                      - 'null'
                  highlights:
                    type: array
                    items:
                      type: string
                  score:
                    type:
                      - number
                      - 'null'
    ApiError:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - type
            - code
            - message
          properties:
            type:
              type: string
              description: >-
                Broad category: invalid_request_error, authentication_error,
                not_found_error, rate_limit_error, upstream_error, api_error.
            code:
              type: string
              description: Machine-readable specific code.
            message:
              type: string
              description: Human-readable explanation, safe to surface in UI.
            param:
              type: string
              description: Field that triggered the error. Present on validation errors.
            details:
              type: object
              description: Free-form structured detail.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Use Authorization: Bearer YOUR_API_KEY'

````