Docs

The widget is one iframe that shows one link. Everything after the first snippet is optional.

On this page

Embed the widget

Paste this where you want the widget to appear, with the link you want it to show in url. The widget shows that post, Reel, profile, Story or Highlight, ready to download. It has no link box of its own: to let visitors choose the link, use your own search box.

HTML
<iframe
  src="https://insta.flashdl.one/embed/?url=https%3A%2F%2Fwww.instagram.com%2Freel%2FABC123%2F&theme=light"
  title="Downloader for Instagram"
  width="100%" height="640"
  style="border:0;width:100%;max-width:560px;color-scheme:light"
  loading="lazy"
  referrerpolicy="strict-origin-when-cross-origin"
  sandbox="allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox allow-downloads"
  allow="clipboard-write">
</iframe>
Attribute Why it is there
src The widget’s address, with the link in url (URL-encoded) and the theme. See Parameters.
title Names the frame for screen readers.
width, style Full width of its column, up to 560px. The widget fits anything from 320px up. color-scheme:light stops a page with a dark color scheme from painting an opaque box behind the frame.
height 640px suits most pages. Add the auto-height script to size it to its content instead.
loading="lazy" The widget loads only when a visitor scrolls near it.
referrerpolicy Tells the widget your site’s name and nothing more. Your page paths stay private.
sandbox Limits what the widget can do. See Sandbox.
allow Lets the widget’s Copy link button write to the clipboard. The widget never reads the clipboard.

The widget doesn’t take links from visitors itself. Your page does, with a search box in your own design, and sends each link to the widget by setting the iframe’s address. Visitors see your search, and the result appears in the widget below it.

Copy this into your page. The form and the script are yours to style and change. The iframe stays hidden until the first search.

HTML
<form id="ig-search">
  <label for="ig-link">Instagram link or @username</label>
  <input id="ig-link" type="text" inputmode="url" autocomplete="off"
    placeholder="https://www.instagram.com/reel/…" required>
  <button type="submit">Search</button>
</form>

<iframe
  id="ig-widget"
  title="Downloader for Instagram"
  width="100%" height="640"
  style="border:0;width:100%;max-width:560px;color-scheme:light"
  referrerpolicy="strict-origin-when-cross-origin"
  sandbox="allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox allow-downloads"
  allow="clipboard-write"
  hidden>
</iframe>

<script>
document.getElementById('ig-search').addEventListener('submit', function (e) {
  e.preventDefault();
  var link = document.getElementById('ig-link').value.trim();
  if (!link) return;
  var frame = document.getElementById('ig-widget');
  frame.src = 'https://insta.flashdl.one/embed/?url=' + encodeURIComponent(link) + '&theme=light';
  frame.hidden = false;
});
</script>

If your pages are built on the server, you can do the same without JavaScript. Send the form to your own page, for example with <form method="get"> and name="link" on the input, and print the iframe with the link in its address:

PHP
<?php
$link = isset($_GET['link']) ? trim($_GET['link']) : '';
if ($link !== '') {
  $src = 'https://insta.flashdl.one/embed/?url=' . rawurlencode($link) . '&theme=light';
  echo '<iframe src="' . htmlspecialchars($src) . '" title="Downloader for Instagram"'
    . ' width="100%" height="640"'
    . ' style="border:0;width:100%;max-width:560px;color-scheme:light"'
    . ' referrerpolicy="strict-origin-when-cross-origin"'
    . ' sandbox="allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox allow-downloads"'
    . ' allow="clipboard-write"></iframe>';
}
?>
  • One iframe is enough. Reuse it for every search: setting its address again loads the new link. Each address holds one link.
  • Send what the visitor typed. The widget accepts every link form listed under Parameters, and shows a clear message for anything it can’t use, so your box doesn’t need its own checks.
  • Always encode the link with encodeURIComponent (JavaScript) or rawurlencode (PHP), and escape the address when you print it into HTML.
  • No loading="lazy" here. The iframe appears because a visitor searched, so it should load straight away.
  • The rest still works. The auto-height script, the page link handshake and theme behave the same for an iframe whose address you set.

Sandbox

We recommend the sandbox attribute. It lists exactly what the widget may do. Anything not listed, the browser blocks.

