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

# Search the web with X402 payment

> X402 payment endpoint. First request returns 402 with payment requirements. Retry with PAYMENT-SIGNATURE header containing cryptographic proof to get search results. See https://x402.gitbook.io/x402 for protocol details.



## OpenAPI

````yaml /openapi.json POST /x402/web/search
openapi: 3.0.1
info:
  title: Hyperbrowser API
  version: 1.0.0
servers:
  - url: https://api.hyperbrowser.ai
    description: Production server
security: []
paths:
  /x402/web/search:
    post:
      summary: Search the web with X402 payment
      description: >-
        X402 payment endpoint. First request returns 402 with payment
        requirements. Retry with PAYMENT-SIGNATURE header containing
        cryptographic proof to get search results. See
        https://x402.gitbook.io/x402 for protocol details.
      parameters:
        - name: PAYMENT-SIGNATURE
          in: header
          required: false
          description: >-
            Base64-encoded JSON containing payment proof (x402Version, resource,
            accepted payment method, and cryptographic payload with signature
            and payer address)
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebSearchParams'
      responses:
        '200':
          description: Search completed successfully (after valid payment)
          headers:
            PAYMENT-RESPONSE:
              description: Base64-encoded JSON with settlement information
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebSearchResponse'
        '400':
          description: Invalid search parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '402':
          description: >-
            Payment Required - returned on first request without
            PAYMENT-SIGNATURE header
          headers:
            PAYMENT-REQUIRED:
              description: >-
                Base64-encoded JSON containing X402 payment requirements
                (x402Version, resource info, and array of accepted payment
                methods with network, asset, amount, payTo address, and timeout)
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    WebSearchParams:
      type: object
      properties:
        query:
          type: string
        page:
          type: integer
        maxAgeSeconds:
          type: integer
        location:
          $ref: '#/components/schemas/WebSearchLocation'
        filters:
          $ref: '#/components/schemas/WebSearchFilters'
      required:
        - query
    WebSearchResponse:
      type: object
      properties:
        jobId:
          type: string
        status:
          $ref: '#/components/schemas/WebSearchStatus'
        error:
          type: string
          nullable: true
        data:
          $ref: '#/components/schemas/WebSearchResponseData'
      required:
        - jobId
        - status
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
    WebSearchLocation:
      type: object
      properties:
        country:
          type: string
        state:
          type: string
        city:
          type: string
      required:
        - country
    WebSearchFilters:
      type: object
      properties:
        exactPhrase:
          type: boolean
        semanticPhrase:
          type: boolean
        excludeTerms:
          type: array
          items:
            type: string
        boostTerms:
          type: array
          items:
            type: string
        filetype:
          $ref: '#/components/schemas/WebSearchFiletype'
        site:
          type: string
        excludeSite:
          type: string
        intitle:
          type: string
        inurl:
          type: string
    WebSearchStatus:
      type: string
      enum:
        - completed
        - failed
        - pending
        - running
        - stopped
    WebSearchResponseData:
      type: object
      properties:
        query:
          type: string
        results:
          type: array
          items:
            $ref: '#/components/schemas/WebSearchResultItem'
      required:
        - query
        - results
    WebSearchFiletype:
      type: string
      enum:
        - pdf
        - doc
        - docx
        - xls
        - xlsx
        - ppt
        - pptx
        - html
    WebSearchResultItem:
      type: object
      properties:
        title:
          type: string
        url:
          type: string
        description:
          type: string
      required:
        - title
        - url
        - description

````