X (Twitter)+API.SH

X (Twitter) API

Public X (Twitter) profiles, recent tweets, highlights, communities and video transcripts as JSON, without an X developer account.

The API.SH X API, still searched as the Twitter API, returns public X data as JSON. A profile gives name, bio, location, website, join date, follower, following, tweet, like and media counts, verification type and pinned tweet ids. An account's recent tweets and its profile highlights come with text, language, likes, retweets, replies, quotes, bookmarks and views, plus hashtags, mentions, links, media and the tweet each one replies to or quotes. One tweet can be read by URL or id, with media, card and edit history, and the video in a post can be turned into a timestamped transcript with its video variants. Communities return name, description, member count, rules, moderators and trending hashtags, and the community's tweets have their own route.

  • 7 endpoints
  • from $1 / 1,000 calls
  • 1,000 free credits / month
  • failed calls free
X profile
GET https://api.api.sh/twitter/v1/profile
{"id": "11348282","username": "NASA","name": "NASA","url": "https://x.com/NASA","bio": "Making the seemingly impossible, possible. ✨","location": "Pale Blue Dot","website": "http://www.nasa.gov/","created_at": "Wed Dec 19 20:20:32 +0000 2007","followers": 92290430,"following": 115,"tweets": 74490,"likes": 17060,"media": 28224,"listed": null,"verified": true,"verified_type": "Government","avatar": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_400x400.jpg","banner": "https://pbs.twimg.com/profile_banners/11348282/1788992290","protected": false,"pinned_tweet_ids": [],"birthdate": "1958-10-1","avatar_original": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB.jpg","bio_urls": [],"website_display": "nasa.gov","website_short_url": "https://t.co/9NkQJKAnuU","media_tweets": 28224,"graphql_id": "VXNlcjoxMTM0ODI4Mg==","profile_image_shape": "Square","bio_language": "en","verified_legacy": false,"identity_verified": false,"verified_since": "2009-08-07T19:53:50.941Z","verification_reason": "This account is verified because it is a government or multilateral organization account.  Learn more","affiliate_label": null,"business_affiliates": 85,"highlighted_tweets": 289,"creator_subscriptions": 0,"parody_label": null,"possibly_sensitive": false,"professional": null,"…": "6 more fields","cached": false,"credits_used": 1}
1 credit · $1 per 1,000 calls

What you can build with the X (Twitter) API

Account monitoring

Log follower, following and tweet counts from /twitter/v1/profile every day, and pull new posts with /twitter/v1/user/tweets (count, cursor) to track what a brand, newsroom or competitor publishes and how each post performs.

Post-level reporting

/twitter/v1/tweet takes a post URL and returns its likes, replies, author details, media, links and edit history, so earned-media and campaign reports can show the numbers behind each link a client sends.

Video to text

/twitter/v1/tweet/transcript transcribes the video in a post into text with timed segments and returns the MP4 variants by bitrate, for quoting clips, captioning or passing them to an LLM.

Community research

/twitter/v1/community gives member count, rules, join policy and trending hashtags, and /twitter/v1/community/tweets returns the posts, to study niche groups around crypto, gaming or developer tools.

Creator checks before a sponsorship

Read the posts a creator chose to feature with /twitter/v1/user/highlights, along with verified_type, affiliate label and follower count from the profile, before you agree a paid post.

X (Twitter) data you get

Field names from real responses. Numbers come parsed, URLs absolute, dates in ISO 8601.

X community/twitter/v1/community
id1926186499399139650urlhttps://x.com/i/communities/1926…nameThe First ThousanddescriptionThis community is for creators a…members5629created_at2025-05-24T08:00:22.931Zjoin_policyOpennsfwfalsebannerhttps://pbs.twimg.com/community_…graphql_idQ29tbXVuaXR5OjE5MjYxODY0OTkzOTkx…roleNonMemberis_memberfalsebanner_width1250banner_height500default_bannerhttps://pbs.twimg.com/media/FECS…creator_verifiedtrue
creator[]username
rules[]name · description
banner_colors[]percentage · rgb
X community tweets/twitter/v1/community/tweets
id1926186499399139650sorttopcount20
tweets[]id · url · text · created_at · lang · likes · retweets · replies · quotes · bookmarks · views · author
X profile/twitter/v1/profile
id11348282usernameNASAnameNASAurlhttps://x.com/NASAbioMaking the seemingly impossible,…locationPale Blue Dotwebsitehttp://www.nasa.gov/created_atWed Dec 19 20:20:32 +0000 2007followers92290430following115tweets74490likes17060media28224verifiedtrueverified_typeGovernmentavatarhttps://pbs.twimg.com/profile_im…bannerhttps://pbs.twimg.com/profile_ba…protectedfalse

X (Twitter) API endpoints and prices

Every X (Twitter) endpoint costs 1 credit per call: credits are $1 per 1,000 on a monthly plan, $2 pay-as-you-go. Pricing

Profiles and accounts3
X profile
/twitter/v1/profile
params usernamedocstry
$1 · $2 PAYG
1 credit
X user highlights
/twitter/v1/user/highlights
params username +2 optionaldocstry
$1 · $2 PAYG
1 credit
X user tweets
/twitter/v1/user/tweets
params username +5 optionaldocstry
$1 · $2 PAYG
1 credit
Posts and media3
X community tweets
/twitter/v1/community/tweets
params iddocstry
$1 · $2 PAYG
1 credit
One tweet
/twitter/v1/tweet
params urldocstry
$1 · $2 PAYG
1 credit
X video transcript
/twitter/v1/tweet/transcript
params urldocstry
$1 · $2 PAYG
1 credit
More data1
X community
/twitter/v1/community
params iddocstry
$1 · $2 PAYG
1 credit

Call the X (Twitter) API

X profile: GET https://api.api.sh/twitter/v1/profile

curl "https://api.api.sh/twitter/v1/profile?username=nasa" \
  -H "x-api-key: $APISH_KEY"
  1. Create a free accountConfirm your email and get 1,000 free credits every month. No card needed.
  2. Create an API keyOne key works for all 918 platforms.
  3. Send the requestJSON back in one call. Add output=csv or output=ndjson for files.

Why API.SH for X (Twitter) data

  • Public data only: no X (Twitter) login, cookies or account needed
  • One key and one response shape for X (Twitter) and 917 other platforms
  • Built and maintained by API.SH, not third-party publishers
  • Pay per call; errors on our side cost nothing
  • No rate limits: run as many calls in parallel as you need
  • Live status for every endpoint

API.SH vs the official X (Twitter) API

X's official API (formerly the Twitter API) needs a developer account, a project and app keys, and reading posts is billed under X's paid access, whose plans and prices X has changed several times. API.SH needs no X developer account and bills public profile and tweet reads from your API.SH balance.

Open-source Twitter scrapers such as snscrape stopped working when X changed its site, and tools like twscrape need X accounts to sign in with; Apify's Twitter actors are priced per result. API.SH covers public profiles, recent tweets, tweets by URL and communities from one key.

X (Twitter) API questions

What X (Twitter) data can I get?+

Profiles: /twitter/v1/profile with counts, bio, website and verification. Tweets: an account's recent tweets (/twitter/v1/user/tweets), its profile highlights, any single tweet by URL or id, and a transcript of a tweet's video. Communities: details and rules (/twitter/v1/community) and the community's tweets. Keyword search, follower lists and likes are not part of the X routes.

How much does the X API cost here?+

Every X (Twitter) endpoint costs 1 credit per call. On a monthly plan 1,000 credits cost $1 (Starter is $50/month for 50,000 credits). Pay-as-you-go is $2 per 1,000 credits, with top-ups from $15 that never expire.

Is there a free Twitter API?+

Yes. Every account gets 1,000 free credits every month. That is 1,000 calls to /twitter/v1/community at 1 credit each.

Is there an official X API?+

Yes. X runs the X API (v2) through its developer portal. You need a developer account and app keys, and read access is paid; X has revised its plans and prices several times, so check its developer site for current terms. API.SH is an alternative for reading public profiles and tweets with one key and no X app.

How do I get an X (Twitter) API key?+

From X, you sign up in the developer portal, create a project and app, and generate keys and a bearer token. For the public data on this page you only need an API.SH key: sign up at api.sh and copy it from the dashboard.

Do I need an X account to use it?+

No. You never sign in to X, and nothing is posted, liked or followed. Protected accounts and anything X hides from logged-out visitors are not returned.

How many tweets can I get from a user?+

/twitter/v1/user/tweets returns the recent tweets X serves to logged-out visitors, in pages sized with count; pass next_cursor back as cursor. It is not a full archive of an account's older posts.

Can I get the transcript of an X video?+

Yes. /twitter/v1/tweet/transcript with the post URL returns the spoken text, timed segments, language and duration, plus the MP4 variants of the video by bitrate.

Can I use the X API from Python?+

Yes. GET https://api.api.sh/twitter/v1/user/tweets?username=nasa&count=20 with the x-api-key header, through the Python SDK or requests; there are no OAuth signatures or bearer tokens.

How do I get started?+

Sign up at api.sh, copy your key, then open /twitter/v1/profile?username=nasa. The full reference is at https://api.sh/docs, and the JS and Python SDKs, Google Sheets, Zapier, Make, n8n and the MCP server at https://api.sh/mcp all call the same X routes.

Does the X (Twitter) API have a rate limit?+

No. API.SH puts no rate limit on your key: send as many X (Twitter) calls in parallel as you need and pay only for the calls that run. If X (Twitter) itself slows down, the call returns 503 with a retry-after header and is not charged.

More social APIs all social media APIs →

Start with 1,000 free credits
Every month, on every account. One key works for all 918 platforms.
Get a free API key