Token What it allows Without it
allow-scripts The widget to run. Nothing works.
allow-same-origin The widget to reach its own server and remember the sponsor limit. Results can’t load.
allow-popups The first Download to open the sponsor tab, and links such as Open on Instagram to open. No new tabs. Downloads still work, but this tab is what keeps FlashDL free. Our terms ask you to keep this token.
allow-popups-to-escape-sandbox New tabs to open as normal pages. New tabs inherit the sandbox and may not display correctly.
allow-downloads Download to save files. Chrome and Edge block downloads without telling anyone.

Never add allow-top-navigation or allow-top-navigation-by-user-activation. The widget doesn’t need them, and leaving them out means the browser itself prevents the widget from navigating your page.

Google treats content inside an iframe as part of your site. So we designed the widget around Google’s published ad rules. This is how it behaves against each one.

Google rule What it says What the widget does
AdSense: sites with pop-ups (opens in a new tab) Ads are not allowed on sites with more than three pop-ups. Pop-ups may not interfere with site navigation, change user preferences, initiate downloads, or distribute viruses. At most one sponsor tab per visitor every 30 minutes on your site, and only after a tap on Download. Sponsor pages that start downloads or carry malware are not allowed under our sponsor policy.
AdSense: pop-unders (opens in a new tab) “Publishers are not permitted to place Google ads on sites that contain or trigger pop-unders.” Never. The sponsor tab opens in front as a normal tab. The widget never moves focus back or hides the tab.
AdSense: site behaviour (opens in a new tab) Sites may not redirect users to unwanted websites, initiate downloads, or contain pop-ups that interfere with navigation. The recommended sandbox gives the widget no permission to navigate your page, so the browser itself stops any redirect. Files download only when a visitor taps Download.
AdSense: deceptive site navigation (opens in a new tab) Lists “False claims of streaming content, or downloads” as deceptive. Download always downloads the file, from the same tap, even if the sponsor tab is blocked. Nothing is locked behind the sponsor.
Abusive Experiences: misleading site behaviour (opens in a new tab) Page features such as play buttons, close buttons or navigation links must not lead to an ad when clicked. The sponsor tab is disclosed under the button before the tap: “Opens 1 sponsor tab”. Play, Close, Back, tabs and thumbnails never open the sponsor tab.
Abusive Experiences: unexpected click areas (opens in a new tab) Transparent backgrounds or non-visible elements must not lead to an ad when clicked. No transparent layers and no click-anywhere areas. Only the visible Download button can open the sponsor tab.
Abusive Experiences: auto redirect and history manipulation (opens in a new tab) Pages must not redirect without user action or interfere with the Back button. No redirects, no changes to your page’s history and no Back-button traps.
Abusive Experiences: fake messages and unwanted software (opens in a new tab) No fake system messages, malware or unwanted software. No fake dialogs in the widget. Sponsor links are checked with Google Safe Browsing and security vendors before they go live, and pages like these are not allowed under our sponsor policy.
Better Ads Standards (opens in a new tab) Pop-up ads, prestitials, autoplay video with sound, large sticky ads and high ad density are ad experiences to avoid. The widget holds no ad units. It adds nothing to the ad density or ad formats that Better Ads checks.

No third-party ad scripts run in the widget. Its Content-Security-Policy allows scripts from our own origin and Google Analytics, nothing else.

Our advice for your page

  1. Use the recommended sandbox attribute. It has no top-navigation permission, so the browser itself stops the widget from ever redirecting your page.
  2. Keep your ad units clear of the widget’s Download area. Google warns against placing download buttons near ads.
  3. Reserve the widget’s height, or add the auto-height script, so your layout doesn’t shift.
  4. Check your Abusive Experience Report in Google Search Console from time to time.

FlashDL is not affiliated with Google, AdSense, Instagram or Meta. Google’s policies apply to your site independently of this widget, including its rules on download tools and copyright. No third party can guarantee AdSense approval or compliance.

Parameters

Add parameters to the src address after /embed/.

