Search Twitter/X posts by keyword. Returns the tweet content, author username, URL, and publication date for each result. Supports fetching multiple pages of results in a single API call.
curl "https://api.apidirect.io/v1/twitter/posts?query=AI&pages=2&sort_by=most_recent" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"posts": [
{
"title": "@username on X",
"url": "https://twitter.com/username/status/...",
"date": "2024-01-15 14:30:00",
"author": "username",
"source": "Twitter (X)",
"snippet": "Tweet content here..."
}
],
"pages": 2,
"count": 40
}