Instagram Post embed code API
Get the Instagram oEmbed embed code for a post or Reel from its url: html shows as the official embed card once you paste it into a page, with author_name and thumbnail_url alongside, for $0.56 per 1,000 calls.
htmlis the embed code for your pagehidecaptioncontrols whether the caption showsmaxwidthlimits the card width
API health
- 24h health
- Normal
- Healthy / normal
- Available
- Limited
- Mostly down
Last 24 hours
Last 30 days
1Request
POST /api/v1/social { "platform": "instagram", "action": "oembed", "params": { "url": "https://www.instagram.com/p/DbYmqpplO_N/" } }2JSON response
{ "results": { "author_name": "n•••a", "version": "1.0", "type": "rich", "title": "The Sun and Moon are coming together to put on a show for Earth, and we'll be sharing it with you. 😎\n\nOn Aug. 12, a total solar eclipse will pass over Earth, and we'll be broadcasting it live along the path of totality. Check our link in bio to learn how to watch along with us!\n\n…", … } }3Fields
author_name version type title n•••a 1.0 rich The Sun and Moon are coming together to put on a show for Earth, and we'll be sharing it with you. 😎 On Aug. 12, a total solar eclipse will pass over Earth, and we'll be broadcasting it live along the path of totality. Check our link in bio to learn how to watch along with us! … 4CSV
instagram-oembed-sample.csv version,type,title,author_name,author_url,author_id,media_id,provider_name,provider_url,width,html,thumbnail_url,thumbnail_width,thumbnail_height,shortcode,url,platform
url and the optional hidecaption and maxwidth returns one JSON object. html is the embed code, with author_name, thumbnail_url and more, ready as a field table or a CSV.What data you get
The table shows a real call for instagram.com/p/DbYmqpplO_N, captured November 21, 2026 at 07:18 (UTC), that returned one object. Gray bars cover personal information that was removed (••• in the CSV). Your own calls return the fields listed in the field reference.
| version | type | title | author_name | author_url | author_id | media_id | provider_name | provider_url | width | html | thumbnail_url | thumbnail_width | thumbnail_height | shortcode | url | platform |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1.0 | rich | The Sun and Moon are coming together to put on a show for Earth, and we'll be sharing it with you. 😎 On Aug. 12, a total solar eclipse will pass over Earth, and we'll be broadcasting it live along the path of totality. Check our link in bio to learn how to watch along with us! … | n•••a | instagram.com/ | 3952078729724096461_528817151 | https://www.instagram.com | 540 | <blockquote class="instagram-media" data-instgrm-captioned data-instgrm-permalink="https://www.instagram.com/reel/DbYmqpplO_N/?utm_source=ig_embed&utm_campaign=loading" data-instgrm-version="14" style=" background:#FFF; border:0; border-radius:3px; box-shadow:0 0 1px 0 rgba(0… | https://scontent-lax3-1.cdninstagram.com/v/t51.82787-15/760192799_18631809481049152_7782886010573196119_n.jpg?stp=dst-jpg_e15_tt6&_nc_cat=109&_nc_map=urlgen_bucketless&ig_cache_key=Mzk1MjA3ODcyOTcyNDA5NjQ2MTE4NjMxODA5NDc1MDQ5MTUy.3-ccb7-5&ccb=7-5&_nc_sid=58cdad&efg=eyJ2ZW5jb2RlX3… | 1080 | 1920 | DbYmqpplO_N | https://www.instagram.com/reel/DbYmqpplO_N/ |
Use cases
Show a post on a web page
Paste
htmlinto a blog or a content management system, and the page shows the Instagram embed card.Show the card without the caption
Set
hidecaptiontotrueand the embed card does not show the caption.Fit the page layout
Use
maxwidthto limit the card width, and lay the page out withwidth.Build a link preview
Read
thumbnail_url,author_nameandtitleto give a post link a thumbnail and an author name.
Instagram oEmbed vs EveryInfra
Meta's Instagram oEmbed and EveryInfra oembed, compared on supported posts, the embed code, maximum width and unsupported posts.
| Compared | Instagram oEmbed | EveryInfra |
|---|---|---|
| Supported posts | "Supports photo, video, Reel, and Feed posts." | url takes the link to a post or Reel (/p/ or /reel/ form). |
| The embed code | "The embed HTML will be assigned to the html property." | html is the embed code, the same as Instagram's official oEmbed. The response also has author_name, thumbnail_url, shortcode and more. |
| Maximum width | "You can set the maximum width by including the maxwidth query string parameter in your request." | maxwidth is an integer from 320 to 658 in pixels, and defaults to 540. |
| Unsupported posts | "Posts on private, inactive, and age-restricted Instagram accounts are not supported." | When the post does not exist or cannot be seen, the call returns an empty result with no charge. |
Quotes are from Meta's developer documentation, which shows an update date of 2026-05-15, checked 2026-11-22. Official sources: Embed an Instagram Post (updated 2026-05-15)
Limits and gotchas
urlis required: the link to a post or Reel.- When
hidecaptionistrue, the embed card does not show the caption. It defaults tofalse. maxwidthis an integer from 320 to 658. It defaults to 540.- When the post does not exist or cannot be seen, the call returns an empty result with no charge.
Pricing
Each call costs $0.000556, whatever the number of fields, and returns the embed code for one post. Failed calls and empty results are not charged.
| Calls | Cost |
|---|---|
| 10,000 | $5.56 |
| 100,000 | $55.56 |
| 1,000,000 | $555.56 |
Totals use the list price per call.
Code samples
#curl -X POST 'https://api.everyinfra.com/api/v1/social' \
-H "Authorization: Bearer $EVERYINFRA_API_KEY" \
-H 'Content-Type: application/json' \
--data-raw '{
"platform": "instagram",
"action": "oembed",
"params": {
"url": "https://www.instagram.com/p/DbYmqpplO_N/"
}
}'OpenAPI definition (JSON)Samples read the key from the EVERYINFRA_API_KEY environment variable; copied code never contains your key.
API reference
See the parameters, response fields, errors and billing for oembed, and copy the page or open it as Markdown for an AI assistant.
AI prompt
#Please help me write a data collection script with the EveryInfra Instagram Post embed code endpoint (instagram/oembed).
How the endpoint works:
- Request: POST https://api.everyinfra.com/api/v1/social with the header Authorization: Bearer <API key>. Read the key from the EVERYINFRA_API_KEY environment variable and never hard-code it.
- In the request body, set platform to instagram and action to oembed, and put the parameters inside params.
- Required parameters:
- url: A post or Reel link, such as https://www.instagram.com/p/<shortcode>/ or https://www.instagram.com/reel/<shortcode>/.
- Optional parameters:
- hidecaption: true hides the post caption in the embed. Defaults to false.
- maxwidth: Maximum embed width in pixels, an integer from 320 to 658. Defaults to 540.
- Returns one object. Main fields: version ((oembed) oEmbed version, 1.0), type, title, author_name, author_url, author_id, media_id (The numeric post ID), provider_name ((oembed) Always Instagram), provider_url ((oembed) Always https://www.instagram.c…), width (Width of the original image or video, i…), html ((oembed) Embed code: a blockquote plus…), thumbnail_url; 16 fields in total, full list at https://api.everyinfra.com/api/v1/social/catalog?platform=instagram.
- Example request body:
{
"platform": "instagram",
"action": "oembed",
"params": {
"url": "https://www.instagram.com/p/DbYmqpplO_N/"
}
}
- Price: $0.56 per 1,000 requests; failed and empty results are not charged.
- For dozens or hundreds of targets, add "mode": "async" to the body: you get a job_id at once and poll GET https://api.everyinfra.com/api/v1/jobs/{job_id} for the result.
- On 422, fix the request using the suggested parameter names and allowed values in the error; on 429 or 503, wait for Retry-After and try again.
Before writing code, ask me which targets I need, how many, which fields, and what output format I want; then confirm the plan and the rough cost with me.Request parameters
#| Name | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
Authorization | header | string | Yes | - | Bearer followed by your API key. Create it in the console; never put it in a URL or a code repository. |
platform | body | string | Yes | instagram | Platform identifier, fixed value. |
action | body | string | Yes | oembed | Capability identifier, fixed value. |
url | body.params | string | Yes | - | A post or Reel link, such as https://www.instagram.com/p/<shortcode>/ or https://www.instagram.com/reel/<shortcode>/. |
hidecaption | body.params | boolean | No | - | true hides the post caption in the embed. Defaults to false. |
maxwidth | body.params | integer | No | - | Maximum embed width in pixels, an integer from 320 to 658. Defaults to 540. |
Response example
#{ "id": "req_…", "platform": "instagram", "action": "oembed", "results": { "version": "1.0", "type": "rich", "title": "The Sun and Moon are coming together to put on a show for Earth, and we'll be sharing it with you. 😎\n\nOn Aug. 12, a total solar eclipse will pass over Earth, and we'll be broadcasting it live along the path of totality. Check our link in bio to learn how to watch along with us!\n\n…", "author_name": "n•••a", "author_url": "https://www.instagram.com/•••", "author_id": "•••", "media_id": "3952078729724096461_528817151", "provider_name": "Instagram", "provider_url": "https://www.instagram.com", "width": 540, "html": "<blockquote class=\"instagram-media\" data-instgrm-captioned data-instgrm-permalink=\"https://www.instagram.com/reel/DbYmqpplO_N/?utm_source=ig_embed&utm_campaign=loading\" data-instgrm-version=\"14\" style=\" background:#FFF; border:0; border-radius:3px; box-shadow:0 0 1px 0 rgba(0…", "thumbnail_url": "https://scontent-lax3-1.cdninstagram.com/v/t51.82787-15/760192799_18631809481049152_7782886010573196119_n.jpg?stp=dst-jpg_e15_tt6&_nc_cat=109&_nc_map=urlgen_bucketless&ig_cache_key=Mzk1MjA3ODcyOTcyNDA5NjQ2MTE4NjMxODA5NDc1MDQ5MTUy.3-ccb7-5&ccb=7-5&_nc_sid=58cdad&efg=eyJ2ZW5jb2RlX3…", "thumbnail_width": 1080, "thumbnail_height": 1920, "shortcode": "DbYmqpplO_N", "url": "https://www.instagram.com/reel/DbYmqpplO_N/", "platform": "instagram" }, "billing": { "charged": …, "charged_usd": …, "balance_after_usd": …, … }, "quota": { … }}
Response fields
#Business data is in results. The table lists the fields a record can contain; values the platform does not show are never made up.
| Field | Meaning |
|---|---|
version | (oembed) oEmbed version, 1.0. |
type | Record type; values depend on the capability (for example video / image / text). |
title | Title. null when the platform has no titles (for example text-only posts). |
author_name | Author's display name. |
author_url | Link to the author's profile on the platform. |
author_id | Author's unique ID on the platform. |
media_id | The numeric post ID. oembed gives it as postID_authorID. |
provider_name | (oembed) Always Instagram. |
provider_url | (oembed) Always https://www.instagram.com. |
width | Width of the original image or video, in pixels. |
html | (oembed) Embed code: a blockquote plus Instagram's embed.js that shows the official embed card. |
thumbnail_url | Thumbnail link, lower resolution than image_url. |
thumbnail_width | (oembed) Thumbnail width in pixels. |
thumbnail_height | (oembed) Thumbnail height in pixels. |
shortcode | The post shortcode: the part of the post link after /p/ or /reel/. |
url | Link to the record on the platform. |
platform | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |
Errors and billing
#- 401
- Missing or invalid key.
- 402
- Insufficient balance. Top up first.
- 422
- Invalid parameter name or value. Fix it using the suggestions in the error. No charge.
- 429
- Per-minute request limit reached. Wait for Retry-After, then try again.
- 503
- Could not complete. The held charge is returned to your balance. If the outcome is unknown, verify it before you retry.
- 200 empty
- No data. No charge.
FAQ
What does the Instagram embed code endpoint return?
The same fields and embed code as Instagram's official oEmbed: html, author_name, author_url, thumbnail_url, width, shortcode, url and more.
How do I embed a post in a web page?
Send the post url, then paste html from the response into the page. It shows as the Instagram embed card.
How much does one embed code cost?
Billing is per call: $0.000556 each, or $0.56 per 1,000 calls. Failed calls and empty results are not charged.
Do I need to log in to Instagram to get an embed code?
No. Put your EveryInfra API key in the Authorization: Bearer header. You need no Instagram login and no Instagram access token.
How do oembed and post differ?
oembed returns html for embedding and basic data. post reads the content data of a post, such as the caption, like count and comment count.
Related Instagram endpoints
The same EveryInfra API key also calls Instagram's other endpoints, such as post, which reads the content of a post from its link.
- Post details
post$0.56 per 1,000 callsFetch one or more Instagram posts or Reels from the links inurls. - Details
profile$0.56 per 1,000 callsLook up an Instagram account by handle or profile URL. - Account insights
persona$0.56 per 1,000 callsGet an account overview for an Instagram handle, built from its public profile. - Posts by user
user_posts$0.56 per 1,000 callsList posts from an Instagram account byusername, each with caption, media type, likes, comments, views, location, hashtags and top comments. - Content discovery
discover$0.56 per 1,000 callsTrack posts under an Instagram hashtag passed inkeyword. - Comments
comments$0.79 per 1,000 callsRead comments on one Instagram post or Reel aturl. - Reels
reels$1.19 per 1,000 callsPull an Instagram account's Reels byusername, with caption, play count, duration in seconds, likes, comments, hashtags, music and video link. - Hashtag
hashtag$0.56 per 1,000 callsCollect posts for an Instagram hashtag inhashtag, without the # sign. - Followers
followers$0.56 per 1,000 callsSee the follower and following counts of an Instagram account byusername. - Follower list
followers_list$0.56 per 1,000 callsList the accounts that follow an Instagram user, byusername, with handle, name, avatar, private and verified flags and relation type. - Following list
following_list$0.56 per 1,000 callsList the accounts an Instagram user follows, byusername, with handle, name, avatar, private and verified flags and relation type. - Account search
user_search$4.81 per 1,000 callsSearch Instagram accounts bykeyword, in the order Instagram search ranks them for that word. - Reels search
reels_search$7.19 per 1,000 callsSearch Instagram Reels bykeyword, such as coffee. - Similar accounts
similar_profiles$8.81 per 1,000 callsFind accounts Instagram suggests as similar to one account, byusernamesuch as nasa. - Tagged posts
tagged_posts$7.44 per 1,000 callsList public posts by other accounts that tag one Instagram account, given asusername, profile URL or numeric user ID. - Stories
stories$1.5 per 1,000 callsGet the stories an Instagram account has live right now, from its username. - Story highlights
highlights$1.6 per 1,000 callsList the story highlights on an Instagram profile. - Comment replies
comment_replies$0.88 per 1,000 callsRead the replies under one comment on an Instagram post or Reel, from the post link and the comment'sidreturned bycomments. - Post likers
likers$1.32 per 1,000 callsList the accounts that liked one Instagram post or Reel, from itsurl. - Posts at a location
location_posts$0.56 per 1,000 callsList the posts tagged at one Instagram location, fromlocation_id(theidin a post'slocation_detail, or a location page link). - Reels using a music track
audio_posts$0.56 per 1,000 callsList the Instagram Reels that use one piece of music, fromaudio_id(theaudio_idin a post'smusic, or an audio page link). - Explore
explore$0.56 per 1,000 callsRead one page of the posts Instagram recommends on Explore; no input is needed. - Engagement statistics
engagement$0.56 per 1,000 callsWork out an Instagram account's engagement from its latest posts, byusername. - Profile by numeric ID
profile_by_id$0.56 per 1,000 callsLook up an Instagram account from its numericuser_id. - About this account
user_about$0.56 per 1,000 callsRead the About this account panel of an Instagram profile byusername: the month it joined (joined_at), itscountry, how many times it changed its username (former_usernames_count) and when it was verified. - Location details
location_info$0.56 per 1,000 callsRead one Instagram location from itslocation_id: name, category, coordinates (lat,lng), address details when listed, andpost_count. - Link recognition
resolve_links$0.56 per 1,000 callsConvert one Instagram post reference intext(a post link, a shortcode or a numeric post ID) into all three:shortcode,media_idandurl. - Post caption translation
post_translation$6.39 per 1,000 callsTranslate the caption of one Instagram post intotarget_language(defaulten), from itsurlormedia_id. - Nearby locations
location_nearby$0.56 per 1,000 callsList the locations Instagram shows near one location, from itslocation_id: about 20 rows in one call, no next page. - Hashtag search
hashtag_search$0.56 per 1,000 callsFind Instagram hashtags for akeyword: the hashtags Instagram's search box suggests, withpost_countfor each. - Stories in a highlight
highlight_stories$0.56 per 1,000 callsRead every story in one Instagram highlight fromhighlight_id(theidfromhighlights, or a highlight link): up to 100 stories in one call, with media links,posted_atandduration_seconds. - Comment translations
comment_translations$6.39 per 1,000 callsTranslate up to 10 comments on one Instagram post, from the posturlandcomment_ids, intotarget_language(defaulten). - Recommended Reels
recommended_reels$1.18 per 1,000 callsRead the Reels Instagram recommends on its Reels page, 10 per page; no input is needed. - User reposts
user_reposts$0.56 per 1,000 callsList the posts and Reels an Instagram account reposted to its profile, byusername, 12 per page. - Cities in a country
location_cities$0.56 per 1,000 callsList the cities Instagram's location directory has for onecountry_code, 96 per page. - Locations in a city
city_locations$0.56 per 1,000 callsList the locations Instagram's location directory has for one city, fromcity_id, 96 per page. - Profiles in bulk
profiles_batch$0.56 per 1,000 callsLook up as many as 20 Instagram accounts at once fromusernames, each given as a username such asnatgeoor a profile link.