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.

  • html is the embed code for your page
  • hidecaption controls whether the caption shows
  • maxwidth limits the card width

API health

24h health
Normal
  • Healthy / normal
  • Available
  • Limited
  • Mostly down
Normal

Last 24 hours

Last 30 days

  1. 1Request

    POST /api/v1/social
    {
      "platform": "instagram",
      "action": "oembed",
      "params": {
        "url": "https://www.instagram.com/p/DbYmqpplO_N/"
      }
    }
  2. 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…",
        …
      }
    }
  3. 3Fields

    author_nameversiontypetitle
    n•••a1.0richThe 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! …
  4. 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

A request with the post 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.

versiontypetitleauthor_nameauthor_urlauthor_idmedia_idprovider_nameprovider_urlwidthhtmlthumbnail_urlthumbnail_widththumbnail_heightshortcodeurlplatform
1.0richThe 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•••ainstagram.com/3952078729724096461_528817151Instagramhttps://www.instagram.com540<blockquote class="instagram-media" data-instgrm-captioned data-instgrm-permalink="https://www.instagram.com/reel/DbYmqpplO_N/?utm_source=ig_embed&amp;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…10801920DbYmqpplO_Nhttps://www.instagram.com/reel/DbYmqpplO_N/instagram

Use cases

  • Show a post on a web page

    Paste html into a blog or a content management system, and the page shows the Instagram embed card.

  • Show the card without the caption

    Set hidecaption to true and the embed card does not show the caption.

  • Fit the page layout

    Use maxwidth to limit the card width, and lay the page out with width.

  • Build a link preview

    Read thumbnail_url, author_name and title to 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.

ComparedInstagram oEmbedEveryInfra
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

  • url is required: the link to a post or Reel.
  • When hidecaption is true, the embed card does not show the caption. It defaults to false.
  • maxwidth is 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.

CallsCost
10,000$5.56
100,000$55.56
1,000,000$555.56

Totals use the list price per call.

Code samples

#
bash
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.

POST

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

#
NameInTypeRequiredDefaultDescription
AuthorizationheaderstringYes-Bearer followed by your API key. Create it in the console; never put it in a URL or a code repository.
platformbodystringYesinstagramPlatform identifier, fixed value.
actionbodystringYesoembedCapability identifier, fixed value.
urlbody.paramsstringYes-A post or Reel link, such as https://www.instagram.com/p/<shortcode>/ or https://www.instagram.com/reel/<shortcode>/.
hidecaptionbody.paramsbooleanNo-true hides the post caption in the embed. Defaults to false.
maxwidthbody.paramsintegerNo-Maximum embed width in pixels, an integer from 320 to 658. Defaults to 540.

Response example

#
Captured November 21, 2026 at 07:18 (UTC) by calling this API with the parameters in the code sample above. results and count are that call's real response with personal information (names, handles, avatars, profile links, contact details) removed. id, billing and quota differ on every call, so only their shape is shown.
json
{  "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&amp;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.

FieldMeaning
version(oembed) oEmbed version, 1.0.
typeRecord type; values depend on the capability (for example video / image / text).
titleTitle. null when the platform has no titles (for example text-only posts).
author_nameAuthor's display name.
author_urlLink to the author's profile on the platform.
author_idAuthor's unique ID on the platform.
media_idThe numeric post ID. oembed gives it as postID_authorID.
provider_name(oembed) Always Instagram.
provider_url(oembed) Always https://www.instagram.com.
widthWidth 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_urlThumbnail link, lower resolution than image_url.
thumbnail_width(oembed) Thumbnail width in pixels.
thumbnail_height(oembed) Thumbnail height in pixels.
shortcodeThe post shortcode: the part of the post link after /p/ or /reel/.
urlLink to the record on the platform.
platformSource 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.

Errors

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.

The same EveryInfra API key also calls Instagram's other endpoints, such as post, which reads the content of a post from its link.

Google Analytics needs consent. Privacy