Instagram Embed HTML API
Classic Instagram embed snippet — blockquote.instagram-media + embed.js. Drop html into your page.
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 the official oEmbed snippet as html: a <blockquote class="instagram-media"> plus one <script src="https://www.instagram.com/embed.js">. That is safe to drop into a host page. html is never Instagram's full /embed/captioned/ Facebook document. embedUrl is the player page — point an <iframe src> at it if you want that document isolated. Also returns permalink, shortcode or username, and type (post/reel/profile). Flat 1 credit. Pass cache=true for the 24h shared cache (0 credits on hit); default is always fresh.
What you get
- blockquote.instagram-media + embed.js (safe to paste)
- embedUrl for an isolated iframe player
- Canonical permalink + shortcode or username
- Type flag (post/reel/profile)
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": "[HTML omitted in docs — call the API for the full document. Docs examples must not embed raw HTML documents.]"
}
}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 and a data object with the following fields:
Top-level fields
platformPlatform identifier for this response (matches the endpoint's platform).urlCanonical URL of the item.typeContent type of the item.shortcodeInstagram shortcode of the post (posts/reels only).permalinkCanonical Instagram permalink for the embed.embedUrlInstagram's /embed/ or /embed/captioned/ player URL — use as iframe src if you want that document isolated.htmlblockquote.instagram-media + embed.js. Safe to drop into a host page. Never the full /embed/ Facebook document.
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 (0 credits on hit). Default false — always fetch fresh. |
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 cache (0 credits on hit); default is always fresh. Selected profile endpoints also accept cacheMaxAge=1d|3d|7d|14d|30d. 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 cache (0 credits on hit); default is always fresh. Selected profile endpoints also accept cacheMaxAge=1d|3d|7d|14d|30d. 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.