Tweets

Search tweets with minLikes, normalized likeCount, media & cursors

Tweets include authors, like counts, media, URLs & cursors. Omit mode for maximum coverage. Reuse next_cursor with unchanged filters.

get/api/v1/x/tweets/search

Query parameters

qstring required

Query, Tweet ID, or URL. Hyphens negate terms. Use exactPhrase for literals. Valid bounds apply per page.

queryType'Latest' | 'Top'

Latest is chronological; Top ranks engagement. Aliases: result_type, sort_order.

mode'standard' | 'coverage'

Omit mode for resumable maximum coverage. Standard keeps legacy pagination. Coverage returns diagnostics once and rejects cursors.

cursorstring

Cursor from the previous response. Existing unprefixed cursors keep legacy standard behavior. Pages can be empty before more rows; follow next_cursor.

sinceTimestring

Inclusive ISO bound for Tweet creation time.

untilTimestring

Exclusive ISO bound for Tweet creation time.

limitinteger

Unique matching result upper bound after filtering. Default 20. Explicit coverage defaults to 2000. It returns retained rows and deadline diagnostics when time expires. Only returned rows are billed. Credits may reduce results; zero affordable rows returns 402. Aliases: pageSize, count, max_results.

fromUserstring

Filter by author username.

toUserstring

Filter replies sent to a username.

mentioningstring

Filter tweets mentioning a username.

languagestring

Filter by language. Alias lang is accepted.

sinceDatestring date

Start date in YYYY-MM-DD format.

untilDatestring date

End date in YYYY-MM-DD format.

mediaType'images' | 'videos' | 'gifs' | 'media' | 'links' | 'none'

Filter media. Aliases: has_video, has_media.

minLikesinteger

Minimum likes. Aliases: minFaves, min_likes, min_faves.

minRetweetsinteger

Minimum retweets threshold.

minRepliesinteger

Minimum replies threshold.

minQuotesinteger

Minimum quote count threshold.

minViewsinteger

Minimum view count threshold.

minBookmarksinteger

Minimum bookmark count threshold.

maxFavesinteger

Maximum likes threshold. maxLikes is also accepted.

maxRetweetsinteger

Maximum retweets threshold.

maxRepliesinteger

Maximum replies threshold.

maxQuotesinteger

Maximum quotes threshold.

blueVerifiedOnlyboolean

Only return tweets from Blue-verified authors.

cardNamestring

Match the Tweet card name.

sourcestring

Match the source application.

excludeSourcestring

Exclude a source application.

geocodestring

Match latitude, longitude, and radius.

sinceIdstring

Return Tweets whose IDs exceed this ID.

maxIdstring

Return Tweets at or below this ID.

nearstring

Match a place name.

withinstring

Set the radius for the near filter.

withinTimestring
Example:7d

Match Tweets from this recent window, such as 90m or 7d. Use a whole number and s, m, h, or d.

nativeRetweetsboolean

Only return native reposts.

safeboolean

Enable the safe-search filter.

newsboolean

X no longer searches filter:news.

verifiedOnlyboolean

Only return tweets from verified authors.

replies'include' | 'exclude' | 'only'

Reply mode. Exclude keeps own-thread replies.

retweets'include' | 'exclude' | 'only'

Only when the caller requests a repost mode.

quotes'include' | 'exclude' | 'only'

Only when the caller requests a quote mode.

exactPhrasestring

Match this literal phrase, including any hyphens.

excludeWordsstring

Words or quoted phrases to exclude. Separate with spaces, commas, or lines.

anyWordsstring

Words or quoted phrases where any one can match. Separate with spaces, commas, or lines.

hashtagsstring

Hashtags separated by spaces, commas, or lines.

cashtagsstring

Cashtags separated by spaces, commas, or lines.

urlstring

URL substring or domain filter.

conversationIdstring

Conversation ID filter.

inReplyToTweetIdstring

Only replies to this tweet ID.

quotesOfTweetIdstring

Only quotes of this tweet ID.

retweetsOfTweetIdstring

Only retweets of this tweet ID.

listIdstring

Search within a list ID.

placestring

Search within a place ID.

placeCountrystring

Search within a country code.

pointRadiusstring

Geo point radius, e.g. -73.99 40.73 25mi.

boundingBoxstring

Geo bounding box, e.g. -74.1 40.6 -73.9 40.8.

advancedQuerystring

Raw advanced search query appended as-is.

Response

Search results

OR

Example response

{
  "tweets": [],
  "has_next_page": false,
  "next_cursor": ""
}

Changes