Search posts
Returns recent X posts that match an X search query, in X's Latest order (not strictly by ID), and the URL of the next page. One search returns at most 100 posts across all its pages; after the 100th post, next is null.
GET
/api/search/postsAuthorization
AuthorizationstringheaderrequiredBearer authentication with your TweetStream API key:Bearer <key>.
Query parameters
querystringrequiredX search query, operators included.limitintegeroptionalMost posts to return.pagestringoptionalOpaque; only ever taken from next.
Response fields
nextstring | nullrequiredAbsolute URL of the next page: request it as it is, with the same API key. Null when there is nothing more or the search has returned 100 posts. Works for 30 minutes.postsobject[]requiredkindenum<string>optionalquotedobjectoptionalThe post a reply also quotes. A quote keeps the post it quotes in ref and has no quoted.typestringrequired
refobjectoptionaltypeenum<string>required
metricsobjectrequiredbookmarksintegerrequiredlikesintegerrequiredquotesintegerrequiredrepliesintegerrequiredrepostsintegerrequiredviewsinteger | nullrequired
tweetIdstringrequired
Responses
- 200Success
- 400Invalid query or limit, or a page link that was changed or is over 30 minutes old. Search again without page.
- 401Missing or invalid API key
- 403The API key's account has no current Pro, Ultra Speed, Scale subscription.
- 405Only GET is supported
- 429The account's search allowance is spent or its searches in progress are at the plan's limit: Pro 60 per minute (bursts of 10, 4 in progress); Ultra Speed 120 per minute (bursts of 10, 6 in progress); Scale 300 per minute (bursts of 10, 10 in progress)
- 503Post search or authentication is temporarily unavailable