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

Keyword and hashtag discovery query requests matching public posts, allowing a topic-centered collection independent of a single account.
Verified Latest search mode search_type=Latest returned current matching posts; other mode values and ordering behaviors still require validation.
Search-specific author context Observed entries include screen_name and user_info, which must be checked because a keyword match does not establish account identity.
Paginated mention samples next_cursor and prev_cursor accompany the observed result set; preserve the query and mode and deduplicate tweet_id across collected pages.

Live API Demo

GET /api/project/twitter/search

Request cost is temporarily unavailable. No price is assumed.

View pricing

API Response (JSON)

{}
curl -X GET 'https://api.opendata-api.com/api/project/twitter/search?key=<API_KEY>&query=NASA&search_type=Latest'
📢
Need Help?
If you encounter API issues or need other API requirements, please contact us.
Contact Us

Use Cases

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.

Related operations

Guides

View Subscription Plans →