Desearch AI Search
Learn how to use the Desearch API to search the web.
The Desearch API allows you to perform AI-powered web searches, gathering relevant information from multiple sources, including web pages, research papers, and social media discussions. This guide provides usage instructions, code samples, and parameter details to help you integrate the API into your applications.
Using Desearch AI Search API
The following examples demonstrate how to interact with the Desearch API using multiple coding platform.
Request Sample
The below scripts:
-
Sends a POST request to the AI-powered search API at https://apis.datura.ai/desearch/ai/search.
-
It includes an Authorization header with an API key and sets the Content-Type to “application/json”.
-
The request body contains parameters such as “date_filter”: “PAST_24_HOURS”, which limits results to the past 24 hours, and “model”: “NOVA”, specifying the AI model used.
-
The “prompt” field contains the search query “Tesla Space Program”, and “streaming”: False ensures non-streaming results.
-
The “tools” list specifies multiple data sources, including “Web Search”, “Hacker News Search”, “Reddit Search”, “Wikipedia Search”, “YouTube Search”, “Twitter Search”, and “ArXiv Search”.
-
The script sends the request , passing the url, payload, and headers, and then prints the raw response text.
Parameters
Required
url
: The endpoint for the Desearch API.payload
/body
: A JSON string or dictionary containing:prompt
: A string representing the search query.tools
: A list of tools to be used for the search, e.g., [“Web Search”].model
: The model to be used for processing, e.g., “NOVA”.date_filter
: A string to filter search results by date, e.g., “PAST_24_HOURS”.
Optional
streaming
: A boolean indicating whether to enable streaming responses. Defaults totrue
.
Response Sample
Based on the above code, here is how the response is retrieve as JSON. Each coding language has its own way of retrieving data from the below JSON.
Models
Nova 1.0
Quick insights, broad coverage.
Orbit 1.0
Balanced analysis, targeted relevance.
Horizon 1.0
In-depth exploration, profound insights.
Tools
Web Search
To find information and resources across the internet.
To gather community-driven insights and discussions.
YouTube
For video content and tutorials.
Hacker News
To find tech-related news and discussions.
Wikipedia
For detailed and comprehensive information on a wide range of topics.
To gather real-time updates and discussions.
arXiv
For accessing research papers and preprints in various fields.
Test API
To experiment with the Desearch AI Search and see it in action, visit the Desearch API.