X (Twitter) Posts Search
Search links using Twitter Search backed up with AI-powered models.
The Twitter Posts Search API allows users to search for relevant links based on Twitter search queries with leveraging AI-powered models. This API analyze links from Twitter posts that match the given prompt. This API is useful for tracking trends, gathering insights, and retrieving real-time information from Twitter.
Using the Twitter Posts Search API
The following examples demonstrate how to interact with the Twitter Posts Search API using multiple coding platform.
Request Sample
This script sends:
-
A POST request to the AI-powered search API endpoint https://apis.datura.ai/desearch/ai/search/links/twitter.
-
The request body (payload) contains a “prompt” field with the query “What are the recent sport events?” and specifies “model”: “NOVA” as the AI model to be used.
-
The Authorization header includes an API key, and the Content-Type is set to “application/json”.
-
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 X (Twitter) Posts Search API. -
payload
/body
: A JSON string or dictionary containing:prompt
: A string representing the search query.model
: The model to be used for processing, e.g., “NOVA”.
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.
Test API
To experiment with the X (Twitter) Posts Search API and see it in action, visit the X (Twitter) Posts Search API.