Skip to main content

Base URL

https://scrapebadger.com/v1
All Twitter API endpoints are prefixed with this base URL. Authentication is required for all requests.

Authentication

Include your API key in the x-api-key header with every request:
curl -X GET "https://scrapebadger.com/v1/twitter/users/elonmusk/by_username" \
  -H "x-api-key: YOUR_API_KEY"
See the Authentication guide for more details.

Endpoint Categories

CategoryEndpointsDescription
Tweets11Get tweet details, replies, retweets, likes, edit history, community notes, and search
Users11Fetch user profiles, followers, following, mentions, articles, and batch lookups
Lists3Access Twitter lists, their tweets, and search within lists
Communities3Explore communities, their members, and content
Trends2Get trending topics globally or for specific locations
Geo2Search and retrieve geographic place information
Spaces2Access Twitter Spaces and live broadcasts

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
curl "https://scrapebadger.com/v1/twitter/users/elonmusk/followers" \
  -H "x-api-key: YOUR_API_KEY"

# Response includes next_cursor
# { "data": [...], "next_cursor": "abc123" }

# Next page
curl "https://scrapebadger.com/v1/twitter/users/elonmusk/followers?cursor=abc123" \
  -H "x-api-key: YOUR_API_KEY"

Error Handling

All errors return a JSON object with a detail field:
{
  "detail": "User not found"
}

Credits

All endpoints cost 1 credit per request. Failed requests (4xx/5xx) do not consume credits. See Credits & Pricing for details.