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

# Search the web

> General web search (You.com). Not cached; an empty result set is a genuine answer, not a miss. Costs 3 credit(s) per call.



## OpenAPI

````yaml /horizon/openapi.json post /v1/search/web
openapi: 3.1.0
info:
  title: Horizon API
  version: '1.0'
  description: >-
    Horizon is a prepaid-credits REST API for LinkedIn/company enrichment, email
    finding and verification, job search, and web search. Every request
    authenticates with an `Authorization: Bearer <key>` header and, on a billed
    endpoint, debits a fixed number of credits from your prepaid balance (see
    each endpoint's description for its exact cost). Check your balance any time
    with GET /v1/usage.
servers:
  - url: https://horizon.gravitygtm.com/api
security:
  - bearerAuth: []
paths:
  /v1/search/web:
    post:
      tags:
        - search
      summary: Search the web
      description: >-
        General web search (You.com). Not cached; an empty result set is a
        genuine answer, not a miss. Costs 3 credit(s) per call.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchWebRequest'
      responses:
        '200':
          description: 200 — success. Charges 3 credit(s) on this endpoint.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        title:
                          type: string
                        url:
                          type: string
                        snippet:
                          type: string
                      additionalProperties: true
                    description: Array of web search hits.
                  credits_charged:
                    type: number
                    description: Normally 3; see per-endpoint miss/skip policy notes.
                  credits_remaining:
                    type: number
                  cached:
                    type: boolean
                    description: >-
                      True when this result was served from cache without
                      calling the vendor.
                  request_id:
                    type: string
                    format: uuid
                required:
                  - data
                  - credits_charged
                  - credits_remaining
                  - cached
                  - request_id
        '401':
          description: >-
            401 unauthorized — missing or invalid `Authorization: Bearer <key>`
            header.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '402':
          description: >-
            402 insufficient_credits — not enough credit balance to cover this
            endpoint's price. The vendor is never called.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: 429 rate_limited — per-key fixed-window rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '502':
          description: >-
            502 vendor_error — the upstream vendor call failed or threw. Any
            reserved credits are refunded in full.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: >-
            503 vendor_capacity — this endpoint's vendor has hit its global
            daily spend cap. No credits are reserved; try again later.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SearchWebRequest:
      type: object
      properties:
        query:
          type: string
          minLength: 1
        count:
          type: integer
          minimum: 1
          maximum: 20
        livecrawl:
          type: boolean
      required:
        - query
    ErrorResponse:
      type: object
      description: >-
        Standard error body. Every response (success or error) carries a
        request_id for support reference.
      properties:
        error:
          type: string
          description: Machine-readable error code.
          enum:
            - unauthorized
            - insufficient_credits
            - not_found
            - rate_limited
            - vendor_error
            - vendor_capacity
        message:
          type: string
          description: Human-readable error detail.
        request_id:
          type: string
          format: uuid
        credits_remaining:
          type: number
          description: >-
            Present whenever a post-reservation/refund balance is known for this
            request.
        refund_issue:
          type: boolean
          description: >-
            Set only when a compensating credit refund itself failed (e.g. a
            transient store error) — the customer may have been charged without
            the refund landing yet.
      required:
        - error
        - message
        - request_id
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````