Search typeahead suggestions
GET /2/typeahead
Autocomplete-style suggestions from X REST 1.1/search/typeahead.json: users (as APIUser with counts and bio omitted when unknown), topics (including hashtag-style trends), and events.
Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”Example
examplePrefix or query string
Example
events,users,topicsComma-separated suggestion kinds to request from X: events, users, topics (default: all three). Other values are ignored. Hashtag-style hits appear under topics.
Example
search_boxUpstream src hint (default: search_box)
Responses
Section titled “ Responses ”Typeahead payload
object
object
object
object
Facet kind: e.g. url, mention, hashtag, bold, media, custom_emoji (Mastodon custom emoji image)
Start and end UTF-16 indices
object
object
object
object
object
object
object
object
object
object
Invalid query parameters
object
Upstream returned an error payload for this query
object
object
object
object
Facet kind: e.g. url, mention, hashtag, bold, media, custom_emoji (Mastodon custom emoji image)
Start and end UTF-16 indices
object
object
object
object
object
object
object
object
object
object
Upstream or processing error
object
object
object
object
Facet kind: e.g. url, mention, hashtag, bold, media, custom_emoji (Mastodon custom emoji image)
Start and end UTF-16 indices