Social media4 min readBy Purrkey teamUpdated

How to get an Instagram profile embed HTML by handle

Get the public embed HTML for an Instagram profile by handle and confirm whether the profile was found

On this page

You have 40 Instagram profile handles for a landing-page audit and need the public embed HTML for each profile. Call anyapi.instagram.embed once per handle and record four columns: handle, found, data.html and reason. The worksheet below is the deliverable, and no run has been executed for this guide; values in the tables are placeholders showing the shape

The task and the worksheet design

The audit output is one row per handle. The table has these columns:

handlefounddata.htmlreason
acme_studio (Example, invented)true or false (placeholder)HTML string or empty (placeholder)not_found or empty (placeholder)

A row with found true and a data.html value has embed HTML to carry into the landing-page audit. A row with found false has no HTML from this call; reason says not_found, defined by the contract as the source stating the target does not exist or returning nothing for it. Use that split to decide which profiles can move forward without a manual check. The placeholder handle is invented; replace it with a real handle. Keep the original handle in the row so the audit handoff still has the identifier that was sent

What the tool takes

The contract documents handle as a required string: the Instagram username without an @ prefix. If you have a profile URL, use the segment after instagram.com/ as the handle. A column copied from a sheet may include an @ prefix, so strip that character before the call

The tool id is anyapi.instagram.embed; the Agents call it through POST /v1/runs with toolId anyapi.instagram.embed. The description says it fetches the public embed HTML for an Instagram profile by handle. That is the input for this job: one handle produces one output row

Example input, invented:

handle
acme_studio (Example)

How to read the output

Read found first. It is a boolean and required. When found is true, read data. data is either null or an object with html. The contract says html is populated whenever the provider has data for the entity. When found is false, read reason; it is present only in that case, and the one value in the contract is not_found

The billing limit sits at the call step: a found: false result is a successful call, not an error, and still settles at the actual AnyAPI charge. Plan one call per handle, including handles that come back not found. A found: false row cannot supply embed HTML, so it needs a manual check or removal from the embed list. A null data value also leaves the row without HTML. Do not treat reason as an error field; it is the explanation for a no-result row, and it is absent when found is true. If found is true but data is null, the row has no HTML and cannot fill the embed cell. Sort on found and data.html first; then read reason only for no-result rows

For handle lookup rather than embed HTML, the companion guide is Instagram account lookup

The agent prompt

Agent prompt
Set up https://purrkey.app/SKILL.md, then use Purrkey to fetch the public
embed HTML for each Instagram handle below. Check the current inputs and
price of anyapi.instagram.embed before running. Call the tool once per
handle with handle set to the username without the leading @. Return a
table with handle, found, data.html and reason. Leave data.html empty
when no HTML is returned. Do not invent HTML.

acme_studio

The prompt returns the four-column table, not a prose report. Replace acme_studio with your own handle list before running

Estimated tool cost

The catalog price is up to $0.0012 per call. The unit is max_call: "Maximum per call. Successful runs settle at the actual AnyAPI charge." The totals below are ceilings, not settled charges

StepFormulaUnit pricePlanned quantityTotal
Single profile embed checkcalls x max priceup to $0.0012 per call1$0.0012
40-profile landing-page auditcalls x max priceup to $0.0012 per call40$0.048

Model fees for the agent are not counted. A 40-handle audit uses 40 calls, one per handle, and reaches at most $0.048 under this price. A single check reaches at most $0.0012. The 40-call row matches the brief: one call for each handle in the landing-page audit

Run the audit

Start with the Instagram embed tool and run one handle before the set of 40. Check found and data.html on that first row, then continue if the shape matches the worksheet

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.
Explore Instagram tools and pricing

FAQ

How do I get an Instagram profile embed HTML by handle?

Call anyapi.instagram.embed once per handle with handle set to the username without the leading @. Then read found, data.html and reason in the output row.

What does anyapi.instagram.embed take?

The contract documents handle as a required string: the Instagram username without the leading @. It also maps username as an alias for handle.

What does found false mean for this tool?

found false means no result, and reason is not found: the source states the target does not exist or returned nothing for it. The call is still successful and settles at the actual AnyAPI charge.

How do I read data and data.html?

data is null or an object with html. The contract says html is populated whenever the provider has data for the entity.

How much does a 40-handle Instagram embed audit cost?

At up to $0.0012 per call, 40 calls are at most $0.048. A single check is at most $0.0012, and successful runs settle at the actual AnyAPI charge.

Can I use a profile URL as the handle?

The contract says handle is the username without the leading @. If you have a profile URL, use the segment after instagram.com/ as the handle.

Does a not-found handle still cost a call?

Yes. A found: false result is a successful call, not an error, and still settles at the actual AnyAPI charge.

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.

See Instagram tools

Share this article