How to reconstruct an X self-thread from a post URL
Get the ordered self-thread tweets for an X post, excluding other users' replies. Build a per-tweet table with engagement counts for the campaign URLs you supply
On this page
You have 12 X post URLs from a campaign and need the announcement sequence behind each one rebuilt as an ordered list of the author's own linked posts
anyapi.twitter.thread takes one status URL and resolves the linear self-thread from its root through the author's continuations. The worksheet below is the deliverable: one row per tweet, grouped by thread, carrying the counts you need to choose quotes for a recap. No run has been made for this article, so the example tables show the design, not results
Example input and the tweet table design
One URL per row of the input sheet. The handle and the numeric ID below are invented, so swap in your own URLs copied from the browser address bar
| Thread label | url |
|---|---|
| Campaign A, 1 | https://x.com/OrbitNotes/status/1801234567890123456 |
| Campaign A, 2 | https://x.com/OrbitNotes/status/1801234567890123499 |
The contract requires url. The contract describes it as a canonical x.com or twitter.com status URL with a numeric tweet ID, and it notes that any tweet in the self-thread can be supplied because the provider resolves the thread root. You do not have to hunt for the first post. The pattern also tolerates a /photo/1 or /video/1 suffix and a query string, which is what a copied address bar URL often carries. The catalog lists the endpoint as being called through POST /v1/runs with toolId anyapi.twitter.thread
The deliverable is one table per campaign, or one table with a thread column. Values here are placeholders showing the shape
| id | authorHandle | text | createdUtc | likeCount | repostCount | replyCount | viewCount | url |
|---|---|---|---|---|---|---|---|---|
| 1801234567890123457 | OrbitNotes | (tweet text) | 1718000000 | (count) | (count) | (count) | (count) | https://x.com/OrbitNotes/status/1801234567890123457 |
createdUtc is a UTC epoch timestamp in seconds, and you multiply by 1000 for a JS Date in milliseconds. Order rows by thread, then by the position the tool returns them in, not by likeCount
How to read the output fields that drive a decision
A response carries found and data. When found is false, reason is present and reads not_found, meaning the source states the target does not exist or returned nothing for it. The contract classes that as a successful call, not an error, and costUsd reports what it actually cost. data can be null
Only the author's linear self-thread is returned, and replies from other users are excluded. A campaign post that drew a dozen quote-posts from other accounts comes back as a short thread, not as the argument underneath it. That limit lands on this reading step: isReply and inReplyToId on each tweet show where a returned post sat in the conversation, so you can tell a genuine continuation from a post the author wrote in reply to someone else
Three header fields decide whether the table is usable. threadLength counts the tweets returned. The boolean flag returned with it indicates whether the provider reached the end of the self-thread without hitting its internal cap, and when that flag is false the table stops short, so the recap should not describe the sequence as closed. conversationId is shared by the self-thread tweets, which lets you spot two supplied URLs that resolved to the same thread before counting them twice
data.author describes the thread's author once: handle, id and name are required, with followers, bio, blueVerified and verified available for the recap header. Inside tweets, the fields that shape quote choices are likeCount, repostCount, replyCount, viewCount and bookmarkCount. media lists photo, video and GIF attachments, empty when a post has none, and videoUrl appears only for video and gif items
The agent prompt
Set up https://purrkey.app/SKILL.md, then use Purrkey to reconstruct the
self-thread for each of the 12 X post URLs below. Check the current
inputs and price of anyapi.twitter.thread before running anything. Call
the tool once per URL and pass the URL unchanged. Do not guess a tweet ID
and do not merge threads written by different authors.
Return one table with the columns id, authorHandle, text, createdUtc,
likeCount, repostCount, replyCount, viewCount and url, one row per
tweet, in the order the tool returns them. Above each thread add a header
line with found, threadLength and complete. When found is false, write
the reason instead of rows.
Example URL, replace with your 12:
https://x.com/OrbitNotes/status/1801234567890123456The prompt asks for a check of current inputs and price before the run because the catalog holds the live values, not this article. Replace the example URL with your 12, and label the tweet ID as invented so nobody mistakes it for a real post
Estimated tool cost
Prices read from the Purrkey catalog on November 13, 2026, under revision anyapi-catalog-2026-11-05. The unit is max_call: Maximum per call. Successful runs settle at the actual AnyAPI charge. The totals below are ceilings, not settled charges
| Step | Formula | Unit price | Planned quantity | Total |
|---|---|---|---|---|
| Single test | calls x max price | $0.00269 per call | 1 | $0.00269 |
| Campaign run | calls x max price | $0.00269 per call | 12 | $0.03228 |
| Plan total | $0.03228 |
Twelve URLs is twelve calls, since the unit is one URL per call; a longer thread does not raise the count. A URL that comes back found: false still counts as a call and costs what it actually cost. Model fees for the agent are not counted
Run one URL before the batch
Open the thread tool page and run the single example URL first to see a real response shape, then send the batch of 12
Get started by giving this to your agent
- Claude Code
- Codex
- Gemini CLI
- Cursor
- GitHub Copilot
Set up https://purrkey.app/SKILL.md, then use Purrkey to show me what I can do with X (Twitter).FAQ
How do I reconstruct an X self-thread from a post URL?
Pass the status URL to anyapi.twitter.thread. It returns the linear self-thread from its root through the author's linked continuations, as an ordered list of tweets.
What input does anyapi.twitter.thread take?
url, the required field in the contract: a canonical x.com or twitter.com status URL with a numeric tweet ID. The pattern also accepts the photo or video suffix and query string that a copied address bar URL often carries.
Does it matter which tweet in the thread I paste?
No. Any tweet in the self-thread can be supplied and the provider resolves the thread root, so a link to the middle of the sequence returns the same thread.
Are other users' replies included in the thread output?
No. Only the author's linear self-thread is returned and replies from other users are excluded. isReply and inReplyToId on each tweet show where a returned post sat in the conversation.
What does the complete field mean?
It says whether the provider reached the end of the self-thread without hitting its internal cap. When it is false, the returned table stops short of the end and the sequence is not closed.
What happens when a post URL does not exist?
The response has found false and reason set to not_found. The contract calls that a successful call, not an error, and costUsd reports what it actually cost.
How much does it cost to rebuild 12 X threads?
Twelve calls at up to $0.00269 per call, so at most $0.03228. Successful runs settle at the actual AnyAPI charge, so the figure is a ceiling.
Next step
Try this with X (Twitter)
The tool directory lists every endpoint with its current price. Inspect the inputs there, then let your agent run a small batch before scaling up.