GetXAPI

Overview

GetXAPI API documentation. The cheapest Twitter/X API — 53 endpoints from $0.001/call, ~20 results per call. Get started in minutes with code examples.

GetXAPI API Reference

The cheapest Twitter/X API with 53 endpoints starting at $0.001 per call. No rate limits, no OAuth complexity — just a simple REST API with your API key.

Get your API key →

Try it without code

Three ways to explore every endpoint interactively — pick whichever you already use:

Run In PostmanView on Fern

Use it in Claude, Cursor & any MCP client

GetXAPI ships an official Model Context Protocol server — point your AI assistant at it and the full Twitter/X API becomes native tools (search tweets, look up users, read followers, post tweets, send DMs, publish articles).

Add it to your MCP client config (Claude Desktop, Cursor, Windsurf, etc.):

{
  "mcpServers": {
    "getxapi": {
      "command": "npx",
      "args": ["-y", "@getxapi/mcp@latest"],
      "env": { "GETXAPI_KEY": "YOUR_API_KEY" }
    }
  }
}

Read tools need only your GETXAPI_KEY; write tools (post, like, DM, etc.) additionally use your X account auth.

Quick Start

Base URL

https://api.getxapi.com

Authentication

All requests require an API key passed as a Bearer token in the Authorization header.

curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.getxapi.com/twitter/user/info?userName=elonmusk"

Example: Get a User Profile

curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.getxapi.com/twitter/user/info?userName=elonmusk"
const response = await fetch(
  "https://api.getxapi.com/twitter/user/info?userName=elonmusk",
  {
    headers: { Authorization: "Bearer YOUR_API_KEY" },
  }
);
const data = await response.json();
console.log(data);
import requests

response = requests.get(
    "https://api.getxapi.com/twitter/user/info",
    params={"userName": "elonmusk"},
    headers={"Authorization": "Bearer YOUR_API_KEY"},
)
print(response.json())

Example: Search Tweets

curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.getxapi.com/twitter/tweet/advanced_search?q=from:elonmusk&product=Latest"
const response = await fetch(
  "https://api.getxapi.com/twitter/tweet/advanced_search?q=from:elonmusk&product=Latest",
  {
    headers: { Authorization: "Bearer YOUR_API_KEY" },
  }
);
const data = await response.json();
console.log(data.tweets);
import requests

response = requests.get(
    "https://api.getxapi.com/twitter/tweet/advanced_search",
    params={"q": "from:elonmusk", "product": "Latest"},
    headers={"Authorization": "Bearer YOUR_API_KEY"},
)
print(response.json()["tweets"])

Endpoint Index

Tweets

EndpointMethodPathCost
Advanced SearchGET/twitter/tweet/advanced_search$0.001
Tweet DetailGET/twitter/tweet/detail$0.001
Tweet ThreadGET/twitter/tweet/thread$0.005
Tweet RepliesGET/twitter/tweet/replies$0.001
Tweet RetweetersGET/twitter/tweet/retweeters$0.001
Create TweetPOST/twitter/tweet/create$0.002
Like TweetPOST/twitter/tweet/favorite$0.001
RetweetPOST/twitter/tweet/retweet$0.001

Articles

EndpointMethodPathCost
Get ArticleGET/twitter/article/get$0.001
Create ArticlePOST/twitter/article/create$0.01
Update ArticlePOST/twitter/article/update$0.005
List ArticlesPOST/twitter/article/list$0.005
Publish ArticlePOST/twitter/article/publish$0.005
Unpublish ArticlePOST/twitter/article/unpublish$0.005
Delete ArticlePOST/twitter/article/delete$0.005

Users

EndpointMethodPathCost
Search UsersGET/twitter/user/search$0.001
User InfoGET/twitter/user/info$0.001
User Info by IDGET/twitter/user/info_by_id$0.001
User AboutGET/twitter/user/user_about$0.001
User TweetsGET/twitter/user/tweets$0.001
User Tweets & RepliesGET/twitter/user/tweets_and_replies$0.001
User Tweets CompleteGET/twitter/user/tweets/complete$0.003
User MediaGET/twitter/user/media$0.001
User LikesPOST/twitter/user/likes$0.001
FollowersGET/twitter/user/followers$0.001
Followers v2GET/twitter/user/followers_v2$0.001
FollowingGET/twitter/user/following$0.001
Following v2GET/twitter/user/following_v2$0.001
Verified FollowersGET/twitter/user/verified_followers$0.001
Followers You KnowPOST/twitter/user/followers_you_know$0.001
Check RelationshipGET/twitter/user/check_follow_relationship$0.001
Follow UserPOST/twitter/user/follow$0.001
Unfollow UserPOST/twitter/user/unfollow$0.001
Home TimelinePOST/twitter/user/home_timeline$0.001
Bookmark SearchPOST/twitter/user/bookmark_search$0.001
User AffiliatesGET/twitter/user/affiliates$0.001
User LoginPOST/twitter/user_login$0.01

Lists

EndpointMethodPathCost
List MembersGET/twitter/list/members$0.001

Direct Messages

EndpointMethodPathCost
Send DMPOST/twitter/dm/send$0.002
List DMsPOST/twitter/dm/list$0.002

Media

EndpointMethodPathCost
Upload MediaPOST/twitter/media/upload$0.001

Community

EndpointMethodPathCost
Join CommunityPOST/twitter/community/join$0.002

Account

EndpointMethodPathCost
Account InfoGET/account/meFree
Payment HistoryGET/account/paymentsFree

Pagination

All list endpoints support cursor-based pagination:

  • Omit cursor for the first page
  • Pass next_cursor from the response for subsequent pages
  • Each page typically returns ~20 items
  • Some endpoints (followers/following v1) return up to 200 per page
  • The v2 variants (followers_v2/following_v2) return ~70 per page
  • Keep paginating until has_more is false

Error Codes

StatusMeaningCommon Cause
400Bad RequestMissing required parameter
401UnauthorizedInvalid or missing API key / auth token
404Not FoundUser or tweet does not exist
429Rate LimitedToo many requests (rare — GetXAPI has generous limits)
502Bad GatewayTwitter rejected the mutation (write endpoints)

All errors return a JSON body with an error field:

{
  "error": "Missing required query param: userName"
}

Pricing

Most read endpoints cost $0.001 per call. User Tweets Complete costs $0.003 per call, Tweet Thread costs $0.005 per call, and DM endpoints cost $0.002 per call. No monthly fees, no rate limits — pay only for what you use.

View full pricing →

On this page