Endpoints
    POST/search

    Search API

    Search the web and return ranked pages, each with the passage that best matches the query. Billing metadata: responses include `cost_usd`, `usage_count`, `service`, and `currency` fields in the JSON body.

    Base URL

    https://api.desearch.ai

    Implementation guidance

    Use Search API when your application needs search-grounded AI resultswithout maintaining its own crawler, social-data pipeline, or retrieval infrastructure. The endpoint returns structured data that can be consumed by agents, research tools, dashboards, and retrieval-augmented generation workflows. Keep the request focused on the minimum fields your workflow needs so responses remain fast and easy to validate.

    Send requests to POST /search with your Desearch API key in the authorization header. Treat the key as a server-side secret, validate all required parameters before sending the request, and handle non-2xx responses explicitly. Production integrations should use sensible timeouts, retry only transient failures with backoff, and record the response status and request identifier for troubleshooting.

    Test the example request below before integrating it into a larger workflow. Confirm that the returned fields, links, and timestamps meet your freshness requirements, then add schema validation at the application boundary. For agentic systems, preserve source URLs with the generated answer so users can inspect evidence and your application can avoid presenting unsupported claims.

    Body Parameters

    querystringrequired

    Search query.

    modestring

    `fast` returns results sooner. `balanced` favors relevance.

    Default: balanced

    countinteger

    Number of results to return: 10, 15 or 20.

    Default: 10

    start_datestring

    Only return pages published on or after this date (YYYY-MM-DD).

    end_datestring

    Only return pages published on or before this date (YYYY-MM-DD).

    highlightsboolean

    Include the passage that best matches the query.

    Default: true

    page_textboolean

    Include the full page text.

    Default: false

    Responses

    200Ranked results and the cost of the request.
    400Invalid JSON body
    401Unauthorized
    422Validation Error
    429Too Many Requests
    500Internal Server Error
    503Search unavailable
    Authorization

    Your API key is sent in the Authorization header.

    Request
    curl -X POST "https://api.desearch.ai/search" \
      -H "Authorization: YOUR_API_KEY" \
      -H "Content-Type: application/json"
    ResponseSchema
    {
      "results": [
        {
          "url": "Url",
          "title": "Title",
          "published_date": "string",
          "highlights": [
            "string"
          ],
          "page_text": "string"
        }
      ],
      "cost_usd": 0,
      "usage_count": 0,
      "service": "Service",
      "currency": "Currency"
    }

    Possible status codes:

    200401422429500