Parameter Values Default What it does
url A link or @username, URL-encoded none Required. The post, Reel, profile, Story or Highlight the widget shows. One link per address. Without it, the widget shows a short “no link yet” message.
theme light, dark, auto light light unless set; auto follows each visitor’s light or dark setting from the first frame. Any other value is treated as light.

Accepted links: posts (/p/), Reels (/reel/, /reels/), /tv/, profiles, @username or a bare username, Stories (/stories/username/…) and Highlights (/stories/highlights/…). Links from m.instagram.com, without www, or with share parameters such as igsh all work. Short instagr.am links and /share/ links are not supported: open them in Instagram, tap Share, then Copy link, and use that.

Encode the value of url so its own ?, & and # don’t break the address.

Text
https://insta.flashdl.one/embed/?url=https%3A%2F%2Fwww.instagram.com%2Freel%2FABC123%2F&theme=dark
https://insta.flashdl.one/embed/?url=%40nasa&theme=auto

In code:

JavaScript
const src = 'https://insta.flashdl.one/embed/?url=' + encodeURIComponent(link) + '&theme=auto';
PHP
<?php $src = 'https://insta.flashdl.one/embed/?url=' . rawurlencode($link) . '&theme=auto'; ?>

In HTML attributes, write & as &amp; if your editor or validator asks for it. Both work in browsers.

One widget or many

  • Letting visitors choose? One iframe, driven by your own search box, handles every kind of public link.
  • Showing several posts? Give each its own iframe with its own url. Each widget looks up its link only when it scrolls into view, so a long page doesn’t fire every lookup at once.
  • Building pages with code? Make the url value from your post’s link, as in the examples above.

Auto-height

The widget reports its height to your page whenever its content changes. Add this script once, anywhere below the iframes, and every FlashDL widget on the page sizes itself. The message format, flashdl:height, is the same as the FlashDL widget for YouTube.

HTML
<script>
window.addEventListener('message', function (e) {
  if (e.origin !== 'https://insta.flashdl.one' || !e.data || e.data.type !== 'flashdl:height') return;
  var h = parseInt(e.data.height, 10);
  if (!h || h < 200) return;
  var frames = document.getElementsByTagName('iframe');
  for (var i = 0; i < frames.length; i++) {
    if (frames[i].contentWindow === e.source) frames[i].style.height = h + 'px';
  }
});
</script>

The origin check makes sure only our widget can resize your frames. Keep the height attribute on the iframe as the starting size.

Using the YouTube widget too? One script covers both. Replace the first line inside the function with:

JavaScript
if ((e.origin !== 'https://insta.flashdl.one' && e.origin !== 'https://embedded.flashdl.one') || !e.data || e.data.type !== 'flashdl:height') return;

Optional. Visitors sometimes arrive from inside an app such as Instagram or TikTok, whose built-in browsers often block downloads. The widget then offers a Copy link button so they can finish in their phone’s browser. Without the handshake below, that button copies a link to the widget on insta.flashdl.one with their Instagram link filled in. To send them back to your exact page instead, add this handshake:

HTML
<script>
window.addEventListener('message', function (e) {
  if (e.origin !== 'https://insta.flashdl.one' || !e.data || e.data.type !== 'flashdl:ready') return;
  e.source.postMessage({ type: 'flashdl:host', url: location.href }, 'https://insta.flashdl.one');
});
</script>

The widget keeps this address in the visitor’s browser, for that button only. Only your site’s name, which the widget already knows, is used for the sponsor link and analytics.

Messages and events

The widget and your page talk through postMessage. Every message is an object with a type. All of them are optional to handle.

From the widget to your page

type Fields When
flashdl:ready v (protocol version, currently 1) Once, when the widget is ready to use.
flashdl:height height (CSS pixels) Whenever the content height changes.
flashdl:event name, kind, code When something happens that you may want to count.
flashdl:scrollIntoView top (CSS pixels from the top of the widget) When a result or error appears out of view. Optional to handle.

Events sent with flashdl:event:

name Fields When
search kind A lookup started.
result kind A result is showing.
download_start kind A visitor started a download.
sponsor_open none A Download tap asked the browser for the sponsor tab. A pop-up blocker can still stop it.
error kind, code A lookup failed. code is a short reason, such as not_found or timeout.
cancel none The visitor cancelled a lookup.

