AI Search

    AI Search lets you ask one natural-language prompt and search across selected sources such as web, Reddit, Wikipedia, YouTube, X/Twitter, Hacker News, and Arxiv. Use it when your app or agent needs current context plus a structured response.

    Endpoint

    text
    POST https://api.desearch.ai/desearch/ai/search

    Example request

    bash
    curl --request POST 'https://api.desearch.ai/desearch/ai/search' \ --header 'Authorization: $DESEARCH_API_KEY' \ --header 'Content-Type: application/json' \ --data '{ "prompt": "best recent research on AI search benchmarks", "tools": ["web", "reddit", "arxiv"], "date_filter": "PAST_WEEK", "result_type": "LINKS_WITH_FINAL_SUMMARY", "count": 10, "streaming": false }'

    Key parameters

    ParameterTypeNotes
    promptstringSearch query or task instruction.
    toolsarraySources to search, such as web, hackernews, reddit, wikipedia, youtube, twitter, arxiv.
    date_filterstringOptional preset such as PAST_24_HOURS, PAST_WEEK, or PAST_MONTH.
    start_date, end_datestringOptional UTC date range in YYYY-MM-DDTHH:MM:SSZ format.
    countinteger/stringNumber of results per source; check API Reference for current min/max.
    streamingbooleanfalse for JSON object responses; true for SSE streaming.
    result_typestringONLY_LINKS or LINKS_WITH_FINAL_SUMMARY.

    Billing metadata

    Non-streaming JSON object responses include cost_usd, usage_count, service, and currency fields when billable. All charged responses expose request cost through headers including X-Desearch-Cost-Usd.

    Common issues

    • 401 — check the Authorization header and API key status.
    • 422 — check required fields, source names in tools, enum values, and request body shape.
    • 429 — reduce concurrency or check account/rate limits.