X API Alternative: Public Profile Data (2026)
Last updated: .
Use the official X API when you need the live stream, search across posts, or to act as an account: posting, replying, reading your own analytics. Use a public data read when you need the public numbers of any public account, the follower count and the posts with their likes, views, replies and reposts, without a developer account or a monthly plan. SocialLens (sociallens.dev) is the second kind: one GET request and one API key return those numbers for any public X profile. It cannot stream, it cannot search by keyword and it cannot post. Some products need both.
We run SocialLens (sociallens.dev), so read this as a vendor's comparison. The statements about the official X API come from X's developer documentation and pricing page, read on November 30, 2026, and X changes both often. We did not run the official endpoints, because they need a paid developer account. Check the current terms on X's own pages before you build.
Official API or public read: at a glance
| X API (v2) | SocialLens (sociallens.dev) | |
|---|---|---|
| Built for | Streaming, search and acting as an account | Reading the public numbers of any public account |
| Who has to agree | You accept the developer terms and pay | Nobody. The data is the public profile |
| Setup before the first call | A developer account, an app, keys and a paid plan | One API key |
| Access | Pay per usage with a monthly read cap, plus legacy fixed tiers | 250 free reads, then prepaid credits |
| Follower count of any account | Yes, within your plan's read cap | Yes |
| Post metrics: likes, reposts, replies, views | Yes | Yes |
| Live stream of posts | Yes, the filtered and sampled streams | No |
| Search recent or full-archive posts | Yes, a paid feature | No |
| Posting, replying, acting as the account | Yes | No |
| Credentials | A developer account you keep paid and in policy | A key that does not expire |
| Rate limit | Per endpoint, tied to your plan | 60 requests per minute per key |
| Other networks | X only | The same request on 8 more networks |
| Price | Pay per usage, see X's pricing page; Enterprise is a custom deal | $1.66 to $2.38 per 1,000 reads, 250 free |
What the X API needs before the first call
From X's developer platform and pricing page, read on November 30, 2026:
- A developer account and an app. You sign up, accept the terms and create an app to get keys.
- A paid plan. X moved to pay-per-usage pricing, charged on what your app actually reads, with a monthly cap on post reads. The older fixed tiers, Basic and Pro, are being wound down for existing subscribers, and Enterprise is a custom contract that starts in the tens of thousands of dollars a month.
- A read budget. Reads count against your plan, so pulling the follower count and recent posts of many accounts adds up against the cap.
None of this is a flaw. The X API can stream and search the whole network in real time, and that power is what the plan pays for. It is a lot, though, when all you want is the public follower count of a handful of accounts.
The public read: the same question with one key
curl -G "https://api.sociallens.dev/v1/profile" \
--data-urlencode "platform=x" \
--data-urlencode "username=elonmusk" \
-H "Authorization: Bearer sk_live_YOUR_KEY"
Real response, read on November 30, 2026, with the avatar, the cache flags and the fields that came back empty left out:
{
"exists": true,
"username": "elonmusk",
"platform": "x",
"nickname": "Elon Musk",
"verified": true,
"private": false,
"followers": 239430232,
"is_exact": true,
"following": 1429,
"videos": 113191,
"id": "44196397",
"created_at": "2009-06-02T20:12:29Z",
"fetched_at": "2026-11-30T11:23:45Z"
}
Three field names read differently on X, because the schema is shared with the other networks:
followersis the follower count, exact, withis_exacttrue.videosis the total number of posts the account has published, 113,191 here, not a video count.likeson the profile comes back null on X, because the public profile does not publish a lifetime like total. Per-post likes are in the post read below.idis the stable numeric account id. It does not change when the handle changes, so store it, not the handle.
Reading a post: likes, views, replies and reposts
/v1/profile-posts and /v1/post return each post with its public counters.
curl -G "https://api.sociallens.dev/v1/profile-posts" \
--data-urlencode "platform=x" \
--data-urlencode "username=elonmusk" \
--data-urlencode "limit=1" \
-H "Authorization: Bearer sk_live_YOUR_KEY"
{
"url": "https://x.com/elonmusk/status/...",
"caption": "...",
"likes": 632286,
"views": 38100018,
"comments": 42356,
"shares": 62143,
"likes_hidden": false
}
On X, comments is the reply count, shares is the repost count and views is the public view count. The same four numbers come back for any public post by URL through /v1/post.
Python: follower count and posts of any handle
import os
import requests
API = "https://api.sociallens.dev/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['SOCIALLENS_KEY']}"}
def read(endpoint, **params):
r = requests.get(f"{API}/{endpoint}", params=params, headers=HEADERS, timeout=90)
r.raise_for_status()
return r.json()
def account(handle):
p = read("profile", platform="x", username=handle)
if not p["exists"]:
return f"@{handle} does not exist"
return f"@{p['username']}: {p['followers']} followers, {p['videos']} posts, verified {p['verified']}"
print(account("elonmusk"))
Real output:
@elonmusk: 239430232 followers, 113191 posts, verified True
Node: one read, with the empty and missing cases handled
// Usage: node xprofile.mjs elonmusk
const username = process.argv[2];
const url = new URL("https://api.sociallens.dev/v1/profile");
url.search = new URLSearchParams({ platform: "x", username });
const res = await fetch(url, { headers: { Authorization: `Bearer ${process.env.SOCIALLENS_KEY}` } });
const body = await res.json();
if (res.status !== 200) {
console.log(`HTTP ${res.status} ${body.error}: not charged`);
} else if (!body.exists) {
console.log(`@${username} does not exist`);
} else {
console.log(`@${body.username}: ${body.followers} followers, ${body.videos} posts`);
}
A handle that does not exist comes back as a 200 with exists: false, which costs one read. Error statuses cost nothing.
What only the X API can do
- The live stream. The filtered and sampled streams deliver posts as they are published. No public read does that.
- Search. Recent and full-archive search across posts by keyword, which a public read does not offer.
- Acting for the account. Posting, replying and reading your own account's private analytics.
- A first party contract. The data comes from X, under X's terms, within your plan.
What a public read does that the X API plan does not
- No developer account and no monthly plan. There is nothing to subscribe to, keep paid or keep in policy.
- Pay as you go. Prepaid credits that do not expire, from a $19 pack, instead of a monthly read cap.
- Explicit answers for missing and private accounts. A 200 with
exists: falseorprivate: true, and a free error otherwise. - Other networks. The same request reads TikTok, Instagram, YouTube, Facebook, Threads, LinkedIn and Pinterest, with the same fields.
Which one to use
Use the X API if:
- You need the live stream or search across posts.
- Your product posts, replies or reads your own account's analytics.
- You already run a paid developer plan and your reads fit its cap.
Use a public data read if:
- The accounts never authorized you: competitors, prospects, creators on a list.
- You want the follower count and post metrics of a few accounts without a monthly plan.
- You need the same numbers from other networks in one shape.
Use both if your product streams or searches on the X plan and also shows public numbers for accounts you read occasionally, where a pay-as-you-go read is cheaper than spending the plan's cap.
Cost per 1,000 X follower counts
The X API is priced per usage against a monthly read cap, not per 1,000 follower counts, so it is not directly comparable; check X's pricing page for your plan. Competitor figures below are carried from the latest comparison and should be reconfirmed on each vendor's page before publishing.
| Route | Accounts it reads | What you set up | Cost per 1,000 follower counts |
|---|---|---|---|
| X API (v2) | Any public account, within the cap | A developer account and a paid plan | Pay per usage against a monthly cap, see X's pricing page |
| SocialLens (sociallens.dev) | Any public account, by handle | One API key | $2.38 (Starter, $19 for 8,000), $1.98 (Pro, $79 for 40,000), $1.66 (Scale, $299 for 180,000). 250 free reads |
| SociaVault | Any public account | One API key | $4.83 at the Starter rate, $1.99 on the $399 pack |
| EnsembleData | Any public account | A monthly subscription | $4.44 on the $100 plan when every daily unit is used; its docs price X user info at 2 units |
| Data365 | Public accounts | A contact form and a monthly plan | 5.40 euros on Basic, with a floor of 300 euros a month |
How to read this table:
- The X API is the only route that streams and searches, and its price pays for that. For reading a few public profiles it is a lot of setup and budget.
- For any public account with no plan, prepaid reads start at $19 and the credits do not expire. A thousand counts cost about $2.
- Subscriptions make sense at steady daily volume. For a few thousand reads a month they cost far more per read.
Frequently asked questions
Is there a free X API for reading other accounts?
X's free access is aimed at posting and testing, with very low read limits, so reading other accounts at any volume needs a paid plan. A public data API such as SocialLens (sociallens.dev) reads any public profile with 250 free reads and no developer account.
Can I get an X follower count without the X API?
Yes. A public read returns the follower count of any public X account by handle, with one key and no developer plan. The request is GET /v1/profile?platform=x&username=HANDLE.
Does the public read include post views and reposts?
Yes. Each post comes back with likes, views, comments (replies) and shares (reposts), through /v1/profile-posts and /v1/post.
Can a public data API stream posts or search by keyword?
No. The live stream and keyword search are X API features. A public read answers for accounts and posts you name, and it does not stream, search, or return audience demographics, fraud scoring or identity checks.
Is SocialLens (sociallens.dev) an official X API?
No. It is an independent service that reads public profile data and is not affiliated with X. It reads only what the public profile shows. Whether that fits your use case and your obligations is for you to check.