How to fetch a LinkedIn post by URL
Fetch a single LinkedIn post or article by URL and return its author, text, engagement counts, publish date, and available image fields
On this page
You have 25 LinkedIn post URLs from a competitor's recent campaign and need a table of author, text, likes, comments and publish date for each one, sorted by engagement and date so you can choose themes for next month's content calendar. Fetch each URL once with anyapi.linkedin.post, called through POST /v1/runs with toolId anyapi.linkedin.post, and let the agent fill the rows
The worksheet is the deliverable. Nothing in this article has been run, so the cells below are placeholders showing the shape of a row, not findings
The input list and the table you fill
Example URL, in the format the url field expects:
Swap in the 25 URLs you collected. The contract describes the field as fitting a post or an article URL, and the companion guide at reading a LinkedIn article by URL covers the long-form case
One row per URL, with a theme column you write yourself once the fetch is done:
| title | author | text | likes | comments | createdUtc | url | theme |
|---|---|---|---|---|---|---|---|
| (post title) | (author name) | (post text) | 0 | 0 | 0 | (canonical url) | (your label) |
Values here are placeholders showing the shape. Rank a row by likes plus comments, then break ties with createdUtc newest first
What to send with each URL
url is required. requireFields is optional, and it is an array of enum values, authorImage and image, that tells the router which output fields the request must be able to return. Omit it and routing is unchanged, with the cheapest source serving. Fields you do not name are still returned when the serving source has them
Naming a field has a price effect. When the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. Ask for authorImage or image only when the layout needs a thumbnail. A named field can still be absent on a post that genuinely lacks it
The limit sits at this step: naming a combination in requireFields that no single source returns together is refused as invalid input, with no charge. The contract does not list which combinations fail, so test two or three URLs before you point the agent at 100
Reading the fields that decide a row
found is the first field to check. It is a boolean, and data holds the post result, or null when not found. reason appears only when found is false, and its value is not_found. The catalog note is plain that a found: false answer is a successful call, not an error, and the reported cost is what the call actually cost. A dead URL does not stop the batch; it leaves a row with no post behind it
For the rows that come back, these fields feed the table:
data.title,data.text,data.authoranddata.authorUrl: the post identity and the words you read before labelling a themedata.likesanddata.comments: integers, added together to rank a row by engagementdata.createdUtc: a UTC epoch timestamp in seconds. Multiply by 1000 for a JS Date in milliseconds. Sort on this for the date half of the comparisondata.url: the canonical URL. Use it in the sheet rather than the URL you pasteddata.authorImageanddata.image: nullable. They are null when the serving source does not carry one, and the query string is a signed token, so keep the URL intact if you store it
The theme column is yours. The tool returns text, not topic labels
The agent prompt
Set up https://purrkey.app/SKILL.md, then use Purrkey to fetch the
LinkedIn posts at the URLs below with anyapi.linkedin.post. Check the
current inputs and price of anyapi.linkedin.post before running
anything. Call it once per URL. Leave requireFields out unless I ask for
image fields. Return one table with title, author, text, likes, comments,
createdUtc, url, found and reason, and add an empty theme column for me
to fill in. Keep post text as returned and do not rewrite it. When found
is false, leave the post fields empty and write not_found in reason. Do
not guess values.
https://www.linkedin.com/posts/stripe_last-week-agent-traffic-surpassed-human-activity-7470882737390940160-2NxsReplace the single URL with your 25. Keep the first run to five so you can see whether the rows arrive with text and counts intact
Estimated tool cost
Prices read through the Purrkey catalog on November 13, 2026, revision anyapi-catalog-2026-11-05. The unit is max_call: "Maximum per call. Successful runs settle at the actual AnyAPI charge". The totals are ceilings, not settled charges
| Step | Formula | Unit price | Planned quantity | Total |
|---|---|---|---|---|
| 25-post batch | calls x max price | $0.00253 per call | 25 | $0.06325 |
| 100-post batch | calls x max price | $0.00253 per call | 100 | $0.253 |
A found: false answer is still a call, so the 25-post ceiling holds even when some URLs come back empty. Model fees for the agent are not counted
Run the first five URLs
Open the LinkedIn post tool page, paste the first five URLs and let the agent fill the table before you release the other 20
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 LinkedIn.FAQ
How do I fetch a LinkedIn post by URL?
Send the full post or article URL in the url field of anyapi.linkedin.post and read the row from data. One call returns one post.
What does anyapi.linkedin.post return?
It returns found, data and, when the post is missing, reason. data carries title, text, author, authorUrl, likes, comments, createdUtc, url and the nullable authorImage and image fields.
What inputs does anyapi.linkedin.post take?
url is required. requireFields is an optional array of authorImage and image, used only when those fields must be returned.
What does found false mean for a LinkedIn post lookup?
It means the source states the post does not exist or returned nothing for it. The call is still a successful one and is charged at up to $0.00253, and reason reads not_found.
How much does it cost to fetch 25 LinkedIn posts?
25 calls at up to $0.00253 per call come to a ceiling of $0.06325. A 100-post batch has a ceiling of $0.253.
What is createdUtc in the output?
It is a UTC epoch timestamp in seconds. Multiply it by 1000 for a JS Date in milliseconds.
What happens if a requireFields combination is not supported?
A combination that no single source returns together is refused as invalid input, with no charge.
Next step
Try this with LinkedIn
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.