Authorization

    To access the Desearch API, you must include your API key in the request header for authentication. All API endpoints are authenticated using tokens.

    Use the following format to add the authorization header to your API Requests.

    json
    'Authorization': '<your token>'

    To access the Desearch API, you must authenticate your requests using an API key that was generated as defined here. This key grants secure access and ensures proper authorization for each API call. All API endpoints require authentication via tokens.

    Authentication Method

    Include your API key in the request header using the Authorization header. The correct format is as below.

    curl
    curl --location 'https://api.desearch.ai/desearch/ai/search' \ --header 'Authorization: dt_$UZA25rX0jLD654y7AGswWvqABCeJHFiCLqqBWPF6abc' \ --header 'Content-Type: application/json' \ --data '{ "date_filter": "PAST_24_HOURS", "model": "NOVA", "prompt": "Latest TAO trends", "streaming": true, "tools": [ "Twitter Search" ] }'
    python
    import requests url = "https://apis.datura.ai/desearch/ai/search" headers = { "Authorization": "dt_$YOUR_API_KEY", "Content-Type": "application/json" } data = { "date_filter": "PAST_24_HOURS", "model": "NOVA", "prompt": "Washington Crash", "response_order": "SUMMARY_FIRST", "streaming": True, "tools": ["Twitter Search"] } response = requests.post(url, json=data, headers=headers) print(response.json()) const fetch = require('node-fetch'); const url = "https://apis.datura.ai/desearch/ai/search"; const headers = { "Authorization": "dt_$YOUR_API_KEY", "Content-Type": "application/json" }; const data = JSON.stringify({ "date_filter": "PAST_24_HOURS", "model": "NOVA", "prompt": "Washington Crash", "response_order": "SUMMARY_FIRST", "streaming": true, "tools": ["Twitter Search"] }); fetch(url, { method: "POST", headers: headers, body: data }) .then(response => response.json()) .then(result => console.log(result)) .catch(error => console.error("Error:", error));

    ❗️ Securing API Key

    Keep your API key confidential and do not expose it in client-side code.

    🍪 We value your privacy

    We use cookies to enhance your browsing experience, serve personalized ads or content, and analyze our traffic. By clicking "Accept All", you consent to our use of cookies. Read our Privacy Policy