Search X posts
/v1/tools/x.search.posts/calls Needs an API keyReturns the X posts that match a search, from the top, latest or media tab, with author and engagement counts. Use it to follow the conversation on a topic.
Tool x.search.posts on X (Twitter). Contract version 1, released 2026-10-27.
Over REST, send the input in the body. Over MCP, pass the same input to call_tool.
Both return the full response: the call's ID, status and cost, with this tool's result in output.
Input
querystringRequiredThe search query. X matches more than a post's text, such as the post it quotes, a linked article or its media, so a post may not contain the query's words.
tabstringWhich tab of X's search results to read: top (X's ranking), latest or media (posts with photos or videos).
toplatestmedianext_page_tokenstringFetches the next page. Take it from pagination.next_page_token of the previous page, and send the same query and tab.
Output
A successful call returns these blocks in its output. A field not marked required can be null.
posts
A list of rows. Always present, possibly empty.
idstringRequiredX's identifier of the post. The post is at https://x.com/i/status/ followed by it.
urlstringAddress of the post on x.com.
Format uri.
textstringWhat the post says, links written as X's t.co short links.
published_atstringWhen the post was published, in ISO 8601.
author_idstringX's numeric identifier of the author, as a string.
author_usernamestringThe author's handle, without the @.
author_namestringThe author's display name.
author_image_urlstringAddress of the author's profile picture.
author_follower_countintegerreply_countintegerrepost_countintegerquote_countintegerlike_countintegerbookmark_countintegerview_countintegerNumber of times the post was seen.
conversation_idstringIdentifier of the post that opened the thread; the post's own id when it opened it.
in_reply_to_post_idstringIdentifier of the post this one replies to.
in_reply_to_usernamestringHandle of the author this post replies to, without the @.
sensitivebooleanWhether X marks the post as possibly sensitive.
quoted_post_idstringIdentifier of the post this one quotes.
quoted_post_textstringquoted_post_author_usernamestringhashtagsarray of stringEach hashtag in the text, without the
mentioned_usernamesarray of stringHandle of each account the text mentions, without the @.
link_urlsarray of stringFull address of each link in the text.
image_urlsarray of stringAddress of each photo attached to the post.
videosarray of objectEach video attached to the post.
videos.preview_image_urlstringRequiredAddress of the video's still image.
videos.duration_msintegerLength of the video, in milliseconds.
videos.widthintegerWidth of the original video, in pixels.
videos.heightintegerHeight of the original video, in pixels.
pagination
One object. Can be null. How to fetch the next page. Null on the last page.
next_page_tokenstringRequiredSend as next_page_token to fetch the next page.