Skip to content

How do I search tweets by keyword with an API?

Last updated July 25, 2026

You search tweets by keyword through a hosted REST endpoint that accepts a query string and returns matching posts as clean JSON. On TwitterAPIs the advanced search endpoint takes operators like from, since, until, and exact phrases, and bills $0.0008 per call at about 20 tweets each, which works out to $0.04 per 1,000 tweets. No X developer account and no app review queue.

Every rate here is the pricing TwitterAPIs publishes, $0.0008 per call and $0.04 per 1,000 tweets (source: twitterapis.com/pricing).

What endpoint searches tweets by keyword?

A single advanced search endpoint does the work. You send a GET request with your query string and a bearer token, and the response is structured JSON with the matching tweet text, author, timestamps, and engagement counts already parsed. On TwitterAPIs each standard search call costs $0.0008 and returns about 20 tweets, so a query that scans a few thousand posts runs for a few cents. There is no scraper to maintain and no HTML to normalize, because the result shape is the same on every call.

Which search operators can I use?

The advanced search endpoint accepts the same operators developers know from X search: from and to for accounts, since and until for a date range, quoted strings for an exact phrase, plus hashtag, mention, and language filters. You combine them in one query string, for example a phrase from a specific handle inside a two-week window. Because the operators run server side, you get back only the posts that match, which keeps each $0.0008 call efficient instead of pulling a raw timeline and filtering in your own code.

What does keyword search cost at scale?

The rate is flat at $0.0008 per call regardless of query volume, so a large keyword sweep scales linearly and predictably. Pulling 1 million matching tweets costs about $40 at $0.04 per 1,000; 100,000 costs about $4. There is no monthly minimum and no tier ceiling that throttles a long-running collection job. A $0.50 signup credit lands on every new account with no card required, which covers roughly 625 calls or about 12,500 tweets, enough to test a real keyword pipeline first.

How does this compare to the official X API search?

The official X API recent search returns posts from only the last seven days on standard access, and the Basic tier starts at $200 a month with a fixed read cap. Free scraping libraries read public HTML and break whenever X changes its markup or rate limits. A hosted keyword search at $0.04 per 1,000 tweets sits between them: pay only for the calls you make, get a stable JSON contract, and skip the developer account and application review entirely.

How do I authenticate a search request?

Authentication is a single bearer token passed in the Authorization header. There is no X developer account, no app registration, and no approval queue, so you sign up, copy the key, and send your first search request in under 2 minutes. The same token works across all 37 read endpoints, so once keyword search is wired you can add user timelines, threads, or follower lookups with the same header and the same $0.0008 per call rate.

Ways to search tweets by keyword, compared

MethodCost per 1,000 tweetsHistory windowDeveloper accountReliability
TwitterAPIs advanced search$0.04BroadNoHigh, stable JSON
Official X API recent search$200/mo Basic tier7 days on standardYes, application and reviewHigh
Scraping (snscrape)$0VariesNoLow, breaks on layout change
twitterapi.io$0.15BroadNoHigh
The recent search endpoint returns Tweets from the last seven days that match a search query.
X Developer Platform, recent search documentation. Source

Questions and answers

How do I search tweets by an exact phrase?
Wrap the phrase in quotes inside the query string, for example "launch day" returns only posts containing that exact phrase. You can combine it with a from operator to scope the phrase to one account, all in a single $0.0008 call that returns parsed JSON.
Can I search tweets older than seven days?
The official X API recent search is capped at seven days on standard access. The TwitterAPIs advanced search endpoint is not limited to that recent-search window, so you can query a broader history in the same $0.0008 per call request without an academic or enterprise contract.
What does a keyword search cost?
Each standard search call is $0.0008 and returns about 20 tweets, which is $0.04 per 1,000 tweets. There is no monthly minimum, so a small query costs a fraction of a cent and a million-tweet sweep costs about $40.
Do I need the official X developer account to search tweets?
No. TwitterAPIs issues a single bearer token at signup with no X developer account, no app registration, and no approval wait. You pass the token in the Authorization header and read structured JSON back.
What format do search results come back in?
Clean JSON. Each matching post carries the tweet text, author profile, created-at timestamp, and engagement counts already parsed, so you do not scrape or normalize HTML. The same shape is returned on every call, which keeps parsing code stable.

Start with $0.50 in free credits

No credit card. Roughly 12,500 tweets to test every endpoint.