API reference
The live /v1 read surface, in one place. 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_KEYCredits /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.
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).
Basic Reads GET /v1/trendsBasic Reads 1 base + 1 per item # Fetch ranked trends for a WOEID (default `1` = worldwide).
cURL Node Python Copy
curl 'https://api.xfetch.io/v1/trends?woeid=1' \
-H 'Authorization: Bearer $XFETCH_API_KEY'Name In Type Required Default / Enum Description woeidquery stringoptional WOEID (Where On Earth ID); defaults to 1 (worldwide). limitquery integeroptional default: 20
Response Example Schema Copy
{
"data": [
{
"name": "#xfetch",
"url": "https://example.com/search?q=xfetch",
"tweet_volume": 1200
}
],
"meta": {
"request_id": "req_01HXFETCHEXAMPLE",
"credits": {
"charged": 3,
"remaining": 997
}
}
}GET /v1/search/recentBasic Reads 1 base + 1 per item # Search recent tweets matching a query for social listening and monitoring jobs.
cURL Node Python Copy
curl 'https://api.xfetch.io/v1/search/recent?query=xfetch' \
-H 'Authorization: Bearer $XFETCH_API_KEY'Name In Type Required Default / Enum Description queryquery stringrequired limitquery integeroptional default: 20 Page size for search-backed results. next_tokenquery stringoptional
Response Example Schema Copy
{
"data": [
{
"id": "1234567890123456789",
"text": "xfetch ships /v1 today.",
"author_id": "783214",
"created_at": "2026-05-23T12:00:00.000Z",
"lang": "en",
"like_count": 5,
"retweet_count": 1,
"reply_count": 0,
"quote_count": 0,
"bookmark_count": 0,
"is_quote_status": false,
"entities": {
"hashtags": [],
"urls": [],
"mentions": []
}
}
],
"meta": {
"request_id": "req_01HXFETCHEXAMPLE",
"credits": {
"charged": 2,
"remaining": 998
},
"pagination": {
"next_token": "tok_2"
}
}
}GET /v1/users/{id} Basic Reads Flat 1 credit # Look up one user by numeric ID.
cURL Node Python Copy
curl 'https://api.xfetch.io/v1/users/783214' \
-H 'Authorization: Bearer $XFETCH_API_KEY'Name In Type Required Default / Enum Description idpath stringrequired
Response Example Schema Copy
{
"data": {
"id": "783214",
"username": "xfetch",
"name": "xfetch",
"description": "Developer-facing X/Twitter data API.",
"created_at": "2024-01-01T00:00:00.000Z",
"verified": false,
"protected": false,
"profile_image_url": "https://example.com/avatar.png",
"follower_count": 12000,
"following_count": 18,
"tweet_count": 240
},
"meta": {
"request_id": "req_01HXFETCHEXAMPLE",
"credits": {
"charged": 1,
"remaining": 999
}
}
}GET /v1/users/by-username/{username} Basic Reads Flat 1 credit # Look up one user by case-insensitive username.
cURL Node Python Copy
curl 'https://api.xfetch.io/v1/users/by-username/xfetch' \
-H 'Authorization: Bearer $XFETCH_API_KEY'Name In Type Required Default / Enum Description usernamepath stringrequired
Response Example Schema Copy
{
"data": {
"id": "783214",
"username": "xfetch",
"name": "xfetch",
"description": "Developer-facing X/Twitter data API.",
"created_at": "2024-01-01T00:00:00.000Z",
"verified": false,
"protected": false,
"profile_image_url": "https://example.com/avatar.png",
"follower_count": 12000,
"following_count": 18,
"tweet_count": 240
},
"meta": {
"request_id": "req_01HXFETCHEXAMPLE",
"credits": {
"charged": 1,
"remaining": 999
}
}
}GET /v1/usersBasic Reads 1 base + 1 per item # Look up multiple users in one call by comma-separated IDs.
cURL Node Python Copy
curl 'https://api.xfetch.io/v1/users?ids=783214' \
-H 'Authorization: Bearer $XFETCH_API_KEY'Name In Type Required Default / Enum Description idsquery stringrequired Comma-separated IDs.
Response Example Schema Copy
{
"data": [
{
"id": "783214",
"username": "xfetch",
"name": "xfetch",
"description": "Developer-facing X/Twitter data API.",
"created_at": "2024-01-01T00:00:00.000Z",
"verified": false,
"protected": false,
"profile_image_url": "https://example.com/avatar.png",
"follower_count": 12000,
"following_count": 18,
"tweet_count": 240
}
],
"meta": {
"request_id": "req_01HXFETCHEXAMPLE",
"credits": {
"charged": 3,
"remaining": 997
}
}
}GET /v1/users/{id} /mediaBasic Reads 1 base + 1 per item # List a user's recent tweets that include compact media objects.
cURL Node Python Copy
curl 'https://api.xfetch.io/v1/users/783214/media' \
-H 'Authorization: Bearer $XFETCH_API_KEY'Name In Type Required Default / Enum Description idpath stringrequired next_tokenquery stringoptional
Response Example Schema Copy
{
"data": [
{
"id": "1234567890123456789",
"text": "New dashboard screenshot.",
"author_id": "783214",
"created_at": "2026-05-23T12:00:00.000Z",
"lang": "en",
"like_count": 18,
"retweet_count": 3,
"reply_count": 1,
"quote_count": 0,
"bookmark_count": 2,
"is_quote_status": false,
"entities": {
"hashtags": [],
"urls": [],
"mentions": []
},
"media": [
{
"type": "photo",
"url": "https://example.com/media.jpg"
}
]
}
],
"meta": {
"request_id": "req_01HXFETCHEXAMPLE",
"credits": {
"charged": 2,
"remaining": 998
},
"pagination": {
"next_token": "tok_2"
}
}
}GET /v1/users/{id} /followersBasic Reads 1 base + 1 per 20 items (varies by mode) # List follower IDs for low-cost audience-graph reads.
cURL Node Python Copy
curl 'https://api.xfetch.io/v1/users/783214/followers?mode=ids' \
-H 'Authorization: Bearer $XFETCH_API_KEY'Name In Type Required Default / Enum Description idpath stringrequired next_tokenquery stringoptional modequery stringoptional ids | profiles limitquery integeroptional default: 200 Supported only when mode=ids.
Response Example Schema Copy
{
"data": [
{
"id": "783214"
}
],
"meta": {
"request_id": "req_01HXFETCHEXAMPLE",
"credits": {
"charged": 2,
"remaining": 998
},
"pagination": {
"next_token": "tok_2"
}
}
}GET /v1/users/{id} /verified-followersBasic Reads 1 base + 1 per item # List a user's verified followers — a high-signal subset of followers for audience and influence analysis.
cURL Node Python Copy
curl 'https://api.xfetch.io/v1/users/783214/verified-followers' \
-H 'Authorization: Bearer $XFETCH_API_KEY'Name In Type Required Default / Enum Description idpath stringrequired next_tokenquery stringoptional
Response Example Schema Copy
{
"data": [
{
"id": "783214",
"username": "xfetch",
"name": "xfetch",
"description": "Developer-facing X/Twitter data API.",
"created_at": "2024-01-01T00:00:00.000Z",
"verified": true,
"protected": false,
"profile_image_url": "https://example.com/avatar.png",
"follower_count": 12000,
"following_count": 18,
"tweet_count": 240
}
],
"meta": {
"request_id": "req_01HXFETCHEXAMPLE",
"credits": {
"charged": 2,
"remaining": 998
},
"pagination": {
"next_token": "tok_2"
}
}
}GET /v1/users/{id} /followingBasic Reads 1 base + 1 per 20 items (varies by mode) # List followed account IDs for low-cost audience-graph reads.
cURL Node Python Copy
curl 'https://api.xfetch.io/v1/users/783214/following?mode=ids' \
-H 'Authorization: Bearer $XFETCH_API_KEY'Name In Type Required Default / Enum Description idpath stringrequired next_tokenquery stringoptional modequery stringoptional ids | profiles limitquery integeroptional default: 200 Supported only when mode=ids.
Response Example Schema Copy
{
"data": [
{
"id": "783214"
}
],
"meta": {
"request_id": "req_01HXFETCHEXAMPLE",
"credits": {
"charged": 2,
"remaining": 998
},
"pagination": {
"next_token": "tok_2"
}
}
}GET /v1/lists/{id} /membersBasic Reads 1 base + 1 per item # List members of a public list.
cURL Node Python Copy
curl 'https://api.xfetch.io/v1/lists/9999000099990000/members' \
-H 'Authorization: Bearer $XFETCH_API_KEY'Name In Type Required Default / Enum Description idpath stringrequired next_tokenquery stringoptional
Response Example Schema Copy
{
"data": [
{
"id": "783214",
"username": "xfetch",
"name": "xfetch",
"description": "Developer-facing X/Twitter data API.",
"created_at": "2024-01-01T00:00:00.000Z",
"verified": false,
"protected": false,
"profile_image_url": "https://example.com/avatar.png",
"follower_count": 12000,
"following_count": 18,
"tweet_count": 240
}
],
"meta": {
"request_id": "req_01HXFETCHEXAMPLE",
"credits": {
"charged": 2,
"remaining": 998
},
"pagination": {
"next_token": "tok_2"
}
}
}GET /v1/lists/{id} /subscribersBasic Reads 1 base + 1 per item # List subscribers of a public list.
cURL Node Python Copy
curl 'https://api.xfetch.io/v1/lists/9999000099990000/subscribers' \
-H 'Authorization: Bearer $XFETCH_API_KEY'Name In Type Required Default / Enum Description idpath stringrequired next_tokenquery stringoptional
Response Example Schema Copy
{
"data": [
{
"id": "783214",
"username": "xfetch",
"name": "xfetch",
"description": "Developer-facing X/Twitter data API.",
"created_at": "2024-01-01T00:00:00.000Z",
"verified": false,
"protected": false,
"profile_image_url": "https://example.com/avatar.png",
"follower_count": 12000,
"following_count": 18,
"tweet_count": 240
}
],
"meta": {
"request_id": "req_01HXFETCHEXAMPLE",
"credits": {
"charged": 2,
"remaining": 998
},
"pagination": {
"next_token": "tok_2"
}
}
}GET /v1/communities/{id} Basic Reads Flat 1 credit # Look up one community by ID.
cURL Node Python Copy
curl 'https://api.xfetch.io/v1/communities/1000200030004000' \
-H 'Authorization: Bearer $XFETCH_API_KEY'Name In Type Required Default / Enum Description idpath stringrequired
Response Example Schema Copy
{
"data": {
"id": "1000200030004000",
"name": "xfetch builders",
"description": "Developers building on the xfetch API.",
"member_count": 240
},
"meta": {
"request_id": "req_01HXFETCHEXAMPLE",
"credits": {
"charged": 1,
"remaining": 999
}
}
}GET /v1/communities/searchBasic Reads 1 base + 1 per item # Search communities matching a query.
cURL Node Python Copy
curl 'https://api.xfetch.io/v1/communities/search?query=xfetch' \
-H 'Authorization: Bearer $XFETCH_API_KEY'Name In Type Required Default / Enum Description queryquery stringrequired next_tokenquery stringoptional
Response Example Schema Copy
{
"data": [
{
"id": "1000200030004000",
"name": "xfetch builders",
"description": "Developers building on the xfetch API.",
"member_count": 240
}
],
"meta": {
"request_id": "req_01HXFETCHEXAMPLE",
"credits": {
"charged": 2,
"remaining": 998
},
"pagination": {
"next_token": "tok_2"
}
}
}GET /v1/communities/{id} /membersBasic Reads 1 base + 1 per item # List members of a community.
cURL Node Python Copy
curl 'https://api.xfetch.io/v1/communities/1000200030004000/members' \
-H 'Authorization: Bearer $XFETCH_API_KEY'Name In Type Required Default / Enum Description idpath stringrequired next_tokenquery stringoptional
Response Example Schema Copy
{
"data": [
{
"id": "783214",
"username": "xfetch",
"name": "xfetch",
"description": "Developer-facing X/Twitter data API.",
"created_at": "2024-01-01T00:00:00.000Z",
"verified": false,
"protected": false,
"profile_image_url": "https://example.com/avatar.png",
"follower_count": 12000,
"following_count": 18,
"tweet_count": 240
}
],
"meta": {
"request_id": "req_01HXFETCHEXAMPLE",
"credits": {
"charged": 2,
"remaining": 998
},
"pagination": {
"next_token": "tok_2"
}
}
}GET /v1/communities/{id} /moderatorsBasic Reads 1 base + 1 per item # List moderators of a community.
cURL Node Python Copy
curl 'https://api.xfetch.io/v1/communities/1000200030004000/moderators' \
-H 'Authorization: Bearer $XFETCH_API_KEY'Name In Type Required Default / Enum Description idpath stringrequired next_tokenquery stringoptional
Response Example Schema Copy
{
"data": [
{
"id": "783214",
"username": "xfetch",
"name": "xfetch",
"description": "Developer-facing X/Twitter data API.",
"created_at": "2024-01-01T00:00:00.000Z",
"verified": false,
"protected": false,
"profile_image_url": "https://example.com/avatar.png",
"follower_count": 12000,
"following_count": 18,
"tweet_count": 240
}
],
"meta": {
"request_id": "req_01HXFETCHEXAMPLE",
"credits": {
"charged": 2,
"remaining": 998
},
"pagination": {
"next_token": "tok_2"
}
}
}Enriched Reads GET /v1/users/{id} /followersEnriched Reads 1 base + 1 per 20 items (varies by mode) # List follower profile objects for enriched audience analysis.
cURL Node Python Copy
curl 'https://api.xfetch.io/v1/users/783214/followers?mode=profiles' \
-H 'Authorization: Bearer $XFETCH_API_KEY'Name In Type Required Default / Enum Description idpath stringrequired next_tokenquery stringoptional modequery stringoptional ids | profiles limitquery integeroptional default: 200 Supported only when mode=ids.
Response Example Schema Copy
{
"data": [
{
"id": "783214",
"username": "xfetch",
"name": "xfetch",
"description": "Developer-facing X/Twitter data API.",
"created_at": "2024-01-01T00:00:00.000Z",
"verified": false,
"protected": false,
"profile_image_url": "https://example.com/avatar.png",
"follower_count": 12000,
"following_count": 18,
"tweet_count": 240
}
],
"meta": {
"request_id": "req_01HXFETCHEXAMPLE",
"credits": {
"charged": 2,
"remaining": 998
},
"pagination": {
"next_token": "tok_2"
}
}
}GET /v1/users/{id} /followingEnriched Reads 1 base + 1 per 20 items (varies by mode) # List followed account profile objects for enriched audience analysis.
cURL Node Python Copy
curl 'https://api.xfetch.io/v1/users/783214/following?mode=profiles' \
-H 'Authorization: Bearer $XFETCH_API_KEY'Name In Type Required Default / Enum Description idpath stringrequired next_tokenquery stringoptional modequery stringoptional ids | profiles limitquery integeroptional default: 200 Supported only when mode=ids.
Response Example Schema Copy
{
"data": [
{
"id": "783214",
"username": "xfetch",
"name": "xfetch",
"description": "Developer-facing X/Twitter data API.",
"created_at": "2024-01-01T00:00:00.000Z",
"verified": false,
"protected": false,
"profile_image_url": "https://example.com/avatar.png",
"follower_count": 12000,
"following_count": 18,
"tweet_count": 240
}
],
"meta": {
"request_id": "req_01HXFETCHEXAMPLE",
"credits": {
"charged": 2,
"remaining": 998
},
"pagination": {
"next_token": "tok_2"
}
}
}GET /v1/search/recent/enrichedEnriched Reads 2 base + 2 per item # Search recent tweets and return matching tweets plus deduped authors; join via `tweet.author_id`.
cURL Node Python Copy
curl 'https://api.xfetch.io/v1/search/recent/enriched?query=xfetch' \
-H 'Authorization: Bearer $XFETCH_API_KEY'Name In Type Required Default / Enum Description queryquery stringrequired limitquery integeroptional default: 20 Page size for search-backed results. next_tokenquery stringoptional
Response Example Schema Copy
{
"data": {
"tweets": [
{
"id": "1234567890123456789",
"text": "xfetch ships /v1 today.",
"author_id": "783214",
"created_at": "2026-05-23T12:00:00.000Z",
"lang": "en",
"like_count": 5,
"retweet_count": 1,
"reply_count": 0,
"quote_count": 0,
"bookmark_count": 0,
"is_quote_status": false,
"entities": {
"hashtags": [],
"urls": [],
"mentions": []
}
}
],
"authors": [
{
"id": "783214",
"username": "xfetch",
"name": "xfetch",
"description": "Developer-facing X/Twitter data API.",
"created_at": "2024-01-01T00:00:00.000Z",
"verified": false,
"protected": false,
"profile_image_url": "https://example.com/avatar.png",
"follower_count": 12000,
"following_count": 18,
"tweet_count": 240
}
]
},
"meta": {
"request_id": "req_01HXFETCHEXAMPLE",
"credits": {
"charged": 4,
"remaining": 996
},
"pagination": {
"next_token": "tok_2"
}
}
}Workflow APIs GET /v1/profiles/{id} Workflow APIs 2 base + 1 per item # Aggregate one user and their recent tweets in a single workflow call.
cURL Node Python Copy
curl 'https://api.xfetch.io/v1/profiles/783214' \
-H 'Authorization: Bearer $XFETCH_API_KEY'Name In Type Required Default / Enum Description idpath stringrequired
Response Example Schema Copy
{
"data": {
"user": {
"id": "783214",
"username": "xfetch",
"name": "xfetch",
"description": "Developer-facing X/Twitter data API.",
"created_at": "2024-01-01T00:00:00.000Z",
"verified": false,
"protected": false,
"profile_image_url": "https://example.com/avatar.png",
"follower_count": 12000,
"following_count": 18,
"tweet_count": 240
},
"recent_tweets": [
{
"id": "1234567890123456789",
"text": "xfetch ships /v1 today.",
"author_id": "783214",
"created_at": "2026-05-23T12:00:00.000Z",
"lang": "en",
"like_count": 5,
"retweet_count": 1,
"reply_count": 0,
"quote_count": 0,
"bookmark_count": 0,
"is_quote_status": false,
"entities": {
"hashtags": [],
"urls": [],
"mentions": []
}
}
]
},
"meta": {
"request_id": "req_01HXFETCHEXAMPLE",
"credits": {
"charged": 3,
"remaining": 997
}
}
}GET /v1/profiles/by-username/{username} Workflow APIs 2 base + 1 per item # Aggregate one user (by username) and their recent tweets in a single workflow call.
cURL Node Python Copy
curl 'https://api.xfetch.io/v1/profiles/by-username/xfetch' \
-H 'Authorization: Bearer $XFETCH_API_KEY'Name In Type Required Default / Enum Description usernamepath stringrequired
Response Example Schema Copy
{
"data": {
"user": {
"id": "783214",
"username": "xfetch",
"name": "xfetch",
"description": "Developer-facing X/Twitter data API.",
"created_at": "2024-01-01T00:00:00.000Z",
"verified": false,
"protected": false,
"profile_image_url": "https://example.com/avatar.png",
"follower_count": 12000,
"following_count": 18,
"tweet_count": 240
},
"recent_tweets": [
{
"id": "1234567890123456789",
"text": "xfetch ships /v1 today.",
"author_id": "783214",
"created_at": "2026-05-23T12:00:00.000Z",
"lang": "en",
"like_count": 5,
"retweet_count": 1,
"reply_count": 0,
"quote_count": 0,
"bookmark_count": 0,
"is_quote_status": false,
"entities": {
"hashtags": [],
"urls": [],
"mentions": []
}
}
]
},
"meta": {
"request_id": "req_01HXFETCHEXAMPLE",
"credits": {
"charged": 3,
"remaining": 997
}
}
}/2 compatibility /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/recentGET /2/tweets/search/recentUser by username GET /v1/users/by-username/:usernameGET /2/users/by/username/:usernameUser by id GET /v1/users/:idGET /2/users/:idUsers by ids GET /v1/users?ids=...GET /2/users?ids=...User tweets GET /v1/users/:id/tweetsGET /2/users/:id/tweetsFollowers GET /v1/users/:id/followers?mode=idsGET /2/users/:id/followersFollowing GET /v1/users/:id/following?mode=idsGET /2/users/:id/followingTweet by id GET /v1/tweets/:idGET /2/tweets/:idTweets by ids GET /v1/tweets?ids=...GET /2/tweets?ids=...Quote tweets GET /v1/tweets/:id/quotesGET /2/tweets/:id/quote_tweetsRetweeters GET /v1/tweets/:id/retweetersGET /2/tweets/:id/retweeted_byList tweets GET /v1/lists/:id/tweetsGET /2/lists/:id/tweetsList members GET /v1/lists/:id/membersGET /2/lists/:id/membersList subscribers/followers GET /v1/lists/:id/subscribersGET /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.