API Direct
Endpoints
Twitter Posts

Twitter Posts

GET /v1/twitter/posts

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.

Cost
$0.006 per page
Free tier
50 requests/month

Parameters

query *
Search keyword (max 500 characters)
pages
Number of pages to fetch, 1-10 (default: 1)
sort_by
Sort order: most_recent or relevance (default: most_recent)

Example Request

curl "https://api.apidirect.io/v1/twitter/posts?query=AI&pages=2&sort_by=most_recent" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example Response

{
  "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
}

Your Usage

Free tier this month
Loading...
Recent Activity