Social Data API

X API - Search

X search API

Search X posts by keyword as JSON with one call. $0.003 a call. Search is a top X use case and the official API charges per post read.

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

A phone home screen showing social media apps
Photo via Unsplash

Live now

Search X posts by keyword and get the results as JSON. Search is one of the top X use cases: brand monitoring, trend tracking, finding what people say about a product, or building a research dataset.

On the official X API, every post your search returns costs $0.005 to read. Here, one search call costs $0.003 and returns a page of matching posts.

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/search \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "coffee"}'

Search takes query (required, keyword also accepted), search_type (default Top) and an optional cursor for more results. One call costs 1 credit.

What you get back

{
  "platform": "x",
  "endpoint": "x.search",
  "credits_used": 1,
  "upstream_cost_usd_per_call": 0.001,
  "key_id": "...",
  "plan_type": "monthly_29",
  "result": { "...": "upstream search 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 matching 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; $0.15 per 1,000 posts at 20 per callOne call, one page of results.
X API (official)$0.005 per post read, $5.00 per 1,000 (confirmed by 5+ checks Sept-Oct 2026)Search is charged per post read, not per search.
Social Fetch$29/mo, $1.61 per 1,000 requests (verified live 2026-11-08)Per-endpoint docs, cheaper per call than ours.

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

What search types are there?

The search_type field defaults to Top, which returns the most relevant posts first. Pass a different search_type value for other orderings.

How do I page through search results?

Pass the cursor from the last response. Each page costs 1 credit.

Does search cover all of X or only recent posts?

Search returns matching public posts. Use the cursor to page through more results. For a full historical archive, run repeated searches with different queries.

How much are 1,000 search results?

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.