GroundsocialDocs

API · X

GET /x/search/tweets

Search recent X posts with X’s search operators (needs logged-in sessions).

RequestGET /v1/x/search/tweets
Operation idx.search.tweets
Cost10 credits, refunded if the call fails
AuthAPI key: Authorization: Bearer <key> or x-api-key.

Search recent X posts with X’s search operators (needs logged-in sessions).

Query parameters

NameTypeRequiredDescription
qstringyesX search query. Example: from:NASA moon.
product"latest" | "top"nolatest (newest first, default) or top. One of latest, top.
sincestringnoOnly posts on or after this time (sent to X as since_time:): YYYY-MM-DD (UTC) or an ISO 8601 timestamp. Example: 2026-11-01.
untilstringnoOnly posts on or before this time (sent to X as until_time:): YYYY-MM-DD (UTC) or an ISO 8601 timestamp. Example: 2026-11-01.
afterstringnoCursor: the previous page's meta.next_token.

Responses

StatusMeaningSchema
200Matching posts, with a next_token.XTimelineResponse
400Invalid input. Nothing was charged.Error
401Missing or invalid API key.Error
402Not enough credits, a spend cap was reached, or payment is required.Error
403The target is private, or the account is suspended.Error
404The post or account does not exist, was deleted, or is suspended.Error
429Too many requests. Wait for Retry-After seconds.Error
503X is temporarily unavailable. Retryable; nothing was charged.Error

XTimelineResponse fields

FieldTypeDescription
dataXTweet[]
includesXIncludesObjects the response refers to by id, each once: authors, quoted and reposted posts, media, polls.
metaXTimelineMeta

Errors use one shape everywhere; see Errors for every code and what to do.