kind says what the event is about, such as media (a post, Reel or carousel), profile, story or highlight. Treat values you don’t know as “other”. Events never include the link, username or caption.

From your page to the widget

type Fields What it does
flashdl:host url Sets the page link. See Page link.
flashdl:setTheme theme: auto, light or dark Switches the theme without reloading. Useful if your site has its own light and dark switch.

Send them to the widget’s origin only:

JavaScript
frame.contentWindow.postMessage({ type: 'flashdl:setTheme', theme: 'dark' }, 'https://insta.flashdl.one');

Listen for events the same way as auto-height:

JavaScript
window.addEventListener('message', function (e) {
  if (e.origin !== 'https://insta.flashdl.one' || !e.data || e.data.type !== 'flashdl:event') return;
  console.log(e.data.name, e.data.kind, e.data.code);
});

Content-Security-Policy

If your site sends a Content-Security-Policy header, allow the widget’s frame:

Text
frame-src https://insta.flashdl.one;
  • If your policy has no frame-src, add it, or add the origin to child-src or default-src, whichever your policy uses.
  • The widget’s images and videos load inside its own frame, under our policy, so you don’t need to allow Instagram servers.
  • If you inline the auto-height script, your script-src must allow it with a hash or nonce, or move the script into a file on your own domain.
  • A Permissions-Policy header that blocks clipboard-write overrides the allow attribute. The widget’s Copy link button may then not work.
  • Pages that send Cross-Origin-Embedder-Policy: require-corp can’t show the widget.

Troubleshooting

What you see Likely cause Fix
The widget says there’s no link yet The iframe’s address has no url, or it is empty. Put the link in url, URL-encoded. With your own search box, check that the script sets the address.
Tapping Download does nothing The sandbox attribute is missing allow-downloads. Chrome and Edge then block downloads silently. Add allow-downloads, or remove the sandbox attribute.
The widget never shows results The sandbox attribute is missing allow-same-origin or allow-scripts. Use the full token list from Embed the widget.
An empty box where the widget should be Your Content-Security-Policy doesn’t allow the frame, or a browser extension blocks it. Add frame-src https://insta.flashdl.one.
The widget is cut off, or scrolls inside The fixed height is too small for the result. Add the auto-height script, or raise height.
The theme doesn’t match your site The widget is light unless theme says otherwise, and auto follows the visitor’s device, not your site’s own light and dark switch. Set theme to match, or send flashdl:setTheme when your switch changes.
On iPhone, a download seems to vanish Safari saves to Files › Downloads, not Photos. Open the file in Files, tap Share, then Save Video or Save Image. The download list is also in Safari’s address bar.
Downloads fail inside Instagram, Facebook or TikTok Their in-app browsers often block downloads. Visitors open the page in their phone’s browser. The widget shows them how. Add the page link handshake so they land on the right page.
A profile won’t load The account is private, renamed or deleted, or our source couldn’t reach it this time. Try again, or use a link to one of the account’s posts.
A download fails after the result has been open for hours Instagram file links expire, after about a day for videos. Load the link again, by reloading the page or searching again, for fresh links.

Limits

  • Public content only. Private accounts are not supported, and the widget never asks anyone to log in.
  • Video up to 720p. That is the highest quality the source provides for Reels, posts, Stories and Highlights. Photos come at the size Instagram provides, often 1080px wide.
  • Stories are live for 24 hours. A link to one Story shows all of that account’s current Stories, with the linked one first. If it has expired, the widget shows the ones still live.
  • Profiles show the latest 12 posts. For an older post, use a link to that post. There is no separate Reels tab: Reels appear with the other posts in the grid.
  • File names are the ones Instagram servers give, which can be long.
  • Links in a result expire. Instagram file links last about a day for videos and a few days for photos. A fresh lookup fixes it.
  • Large files download straight from Instagram servers to your visitor’s device, so speed depends on their connection. In-app browsers may interrupt long downloads.
  • Now and then a public account can’t be loaded from our source. A direct link to one of its posts usually still works.

Changelog

Date Version Change
4 October 2026 1.0 First release: the widget shows the link in url, with your own search box sending visitors’ links. theme parameter, auto-height, page link handshake and events.