Utility
Id conversion, share-link resolution, balance and health.
Four endpoints that support the rest. All four are free — none of them costs a billed Instagram request.
pk ⇄ shortcode
Converts a media pk to its shortcode and back. Pass exactly one of pk or
code.
GET /resolve/media?code=B4XpqViUFUI{ "pk": "2168384974851429640", "code": "B4XpqViUFUI" }Free and instant: the shortcode is base64 of the pk over Instagram's alphabet,
so this is arithmetic done locally with no network call. You rarely need it —
/posts/{id} accepts either form directly — but it is useful
for normalising ids before storing them.
Query Parameters
Numeric media pk
Media shortcode
curl -X GET "https://example.com/resolve/media"{
"status": "success",
"data": {}
}{}What comes back in data
The { pk, code } pair shown above — one of two responses we define ourselves
(the other is /system/balance), because it is computed rather than proxied.
oEmbed and share links
Two jobs in one endpoint, because Instagram serves both from the same place.
For a post or reel URL, you get the oEmbed block — title, author, thumbnail, embed HTML.
For a /s/ share link, you get what it points at: reel_id, author_id
and can_view. That is how you turn a shared story or highlight link into
something you can fetch:
GET /oembed?url=https://instagram.com/s/aGlnaGxpZ2h0OjE4MDI...
# -> { "reel_id": "highlight:18021...", "author_id": "25025320", ... }
GET /highlights/18021...Query Parameters
Post/reel URL, or a /s/ share link
curl -X GET "https://example.com/oembed?url=string"{
"status": "success",
"data": {}
}{}What comes back in data
{
"author_id": "25025320",
"author_name": "instagram",
"reel_id": "highlight:18021...",
"media_id": null,
"can_view": true,
"title": "A caption",
"html": "<blockquote class=\"instagram-media\">…</blockquote>",
"thumbnail_url": "https://scontent.cdninstagram.com/..."
}A post URL populates title / html / thumbnail_url; a /s/ share link
populates reel_id / author_id / can_view. The unused half is null.
Balance
Your account's remaining USD balance, read live from the ledger, so a top-up shows up immediately.
curl -X GET "https://example.com/system/balance"{
"status": "success",
"data": {}
}What comes back in data
{ "balance_usd": "12.4832", "currency": "USD" }A string, not a number — money must not round-trip through binary floating point.
Health
Liveness. The only endpoint that needs no API key, so it is safe to use as an uptime probe.
curl -X GET "https://example.com/system/health"{
"status": "success",
"data": {
"property1": "string",
"property2": "string"
}
}What comes back in data
{ "status": "ok" }Errors
| Code | When |
|---|---|
invalid_parameter | Neither pk nor code given, or the value will not convert (if both are given, pk wins). |
unprocessable_entity | url missing. |
not_found | The URL points at something deleted. |