How to fetch an Instagram post by URL with one API call
Get a single Instagram post or reel's caption, media URLs, owner, type and engagement as normalized JSON, then read the fields that decide which creative concepts to test next
On this page
You have 12 Instagram post or reel URLs from a competitor's campaign and need one normalized record per URL. This guide sets up anyapi.instagram.post for that job and designs the table the agent returns. No run has been executed for this article, so values in the table are placeholders showing the shape
Example input and table design
Example URL: https://www.instagram.com/reel/C9aBcDeFgHi/
The fields below are the deliverable design. Values here are placeholders showing the shape
| URL | shortcode | type | owner | caption | likes | comments | plays | videoUrl |
|---|---|---|---|---|---|---|---|---|
| Example reel URL | data.shortcode | data.type | data.owner | data.caption | data.likes | data.comments | data.plays or absent | data.videoUrl |
An absent plays value is a normal outcome. If found is false, leave the record fields empty and note reason. Keep the input URL beside the row so the record can be traced back to the campaign sheet
Step 1: send one post or reel URL
anyapi.instagram.post is the tool. Agents call it through POST /v1/runs with toolId anyapi.instagram.post. It takes url as a required field. Copy the full Instagram post or reel URL, including /p/, /reel/, /reels/ or /tv/, and the media shortcode. A profile URL such as https://www.instagram.com/username names no post. It is rejected instead of charged for an empty result
requireFields is optional. Send requireFields: ["plays"] when the play count matters, and omit the deprecated requirePlayCount. Naming a field can raise the price: if the cheapest source cannot return a named field, a dearer source serves, and the call is quoted and charged its price. A combination that no single source returns together is refused as invalid input, with no charge. A named field can still be absent on a post that genuinely lacks it
Step 2: read the fields that drive the decision
Start with found. When found is true, data is an object with the post record. When found is false, data is null and reason is present with the value not_found. That is a successful call, not an error. Leave the row without a record and do not retry the same URL unless the URL was wrong
For a returned post, use data.shortcode as the stable row key and data.type or data.productType to group media types. data.owner and data.caption give the account and the copy; data.caption can be empty. data.likes and data.comments are the engagement counts to compare. data.plays is the reel or video play count, but it is absent unless the request names plays in requireFields, and it can still be absent when Instagram does not expose a play count for that media. data.videoUrl is the media URL for the row. If data.countsHidden is true, the author has hidden like and view counts; treat the counts with that context. data.createdUtc is the UTC epoch timestamp in seconds, useful for ordering a campaign by post date. data.displayUrl is the media display URL
The agent prompt
Set up https://purrkey.app/SKILL.md, then use Purrkey to fetch one normalized record for each Instagram post or reel URL in the list. Before running, check the current inputs and price of anyapi.instagram.post. Call anyapi.instagram.post once per URL with url. Send requireFields ["plays"] only if the play count is needed. Use found and reason to mark URLs with no record. Return a table with shortcode, type, owner, caption, likes, comments, plays and videoUrl. Do not invent values for missing fields.
Example URL: https://www.instagram.com/reel/C9aBcDeFgHi/
Replace this line with your 12 URLs.Estimated tool cost
The catalog lists anyapi.instagram.post at up to $0.00638 per call, read through the Purrkey catalog on November 13, 2026. The unit is max_call: "Maximum per call. Successful runs settle at the actual AnyAPI charge." The table below uses ceilings, not settled charges. Agent model fees are not counted
| Step | Formula | Unit price | Planned quantity | Total |
|---|---|---|---|---|
| Single post lookup | 1 call x max price | $0.00638 per call | 1 | $0.00638 |
| 12-post campaign review | 12 calls x max price | $0.00638 per call | 12 | $0.07656 |
A request that names plays can route to a dearer source and is quoted and charged that source's price; this table uses the catalog price for anyapi.instagram.post and does not estimate that uplift
Next action
Open the tool page for anyapi.instagram.post to check the current input schema and price before your first run: Instagram post
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 Instagram.FAQ
How do I fetch an Instagram post by URL?
Call anyapi.instagram.post with the full post or reel URL in url. It returns normalized JSON with found and data, including shortcode, type, owner, caption, likes, comments and videoUrl.
What Instagram URLs does the post tool accept?
It accepts full post or reel URLs with /p/, /reel/, /reels/ or /tv/ and a media shortcode. A profile URL names no post and is rejected instead of charged for an empty result.
How do I get the play count for an Instagram reel?
Send requireFields with plays on the request. The play count can still be absent on a post that genuinely lacks it, and naming the field can route to a dearer source.
What do found and reason mean in the response?
found is true when a post record is returned and false when there is no result. When found is false, reason explains there is no result; the call is still successful, not an error.
How much does it cost to fetch 12 Instagram posts?
The catalog lists anyapi.instagram.post at up to $0.00638 per call, with the unit described as maximum per call. The 12-post review is at most $0.07656 at that price, and agent model fees are not counted.
Can I fetch a profile's posts with the post tool?
No. A profile URL names no post and is rejected instead of charged for an empty result; the contract points profile requests to the Instagram profile or user posts tools.
Next step
Try this with Instagram
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.