Instagram oEmbed API
GET /v1/instagram/oembed?url= returns the embed data for a public Instagram post or reel: the author's username and id, the numeric media id and shortcode, a thumbnail and Instagram's own embed HTML. Instagram's official oEmbed endpoint needs a Meta developer app, app review and an access token; this route needs only your API key.
Cost: 1 credit per call read live. Answers are cached for 15 minutes; cache hits and failed calls are free.
Every example on this page follows what you type here.
GET /v1/instagram/oembed?url=https://www.instagram.com/p/DCSf3TJ3gB7/
Sample data in the live schema. Use private_x, ghost_x or hidden_x to see errors.
What it is for
- Link previews and CMS embeds: drop
htmlinto a page (it loads Instagram's own embed script), or build your own card fromtitle,authorandthumbnail_url. - Share links:
instagram.com/s/…links (how the app shares stories and highlights) carry no ids you can read. This route tells you the author and, for a highlight, itshighlight_id, ready for the Highlights API. - Owner of a post from its link, without reading the whole post.
For a plain post or reel link, the free URL resolver already gives the shortcode and media id without any call to Instagram. Use this route when you also need the author, the thumbnail or the embed HTML, or when the link is a /s/ share link.
Parameters
urlqueryrequiredinstagram.com/p/…, /reel/…, /reels/… or /tv/… link, or an instagram.com/s/… share link, URL-encoded. Tracking parameters are dropped before the lookup.freshqueryoptionaltrue bypasses the cache and is billed as a live call.Response
Sandbox-key sample, live schema:
| Field | Meaning |
|---|---|
type | post for a post or reel link, share_link for an /s/ link |
media_id, shortcode, url | The post, when the link points to one |
author | id, username and profile url of the account that posted it |
highlight_id | Set when a share link points to a story highlight |
thumbnail_url, thumbnail_width, thumbnail_height | Instagram's preview image |
html | Instagram's embed markup: a blockquote plus instagram.com/embed.js |
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | url is missing or is not an instagram.com post, reel or share link |
| 403 | private_account | The post belongs to a private account (not billed) |
| 404 | user_not_found | No such post, or the link has expired (not billed) |
FAQ
Can I use Instagram oEmbed without a Facebook app?
Yes. Send the post URL to /v1/instagram/oembed; you get the same kind of data Instagram's own oEmbed returns, with only a HandleHaul API key.
Does the embed HTML work on my site?
It is Instagram's own markup and script, so it renders the way Instagram's embeds do. Posts from private accounts cannot be embedded.
How do I find what an instagram.com/s/ link points to?
Pass it as url. The answer names the author and, for a highlight, the highlight_id.