POST /v1/social/x/{action}. {action} picks what to read. A completed request costs 0.5 credits.
Request
200 with the result in response. A task still running answers 202; poll GET /v1/async/task/{id} or set webhook. See Async tasks.
Actions
tweetId takes a tweet ID or a tweet URL, such as https://x.com/NASA/status/1585341984679469056. postUrl and url take the same values. username takes a username, an @username or a profile URL, which url also takes.
Parameters
A request with a parameter of another action, a value outside the ones listed below, or a missing required field is refused when you submit it, with400 VALIDATION_ERROR naming the field.
profile:
limit: Optional integer from 1 to 20, default 20, the most tweets to return. X shows a profile’s newest tweets, about 5, so a profile returns that many.
Response example
Result fields
- Every response echoes
platformandaction.profilecarriesreturnedCount. - A tweet has
tweetId,url,text,lang,createdAt,author(id,handle,displayName,verified,verifiedType,avatarUrl,followerCount),hashtags,mentions,links,media,likeCount,retweetCount,quoteCount,replyCountandbookmarkCount.textis the full text of a long tweet, with short links opened to their addresses.medialists eachtypewith itsurl,previewUrl,width,height,durationMsfor a video andaltTextwhen set. A video’surlis its highest quality file.viewCountappears when X shows it. A reply addsinReplyTowith thehandleandtweetIdit answers, and a quote addsquotedTweet.
tweetreturnstweet.profilereturnsuserId,username,displayName,url,bio,location,website,avatarUrl,bannerUrl,verified,verifiedType,protected,createdAt,followerCount,followingCount,tweetCount,mediaCountandtweets. Each tweet intweetscarriespinned,truefor the tweet the profile pinned.- A tweet or account that does not exist, a deleted tweet, and a protected or suspended account end the task with
PAGE_UNAVAILABLE. Only completed requests are charged.
HTML page
Setinclude.html to true and the result gains html, a link to the X page the answer was read from, saved as a file you can put in a report. html has status, url and expiresAt, described in HTML pages.
include.htmlworks ontweetandprofile.- The file is the HTML document X sent for the page, before any script ran. It starts with a note comment,
Saved by querying.ai: the page X served for task <id> at <UTC time>, the page as X sent it, before any script ran, the address of the visit and its session ids masked. - Values that belong to the visit are replaced with zeros of the same length: cookie values, session, request and device ids, CSRF and other tokens, nonces and the signatures in media addresses. Because those signatures are masked, the image and video links in the file do not load. Content that depends on where the visit came from, such as the regional CDN host names in media addresses, stays as X sent it.
- The document’s scripts are kept as text. The file is served with a Content-Security-Policy that runs no script and loads no outside resource.
- X sends the main content as markup, so the opened file is readable.
tweetkeeps the page atx.com/<user>/status/<id>, andprofilekeepsx.com/<user>.- The page costs nothing extra: the request is still 0.5 credits.
- When the page cannot be kept, the answer is still returned and
htmlis{ "status": "failed", "error": "EVIDENCE_FAILED" }. Resubmit the task to try again.