Instagram Embed HTML API
Get Instagram's own self-contained embed HTML for any post, reel, or profile — ready to drop into an iframe on your site.
GET request to /v1/instagram/embed that responds with clean JSON and costs 1 credit. Pass cache=true for a free 24h cache hit; default is always fresh. Start with 100 free credits — no credit card.What is the Instagram Embed HTML API?
Pass an Instagram post, reel, or profile URL (or an @handle) and get back Instagram's own self-contained embed page as ready-to-use HTML — the full <html> document Instagram serves at /embed/, which you can drop straight into an <iframe srcdoc> or render server-side. The response also returns embedUrl, so you can point an <iframe src> at it directly instead. Posts and reels come back as a rich media card (with caption); profiles come back as a profile card that links to the account. No login or OAuth needed — it's fast, costs just 1 credit. Pass cache=true to serve from the 24h shared cache (0 credits on hit); default is always fresh. If Instagram's embed page is ever unavailable, the response falls back to the classic blockquote + embed.js snippet.
What you get
- Instagram's full self-contained embed HTML document
- embedUrl you can load directly in an <iframe src>
- Canonical Instagram permalink for the post/reel/profile
- Type flag (post/reel/profile) plus shortcode or username
Try it
Fill in the parameters below and copy a ready-to-run request, or open the live Playground to run it against your account (no API key paste).
Parameters
curl "https://api.captapi.com/v1/instagram/embed?url=https%3A%2F%2Fwww.instagram.com%2Fp%2FDZFqdAxlkUG%2F" \
-H "Authorization: Bearer capt_live_..."
# or: -H "x-api-key: capt_live_..."Edit the parameters and the code updates instantly. Switch languages and hit copy.
Example response
{
"success": true,
"data": {
"platform": "instagram",
"url": "https://www.instagram.com/p/DZFqdAxlkUG/",
"type": "post",
"shortcode": "DZFqdAxlkUG",
"permalink": "https://www.instagram.com/p/DZFqdAxlkUG/",
"embedUrl": "https://www.instagram.com/p/DZFqdAxlkUG/embed/captioned/",
"html": "<!DOCTYPE html> <html lang=\"en\" id=\"facebook\" class=\"no_js\"> <head><meta charset=\"utf-8\" /><meta name=\"referrer\" content=\"default\" id=\"meta_referrer\" /> ... Instagram's full self-contained embed document (truncated for docs) ... </body></html>"
}
}Billing metadata is returned in response headers: X-Captapi-Credits (credits charged), X-Captapi-Cache (hit or miss), and X-Captapi-Source. Failed requests (4xx/5xx) are never charged. See the full list of error codes in the error reference.
Response structure
A successful call returns success, cached, creditsUsed, and a data object with the following fields:
Top-level fields
platformPlatform identifier (e.g. youtube, instagram).urlCanonical URL of the item.typeContent type of the item.shortcodeInstagram shortcode of the post (posts/reels only).permalinkCanonical Instagram permalink for the embed.embedUrlEmbed page URL — load it directly in an <iframe src>.htmlInstagram's self-contained embed HTML document (drop into an <iframe srcdoc>).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| url | string | Yes | Instagram post, reel, or profile URL (or @handle), e.g. https://instagram.com/reel/ID/ or https://instagram.com/username/. The URL platform must match this endpoint's platform. Do not pass cross-platform URLs, e.g. YouTube to TikTok, Instagram to Facebook, LinkedIn to X/Twitter, or Pinterest to Rumble. |
| cache | boolean | No | Set true to serve from the 24h response cache. Default false — always fetch fresh data. |
Authentication: send your key as Authorization: Bearer capt_live_.... A typical call costs 1 credit. Pass cache=true for a free 24h cache hit; default is always fresh.
How it works
- 1. Sign up — get 100 free credits, no card required.
- 2. Create a key from your dashboard.
- 3. Send one request to
/v1/instagram/embedand parse the JSON response.
Use cases
Analytics
Track views, likes, and engagement over time.
Competitor Monitoring
Benchmark the performance of other creators.
Dashboards
Power reporting and BI with real metadata.
Content Curation
Filter and rank videos by performance.
Frequently asked questions
What does the Instagram Embed HTML API do?+
The Instagram Embed HTML API lets you fetch full metadata and key stats from a public Instagram embed html using one GET request to /v1/instagram/embed. It returns clean JSON — no OAuth or infrastructure setup required.
How many credits does the Instagram Embed HTML API cost?+
Each successful call costs 1 credit. Pass cache=true to serve from the 24h shared cache (0 credits on hit); default is always fresh. Failed or empty results are never charged.
Do I need a Instagram API key or OAuth?+
No. A single Captapi key works across every platform Captapi supports — YouTube, TikTok, Instagram, Facebook, Twitter/X, Reddit, Threads, Bluesky, Pinterest, LinkedIn, Rumble, Spotify, Kwai, and more. We handle proxies, rate limits, retries, and authentication for you.
Is the Instagram Embed HTML API suitable for production use?+
Yes. It is a stable REST endpoint with predictable JSON and automatic retries. Pass cache=true to serve from the 24h shared cache (0 credits on hit); default is always fresh. Use it for analytics, monitoring, and content automation.
More Instagram APIs
Ready to use the Instagram Embed HTML API?
Sign up, grab your key, and make your first call in 60 seconds.