Social Data API

X API - User posts

X user posts API

Get any X user's posts as JSON with one call by handle. No ID lookup step. $0.003 a call, one page of posts per call.

By the Social Data API team · November 8, 2026 · 2 min read

A hand holding a phone showing an app dashboard, with a laptop behind it
Photo via Unsplash

Live now

Get any X user's posts as JSON with one call, by handle. No numeric ID lookup step: the official X API needs username to ID to timeline, two calls, and charges $0.005 per post read. Here you pass the handle, you get the timeline, one call, $0.003.

Use it for creator tracking, social listening, research datasets, or feeding an AI agent the latest posts from an account.

The call

One API key works for every endpoint below. Send your key in the x-api-key header.

curl -X POST https://social-data-api.chideraezeudu2.workers.dev/v1/x/posts \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"username": "example_handle"}'

Posts takes username (handle, without @) or user_id (numeric X user id) and an optional cursor for older posts. One call costs 1 credit, including posts by username.

What you get back

{
  "platform": "x",
  "endpoint": "x.posts",
  "credits_used": 1,
  "upstream_cost_usd_per_call": 0.001,
  "key_id": "...",
  "plan_type": "monthly_29",
  "result": { "...": "upstream post list data" }
}

Response shape, example values only, not real data. Every response uses this wrapper. The result field holds the upstream provider's data, in its own shape. credits_used tells you what the call cost.

What it costs

  • Pay as you go: $0.003 a call, $3.00 per 1,000 calls.
  • Basic $29/mo: 10,000 calls included, $2.90 per 1,000 calls.
  • Per 1,000 posts: one call returns a page of posts, typically around 20, so $0.15 per 1,000 posts on pay as you go. The official X API charges $5.00 per 1,000 post reads.
  • Plans: X is on paid plans only. The free trial covers TikTok only.

How it compares

OptionPriceNotes
Social Data API$0.003 a call by handle; $0.15 per 1,000 posts at 20 per callOne call, no ID lookup step.
X API (official)$0.005 per post read, $5.00 per 1,000 (confirmed by 5+ checks Sept-Oct 2026)Needs username to ID lookup first, two calls to get a timeline.
ToolzerHub5 credits per 20 posts (per Oct 2026 roundups, re-verify)Already does job plus call plus price on one page.
TwitterAPIs$0.0008 a call (per Oct 2026 roundups, re-verify)Cheaper per call. X only, per-call billing.

How it works

  1. Get one API key from the Social Data API dashboard. The same key works for TikTok, X, Instagram and Reddit.
  2. Send the call above with your key in the x-api-key header.
  3. Use the JSON. List endpoints take count (default 20 results per call, max 50) and cursor for the next page.

Frequently asked questions

Do I need the numeric user ID?

No. Pass the handle as username and the endpoint resolves it. If you already have the numeric user id, pass user_id instead, same price.

How many posts does one call return?

One page of posts, typically around 20. Use the cursor to get older posts.

How do I get older posts?

Pass the cursor from the last response. Each page costs 1 credit, the same as the first call.

How much do 1,000 posts cost?

About 50 calls at 20 posts per call, which is $0.15 on pay as you go. The official X API charges $5.00 for the same 1,000 post reads.

X is on paid plans: Basic $29/mo for 10,000 calls, Pro $99/mo for 50,000 calls, or pay-as-you-go at $0.003 a call. The free trial covers TikTok only, so a trial key gets a 402 on X. Get your API key or try it in the Playground.

Prices checked on 2026-11-08. Instagram is next after X, then Reddit, all on the same single API key.