How to extract an X (Twitter) article with structured blocks
Pull an X article's title, author, engagement counts, cover image, and ordered content blocks from its wrapper post URL
On this page
You have 12 public X wrapper-post URLs and need each article's title, author, cover image and engagement counts in one comparison table. The table feeds a decision about which long-form posts to summarize or amplify
The deliverable is one row per URL. No run has been executed for this guide, so the table below is a design, not a result. Values here are placeholders showing the shape
Example input and deliverable table
Example input URL: use the canonical status URL of your chosen public wrapper post
The required input is url: the canonical x.com or twitter.com status URL of the public wrapper post that contains the X Article. The input pattern accepts x.com and twitter.com hosts, including www and mobile subdomains, and a numeric status ID. The example is invented and is not a live job
Table design:
| found | data.title | data.author.handle | data.author.name | data.createdUtc | data.coverImage | data.likes | data.replies | data.quotes | data.views | data.contentBlocks | review_note |
|---|---|---|---|---|---|---|---|---|---|---|---|
| true | (title) | (handle) | (name) | (epoch seconds) | (image URL or empty) | (count) | (count) | (count) | (count) | (ordered block types) | summarize, amplify or skip |
For data.contentBlocks, store the ordered block types, and keep the full array in a second sheet if you need the text. A row with found set to false has data set to null and no article fields to fill
Read the fields that drive the decision
Start with found. It is true when the wrapper post contains a public X Article. When it is false, the output includes reason set to not_found; data is null and the review note should say no article was found
For a true row, data carries the article fields. data.title is the article title. data.author.handle and data.author.name identify the author, with data.author.id and data.author.url also present in the author object. data.createdUtc is a UTC epoch timestamp in seconds; multiply by 1000 for a JavaScript Date in milliseconds
data.coverImage is the article cover image URL when available. data.likes, data.replies, data.quotes and data.views are wrapper post counts at retrieval time. Use them as context in the table, not as a ranking formula
data.contentBlocks is the ordered article body. Each block has a type, such as unstyled, header-two, image, divider, blockquote or a list item. Text-bearing blocks can carry text, entities and inlineStyles; image blocks can carry image, width and height. Unknown future block types remain representable through type and optional fields, so read the type before you parse a block
For a separate task, see convert a web page to markdown
One limit sits with this step: the tool cannot turn a non-article wrapper post into an article. An answer with found set to false for a non-article wrapper post is a successful call, not an error, and is billed. A row can close with no article and still count as one call
The agent prompt
Set up https://purrkey.app/SKILL.md, then use Purrkey to extract X article metadata for the 12 public wrapper-post URLs below. Check the current inputs and price of anyapi.twitter.article before running. Call anyapi.twitter.article once per URL. Return a table with found, data.title, data.author.handle, data.author.name, data.createdUtc, data.coverImage, data.likes, data.replies, data.quotes, data.views, data.contentBlocks and review_note. If found is false, leave the article fields empty and set review_note to reason. Do not infer missing values.
Example placeholder list; replace each line with a real public wrapper-post URL:
replace-with-real-public-wrapper-post-1
replace-with-real-public-wrapper-post-2
replace-with-real-public-wrapper-post-3
replace-with-real-public-wrapper-post-4
replace-with-real-public-wrapper-post-5
replace-with-real-public-wrapper-post-6
replace-with-real-public-wrapper-post-7
replace-with-real-public-wrapper-post-8
replace-with-real-public-wrapper-post-9
replace-with-real-public-wrapper-post-10
replace-with-real-public-wrapper-post-11
replace-with-real-public-wrapper-post-12The prompt tells the agent to check the current inputs and price before it runs. It also tells the agent to return the table, not a prose summary
Estimated tool cost
The catalog lists anyapi.twitter.article at up to $0.00054 per call. Agents call it through POST /v1/runs with toolId anyapi.twitter.article. The unit is max_call: Maximum per call. Successful runs settle at the actual AnyAPI charge. The totals below are ceilings, not settled charges. Model fees for the agent are not counted
| Step | Formula | Unit price | Planned quantity | Total |
|---|---|---|---|---|
| One article lookup | calls x max price | $0.00054 per call | 1 | $0.00054 |
| Twelve article lookups | calls x max price | $0.00054 per call | 12 | $0.00648 |
| Planned run | $0.00648 |
A run that returns found set to false is still one call in this plan. The 12-call ceiling assumes one call per URL
Before the 12-row run
Open the X article tool page and run one public wrapper-post URL before you commit the 12-row table
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 extract an X article from a wrapper post URL?
Call anyapi.twitter.article with url set to the canonical x.com or twitter.com status URL of the public wrapper post. The output returns found and, when an article exists, a data object with title, author, createdUtc and contentBlocks.
What does anyapi.twitter.article return for an article?
It returns found set to true and a data object with data.title, data.author.handle, data.author.name, data.createdUtc and data.contentBlocks, plus data.coverImage when available and wrapper post counts for likes, replies, quotes and views.
What are contentBlocks in an X article?
data.contentBlocks is the ordered article body. Each block has a type, and text-bearing blocks can carry text, entities and inlineStyles, while image blocks can carry image, width and height.
What happens when a wrapper post is not an X article?
The output has found set to false and a reason value that indicates no article was found. That answer is a successful call, not an error, and it is billed.
How much does it cost to extract 12 X articles?
At up to $0.00054 per call, 12 calls have a ceiling of $0.00648. Successful runs settle at the actual AnyAPI charge, and model fees are not counted.
What input does anyapi.twitter.article take?
The required input is url, the canonical x.com or twitter.com status URL of the public wrapper post that contains the X Article. Replace the example URL with a real public wrapper post before running.
Can I run the example URL as written?
The example URL is invented for the table design and is not a live job. Replace it with a real public wrapper-post URL before running.
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.