X (Twitter) hub

X (Twitter) Search API

Keyword search over public posts on X — query in, structured tweet rows out, same envelope as the rest of the Twitter tag.

GET /v1/twitter/search

2 credits per successful request.

About this endpoint

Brand alerts, research crons, and competitive dashboards need keyword hits from X on a schedule. Rolling your own means cookies, opaque cursors, and empty results that look like "no mentions" when the page actually failed.

`GET /v1/twitter/search` takes a required `query` string (native operators like `OR`, quotes, and `-negation` work) and returns matching public posts in the shared Social Fetch envelope. Optional `section` (`top`, `latest`, `people`, `photos`, `videos`), engagement floors (`minLikes`, `minRetweets`, `minReplies`), `startDate` / `endDate` (`YYYY-MM-DD`), `language`, and `limit` (max 20) narrow the page. When `data.page.hasMore` is true, pass `data.page.nextCursor` as `cursor` on the next call. Branch on `data.lookupStatus` before you write rows; bill from `meta.creditsCharged`.

This route is free-text post search. Hashtag-oriented discovery is `GET /v1/twitter/hashtags`. Profile cards are `GET /v1/twitter/profiles/{handle}`. All sit on one Social Fetch API key — no X developer app required for these public lookups.

X (Twitter) Search API FAQ

What does the X / Twitter Search API return?

A page of public posts that match your keyword query under data.tweets, plus pagination under data.page (hasMore, nextCursor). Each response uses the shared Social Fetch envelope with data.lookupStatus, meta.requestId, and meta.creditsCharged.

How do I call Twitter keyword search?

Send GET /v1/twitter/search with x-api-key and a required query parameter. Optionally add section, minLikes, minRetweets, minReplies, startDate, endDate, language, limit, cursor, and trim. Full enums and examples are in the API docs.

How much does Twitter post search cost?

Pricing is documented on the operation in the API registry (shown on this page). Confirm on every response with meta.creditsCharged — that field is the billing source of truth. Most other platform search routes are cheaper; do not assume search is 1 credit on X.

What is the difference between section=latest and section=top?

section picks the search feed style. Use latest for crisis watches and frequent polls; use top for recap-style dashboards. Other values include people, photos, and videos. Omit section to use the default top feed.

Can I filter by engagement, date, or language?

Yes. minLikes, minRetweets, and minReplies set engagement floors. startDate and endDate use YYYY-MM-DD. language accepts documented codes such as en. Combine filters with the same query across paginated pages.

How does pagination work on Twitter search?

When data.page.hasMore is true, pass data.page.nextCursor as the cursor query param on the next request. Keep the same query and filters across pages. Do not invent scroll tokens.

Is this the same as Twitter hashtag search?

No. GET /v1/twitter/search is free-text keyword search over posts. Hashtag-focused discovery is GET /v1/twitter/hashtags. Use the Twitter hub docs if your job needs both.

Do I need an X developer app or Bearer token?

No. You authenticate to Social Fetch with an API key. The route reads public search results; it does not act on behalf of a logged-in X user or require elevated X API access.