Twitter Search API (X Search API)
Search tweets or people on X with full search operators. Top, latest, people, or media results. $0.01 per call.
Search X (Twitter) with any query, including operators like from:, #hashtags, "exact phrases", min_faves:, lang:, and since:. Get top, latest, or media tweets with full engagement metrics and author profiles, or switch to people search to find accounts. Cursor pagination included.
Try it live
Fill in the fields and hit Run to see a real response.
{
"ok": true,
"data": {
"cursor": "DAADDAABCgABHV56yQtXUQIKAAIdWUjIHdZhqgAI…",
"tweets": [
{
"author": {
"avatar": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_400x400.jpg",
"banner": null,
"created_at": "2007-12-19T20:20:32+00:00",
"description": "Making the seemingly impossible, possible. ✨",
"followers_count": null,
"following_count": null,
"id": "11348282",
"is_blue_verified": true,
"likes_count": null,
"listed_count": null,
"location": "Pale Blue Dot",
"media_count": null,
"name": "NASA",
"pinned_tweet_ids": [],
"protected": false,
"tweet_count": null,
"url": "https://x.com/NASA",
"username": "NASA",
"verified": false,
"verified_type": "Government",
"website": null
},
"bookmarks": 29,
"conversation_id": "2116263878807998722",
"created_at": "2026-10-30T20:20:01+00:00",
"hashtags": [],
"id": "2116263878807998722",
"in_reply_to_tweet_id": null,
"in_reply_to_username": null,
"is_quote": false,
"is_retweet": false,
"lang": "en",
"likes": 682,
"media": [
{
"alt_text": "Three jet aircraft, each with a white nose and blue body, fly in a triangle formation against a clear blue sky. White trails follow each jet. ",
"duration_ms": null,
"height": 1280,
"type": "photo",
"url": "https://pbs.twimg.com/media/HV56yHnXcAAwYJ2.jpg",
"video_url": null,
"width": 1920
}
],
"mentions": [],
"possibly_sensitive": false,
"quoted_tweet": null,
"quotes": 4,
"replies": 38,
"retweeted_tweet": null,
"retweets": 86,
"text": "MAX POWER, America’s newest aerospace expo and air show, is just a week away!\n\nThis showcase will be packed with events—from aircraft flyovers to a chance to meet NASA astronauts and experts. Here's w…",
"url": "https://x.com/NASA/status/2116263878807998722",
"urls": [
"https://go.nasa.gov/4zjj9BD"
],
"views": 202974
}
]
}
}Features
from:NASA, #rust, "exact phrase", min_faves:100, lang:en, since:2026-01-01, and the rest of X's advanced search syntax work as-is.
type=top (default), latest for a chronological feed, media for tweets with photos or video, or people to search accounts instead of tweets.
Each tweet includes text, created_at, lang, likes, retweets, replies, quotes, bookmarks, views, hashtags, mentions, urls, media, quoted and retweeted tweets, and the full author profile.
Pass the returned cursor back for the next page of results.
Latest searches are cached for only 2 minutes; top, people, and media for 10 minutes.
Use cases
Brand Monitoring
Track every tweet that mentions your brand, product, or competitors.
Social Listening
Follow hashtags and keywords across X in near real time.
Research Datasets
Collect tweets on a topic for analysis or model evaluation.
Quick start
Copy this snippet and start making calls.
const res = await fetch('https://api.yepapi.com/v1/twitter/search', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"query": "from:NASA",
"type": "latest",
"count": 20
}),
});
const data = await res.json();
console.log(data);The Twitter Search API (X Search API) for tweets and people
The YepAPI Twitter Search API searches X the way the search box does. Send a query to /v1/twitter/search with any X search operators and get back tweets with text, engagement metrics, media, and the full author profile, plus a cursor for the next page. Each call costs $0.01.
Switch type to latest for a live chronological feed, media for photos and video, or people to search accounts. There is no developer account to apply for and no monthly X API tier to buy.
What is a Twitter search API?
A Twitter search API (now an X search API) takes a search query and returns matching tweets as data instead of a web page. The YepAPI endpoint accepts the same advanced search syntax as X itself (from:, to:, #hashtags, "exact phrases", min_faves:, lang:, since:, until:) and returns normalized Tweet objects with likes, retweets, replies, quotes, bookmarks, views, hashtags, mentions, links, media, and the author's profile.
Build a tweet monitor in Python
Call /v1/twitter/search with type=latest and a query such as "yourbrand -from:yourbrand" every few minutes, keep the ids you have seen, and alert on new ones. In Python that is a single requests.post call with an x-api-key header and a JSON body. Send the tweets to an AI endpoint on the same key to classify sentiment or route support requests.
Twitter Search API pricing: $0.01 per call
Every call costs a flat $0.01 and failed calls are free. There is no monthly tier to buy, no developer account to get approved, and no separate Twitter API key: one YepAPI key covers every endpoint. A page of results is one call. Latest results are cached for 2 minutes so monitoring stays fresh.
Search people and media too
type=people returns X accounts that match your query as full User objects (followers, following, bio, verification). type=media returns only tweets with photos or video. type=top (default) returns X's top-ranked tweets for the query.
Try the Twitter Search API free
Sign up and get $5 in free credit with no card required. That is 500 calls at $0.01 each to test the Twitter Search API on live X data before you spend anything. One key also covers user, timeline, tweet, and trends endpoints.
Start making API calls in 30 seconds
$5 free credit on signup. No credit card required. Pay per call.
What developers say
“Switched from SerpAPI and cut our SERP costs by 80%. Same data quality, way simpler billing.”
“One API key for AI models, SERP data, and web scraping. Saved us from managing 4 separate providers.”
“The $5 free credit let us prototype our entire rank tracking feature before committing. No other API does that.”
Frequently asked questions
Search X (Twitter) with any query, including operators like from:, #hashtags, "exact phrases", min_faves:, lang:, and since:. Get top, latest, or media tweets with full engagement metrics and author profiles, or switch to people search to find accounts. Cursor pagination included.
Each API call costs $0.01. No monthly minimums or subscriptions — you only pay for what you use.
Sign up for a free API key, then send a POST request to /v1/twitter/search. Check the code example above for a ready-to-use snippet in JavaScript, cURL, or Python.
YepAPI bundles SEO, AI, and web scraping APIs under one key with no monthly minimums. You get lower per-call pricing, a unified dashboard, and one billing account instead of managing multiple providers.
Ready to integrate?
Get your API key and start making calls in 30 seconds. $5 free credit on signup — no credit card required.
More Twitter / X API endpoints
Twitter User API (X Profile API)
$0.01Get any X (Twitter) profile by username: followers, following, tweets, bio, and verification. $0.01 per call.
X About This Account API
$0.01Get X's "About this account" data: country, username changes, verified-since date, and affiliation. $0.01 per call.
Twitter Bulk Users API
$0.01Look up to 100 X (Twitter) profiles by user id in a single call. $0.01 per call.
Tweet Scraper API (User Tweets)
$0.01Get the latest tweets from any X (Twitter) account with full engagement metrics. A tweet scraper at $0.01 per call.
Twitter User Replies API
$0.01Get an X (Twitter) account's tweets and replies timeline with full metrics. $0.01 per call.
Twitter Media API
$0.01Get the photos and videos an X (Twitter) account has posted, with media URLs. $0.01 per call.