X (Twitter) Profile API
Send a username and get the public X (formerly Twitter) profile back as JSON: exact follower counts, the bio and the verified badge, and the latest posts (formerly tweets) with their views, likes and reposts.
- 100 free credits
- No card needed
- No scraper to build or maintain
curl "https://pipefetch.com/v1/x/profile?username=nasa&limit=10" \
-H "x-api-key: YOUR_API_KEY"const res = await fetch('https://pipefetch.com/v1/x/profile?username=nasa&limit=10', {
headers: { 'x-api-key': process.env.PIPEFETCH_API_KEY },
});
const { data, credits } = await res.json();import os, requests
res = requests.get(
"https://pipefetch.com/v1/x/profile",
params={"username": "nasa", "limit": 10},
headers={"x-api-key": os.environ["PIPEFETCH_API_KEY"]},
)
data = res.json()["data"]What you get
- Exact follower, following, post and list counts
- Name, bio, location, website, join date, verified badge, profile picture and banner
- Up to 20 of the latest posts, each with its text, link, time and language
- Exact view, like, repost, reply, quote and bookmark counts for each post
- Hashtags, mentions and expanded links, image addresses and playable video addresses
- For a repost, the account it came from and the numbers of the original post
{
"data": {
"profile": {
"id": "11348282",
"username": "NASA",
"url": "https://x.com/nasa",
"displayName": "NASA",
"description": "Making the seemingly impossible, possible. ✨",
"location": "Pale Blue Dot",
"website": "http://www.nasa.gov/",
"isVerified": true,
"isProtected": false,
"followerCount": 92211040,
"followingCount": 115,
"postCount": 74560,
"listedCount": 96877,
"createdAt": "2007-12-19T20:20:32.000Z",
"profileImageUrl": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_normal.jpg",
"bannerUrl": "https://pbs.twimg.com/profile_banners/11348282/1788992290"
},
"posts": [
{
"id": "2123169377855922254",
"url": "https://x.com/nasa/status/2123169377855922254",
"text": "A successful stellar merger 🤝\n\nScientists recently spotted a star slightly less massive than the Sun merging into a puffy supergiant star in the outs…",
"createdAt": "2026-11-18T21:40:00.000Z",
"language": "en",
"isRepost": false,
"repostedFrom": null,
"isQuote": false,
"likeCount": 4247,
"repostCount": 656,
"replyCount": 134,
"quoteCount": 43,
"bookmarkCount": 261,
"viewCount": 562309,
"hashtags": [],
"mentions": [],
"links": [
"https://go.nasa.gov/492jZad"
],
"mediaType": "photo",
"imageUrls": [
"https://pbs.twimg.com/media/HXb7dixXQAAIk5w.jpg"
],
"videoUrls": []
},
{
"id": "2123156140288610715",
"url": "https://x.com/nasa/status/2123156140288610715",
"text": "Join us for a @Reddit AMA from the International Space Station!\n\n@astro_anil (in orbit) and @zenanaut (on Earth) are taking your questions about how t…",
"createdAt": "2026-11-18T20:47:24.000Z",
"language": "en",
"isRepost": false,
"repostedFrom": null,
"isQuote": false,
"likeCount": 855,
"repostCount": 85,
"replyCount": 54,
"quoteCount": 8,
"bookmarkCount": 44,
"viewCount": 369731,
"hashtags": [],
"mentions": [
"Reddit",
"astro_anil"
],
"links": [
"https://www.reddit.com/r/space/"
],
"mediaType": "photo",
"imageUrls": [
"https://pbs.twimg.com/media/HXb3QZUW8AAmr-Z.jpg"
],
"videoUrls": []
}
]
},
"credits": {
"used": 1,
"remaining": 99
}
}One GET request
Everything the endpoint accepts. The full reference, with the complete example response, is in the docs.
GET/v1/x/profile
Costs 1 credit per request. Only requests that return data are charged.
Parameters
| Name | Type | Description |
|---|---|---|
usernamerequired |
string | Username (nasa), handle (@nasa) or profile URL on x.com or twitter.com. |
limitoptional |
integer | How many of the latest posts to return. Default: 20. From 1 to 20. |
Good to know
- Follower, following, post and list counts are the exact numbers, not the rounded ones X displays (92.2M).
- posts holds up to 20 of the latest posts, in the order of the account's timeline. There are no further pages, and replies are not included.
- A repost carries the text, counts, media and time of the original post, and repostedFrom names the account it came from.
- A protected account returns its profile with isProtected true and no posts.
- An account that does not exist or is suspended answers 404 profile_not_found and costs nothing.
What people build with it
Vet a creator or a brand account
Check the exact follower count and how the latest posts performed before you agree on a collaboration.
Track accounts over time
Call the endpoint on a schedule and store the counts to see how an account and its posts grow.
Enrich a list of handles
Turn a column of usernames into names, bios, locations, websites and follower counts.
Watch what competitors post
Read the latest posts of the accounts you follow, with the views, likes and reposts each one got.
Buy credits once. Use them whenever.
This endpoint costs 1 credit per request, and a request that returns no data costs nothing. Move the slider to see what your volume costs.
A request costs 1 credit. Requests that return nothing are free.
- $2.42 per 1,000 credits
- About $12.08 a month at this pace
- Lasts about 2.4 months at this pace
- Credits never expire
Questions and answers
Is this the official X API?
No. Pipefetch is an independent service and is not affiliated with X or Twitter. It reads public X profiles without logging in, so you need no X account, developer plan or access token: one Pipefetch API key is enough.
How many posts do I get?
Up to 20, set with limit: the latest posts of the account, in the order of its timeline. There are no further pages, so this is a recent sample and not the full history.
What do I get for a repost?
The text, counts, media and time of the original post, with isRepost true and repostedFrom naming the account it came from. X used to call a repost a retweet.
Can I get replies, lists of followers or older posts?
No. This endpoint returns the profile and its latest posts. Replies the account wrote, the replies under a post, the lists of followers and of accounts followed, and posts further back than the latest 20 are not available.
What happens with protected, suspended or missing accounts?
A protected account returns its profile with isProtected true and no posts, because X shows those only to approved followers. An account that does not exist or is suspended answers 404 profile_not_found and costs nothing.
What does a request cost?
One request costs 1 credit, whatever the limit. Credit packs start at $9 for 3,000 credits, never expire, and a request that returns no data is not charged. New accounts get 100 free credits without a card.
Does a profile contain personal data?
Yes, when the account belongs to a person. If you store or process profiles and posts, data-protection law such as the GDPR applies to you as it would to any other source, and our terms forbid using the API to harass people or to build profiles of private individuals.
Step-by-step guides
Free tools for the same data
X (Twitter) engagement rate calculator
Type in the views, likes, reposts and replies of recent posts to get the engagement rate by views and by followers, with the sum behind each.
Open the toolX API cost calculator
Type in how many accounts you read, how often and how many posts each time, and get the monthly cost at X's API prices and the reads against X's cap.
Open the tool
Other sources
YouTubeInstagramWebsitesTikTokFacebookGoogleThreadsLinkedInApp storesSteamPinterestAirbnbReal estateKeywordsJob boardsEventbriteShopify storesPublic tenders
Make your first request in a minute
Sign in, copy your key and call an endpoint. Your account starts with 100 free credits.