Search Public Posts by Keyword
View all X (Twitter) Public Data API endpoints →Pass required query for a keyword or hashtag search. Optional search_type selects a result mode; Latest was verified, while other values and their behavior were not. Start without cursor and continue using the returned next_cursor for the same query and mode. The observed response has status=ok, timeline, next_cursor and prev_cursor. Results include type, tweet_id, screen_name, text, created_at, favorites, retweets, replies, quotes, bookmarks, views, entities, user_info and media; some entries can include quoted content. The NASA query also matched lowercase nasa used by unrelated authors in other languages. Check result text and user_info.rest_id before assigning account identity, deduplicate tweet_id and store query and collection time. Search is a returned-result sample, not an account timeline, native sentiment analysis or guaranteed full-archive access.
API Features
Live API Demo
🔒 Sign in to try it live
Log in to call this API with your own API key. New accounts get 100 free credits — no card required.
Log in / Sign upNo active API key found. Create one in your Dashboard, then reload this page. Dashboard →
/api/project/twitter/search API Response (JSON)
{} curl -X GET 'https://api.opendata-api.com/api/project/twitter/search?key=<API_KEY>&query=NASA&search_type=Latest'
Query Result
Use Cases
- Poll a brand keyword and send newly observed mentions to a communications review queue after checking text and author identity.
- Collect a bounded hashtag dataset containing returned post text, timestamps, authors and engagement for downstream topic research.
- Monitor event discussion with scheduled Latest searches without presenting polling as a real-time stream.
- Compare recurring campaign-keyword samples over time while retaining multilingual and unrelated matches for explicit relevance filtering.
Frequently asked questions
How can I collect public brand mentions or hashtag matches?
Send the required query, optionally with the verified search_type=Latest. Continue using next_cursor with the same query and mode, deduplicate tweet_id and retain collection time. Relevance filtering or sentiment analysis is a separate downstream step.
Is searching an account name equivalent to its timeline?
No. Matching text can come from unrelated authors or languages. Inspect text and user_info.rest_id before assigning account identity, and use user-timeline when the collection must be scoped to a selected public account.