Twitter API Reference
Access Twitter data through our unified API. 40 endpoints covering tweets, users, lists, communities, trends, and geographic data.
Base URL
https://api.scrapebadger.com/v1/twitterAll Twitter API endpoints are prefixed with this base URL. Authentication is required for all requests.
Endpoint Categories
Tweets
7 endpointsGet tweet details, replies, retweets, likes, and search for tweets.
Users
15 endpointsFetch user profiles, followers, following, and user-specific content.
Lists
6 endpointsAccess Twitter lists, their members, tweets, and subscribers.
Communities
7 endpointsExplore communities, their members, moderators, and content.
Trends
3 endpointsGet trending topics globally or for specific locations.
Geo
2 endpointsSearch and retrieve geographic place information.
Common Patterns
Pagination
Most list endpoints support cursor-based pagination. The response includes a next_cursor field that you can pass to the cursor parameter to fetch the next page.
// First request
GET /users/elonmusk/followers
// Response includes next_cursor
{ "data": [...], "next_cursor": "abc123" }
// Next page request
GET /users/elonmusk/followers?cursor=abc123Error Handling
All errors return a JSON object with a detail field describing the error.
// Error response format
{
"detail": "User not found"
}Rate Limits
Rate limits vary by endpoint type. Most endpoints allow 180 requests per 15 minutes, while follower/following endpoints allow 15 requests per 15 minutes. If you exceed the limit, the API will return a 504 Gateway Timeout.