How to embed an Instagram feed on your website.
Instagram's own embed shows one public post at a time, not a whole feed. Here is how to embed an Instagram post on your website, why a full feed needs a different tool, and the rules that apply to both.
- Published
- Reading time
- 6 min read
The short answer
- Instagram has no whole-feed embed like Facebook’s Page Plugin. Its embed shows one public post at a time.
- Each post embed is a blockquote plus Instagram’s embed script, which turns the quote into the post.
- Only public posts and profiles embed. Stories do not, and neither do posts on private or age-restricted accounts.
- A feed of several posts, styled to your site, needs a tool built on Instagram’s API, not a copied snippet.
- Meta’s endpoint is for websites and apps only. Using its content for anything else is prohibited.
How do you embed an Instagram post on your website?
Copy the post’s embed code from Instagram and paste it into your page’s HTML where the post should appear. The post must be public. Instagram’s embed draws the post, with its image, caption and link, inside your page. It shows one post per embed, so repeat the code for each one you want.
Instagram offers embeds for individual public posts. Its developer documentation describes the same embed for both posts and profiles, according to Meta’s Instagram oEmbed documentation. The endpoint behind it returns the code for a post’s address, and Meta states that it is “only meant to be used for embedding Instagram content in websites and apps”.
- Open the public post on a desktop browser. The mobile app does not show the embed option in every guide we checked.
- Find the embed option under the post’s three-dot menu. The step was described by third-party guides and is not in Meta’s developer pages, so check it on the day you follow it, as Instagram’s menus change.
- Copy the code and paste it into a custom HTML or code block where the post should appear. Our install guides cover the blocks on each platform.
The code is a blockquote holding the post’s link, followed by Instagram’s embed script. The script finds the blockquote on the page and replaces it with the rendered post. Include the script once per page, not once per post.
Can you show a whole Instagram feed on a website?
Not with Instagram’s own embed. The embed shows one post at a time, and Meta does not provide a styled feed of an account’s recent posts for websites. A feed of several posts needs a tool that reads the account through Instagram’s API and lays the posts out for you.
That is the gap most people run into. A single post embeds cleanly, but ten posts means ten embeds, each with its own height, and they do not line up. Tools that show a grid or wall of recent posts read the account through Instagram’s API, which needs an account connection and approval from Meta. The rules on what can be shown and stored apply to those tools, not to the free embed.
What the single-post embed will not do
- It shows one public post per embed, not a feed or a grid.
- It cannot show Stories, which are not supported.
- It does not embed posts from private, inactive or age-restricted accounts.
- Its size follows the post. You cannot set a fixed height that matches the rest of your page.
Can a developer get the post code without the Instagram app?
Yes. Meta’s oEmbed endpoint returns the embed code for any public post’s address, so a developer can request it from their own code. The endpoint is for websites and apps only, and Meta prohibits using the content or its metadata for any other purpose.
https://graph.facebook.com/instagram_oembed?url=https://www.instagram.com/p/POST_ID/Replace POST_ID with the post’s ID. Meta’s page does not say whether a token is required, so check the current documentation before building on it. The response includes the HTML to place on the page. Use it for websites and apps you run, and do not store the response beyond what your site needs.
Questions people also ask
For a single post, yes: copy its embed code and paste it into your page’s HTML. For a feed of several posts, you need a tool or a developer, because Instagram’s own embed does not show a feed.
The most common reasons are that the post is private, the account is private or age-restricted, or the post is a Story. Only public posts from public accounts embed. Check the post’s privacy in Instagram, then copy the code again.
It loads Instagram’s script, which adds weight to the page. Embed only the posts you need, and place the embed low on the page so it does not hold up the content above it.
Only a little. The embed sizes itself to the post, and Instagram sets its layout. Wrap it in a container to control the width, and accept that its colours and type are Instagram’s.
Sources
- 1.Instagram Platform: Embed an Instagram PostMeta for Developers
- 2.Page Plugin (for the Facebook comparison)Meta for Developers
Keep reading
Put real posts on your site, where Google can read them.
One deferred script, rendered into your page, no cookies. Your first feed is free and needs no card.
Build your first feed