API Keys

    API keys authenticate requests to the Desearch API and connect usage to your Console account for logs, billing, and limits.

    Create an API key

    1. Open Desearch Console.
    2. Sign up or log in.
    3. Go to API Keys.
    4. Click Generate API Key.
    5. Give the key a clear name, such as production-backend or local-dev.
    6. Copy the key immediately and store it securely. You may not be able to view the full key again.

    API Keys

    Use an API key

    Send the key in the Authorization header.

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

    For backend applications, read the key from an environment variable instead of hardcoding it.

    bash
    export DESEARCH_API_KEY="DESEARCH_API_KEY"

    Manage keys

    • Name keys by environment or service so usage is easy to audit.
    • Rotate keys when a developer leaves, a key is exposed, or access requirements change.
    • Delete unused keys to reduce account risk.
    • Use separate keys for production, staging, local development, and CI.

    Security practices

    ❗️ Keep API keys confidential. Do not paste real keys into public docs, GitHub issues, Discord, client-side code, browser bundles, screenshots, or analytics tools.

    Recommended handling:

    • Store keys in a backend secret manager or environment variables.
    • Restrict who can access production keys.
    • Monitor request logs and billing for unexpected usage.
    • Rotate leaked keys immediately from Console.