Each section lists the endpoint purpose, parameters, response shape, credit cost, and a request sample. Use /v1 for new integrations; /docs/x-api-compatible covers the official-style /2 migration layer.
Auth
Send your xfetch API key as a bearer token on every customer API request.
Authorization: Bearer $XFETCH_API_KEY
Credits
/v1 responses include meta.credits.charged and meta.credits.remaining. New accounts receive 1,000 credits; failed validation, auth failures, insufficient credits, rate limits, and service-side failures are not charged. See pricing for the credits cost of each endpoint.
Pagination
Paginated endpoints use next_token and return meta.pagination.next_token only when another page exists. limit is endpoint-specific: recent search allows up to 20, trends allows up to 100, graph mode=ids allows up to 5000, and continuation-only endpoints do not expose limit. Tokens are opaque — do not parse them.
Errors
Every endpoint returns the same public error envelope on failure. Standard codes: invalid_request (400), invalid_api_key / revoked_api_key (401), insufficient_credits (402), endpoint_not_found (404), rate_limited (429), internal_error (500), service_unavailable (503).
A 402 insufficient_credits body also includes a help_url pointing to billing, where you can add credits or choose a plan — the next step when a request is rejected for credits.
/2 mirrors the /v1 Basic Reads layer with official-style paths and query names for teams migrating familiar code. For full /2 details see /docs/x-api-compatible.
Capability
/v1 endpoint
/2 endpoint
Recent search
GET /v1/search/recent
GET /2/tweets/search/recent
User by username
GET /v1/users/by-username/:username
GET /2/users/by/username/:username
User by id
GET /v1/users/:id
GET /2/users/:id
Users by ids
GET /v1/users?ids=...
GET /2/users?ids=...
User tweets
GET /v1/users/:id/tweets
GET /2/users/:id/tweets
Followers
GET /v1/users/:id/followers?mode=ids
GET /2/users/:id/followers
Following
GET /v1/users/:id/following?mode=ids
GET /2/users/:id/following
Tweet by id
GET /v1/tweets/:id
GET /2/tweets/:id
Tweets by ids
GET /v1/tweets?ids=...
GET /2/tweets?ids=...
Quote tweets
GET /v1/tweets/:id/quotes
GET /2/tweets/:id/quote_tweets
Retweeters
GET /v1/tweets/:id/retweeters
GET /2/tweets/:id/retweeted_by
List tweets
GET /v1/lists/:id/tweets
GET /2/lists/:id/tweets
List members
GET /v1/lists/:id/members
GET /2/lists/:id/members
List subscribers/followers
GET /v1/lists/:id/subscribers
GET /2/lists/:id/followers
Run a request on your own key.
Sign in with Google to mint a key and call any endpoint above from the dashboard playground. New accounts receive 1,000 credits; failed validation, auth failures, insufficient credits, rate limits, and service-side failures are not charged.