Additional API parameters
Together with your API settings, optional query-string API parameters help you fine-tune what you receive from APIs.
API parameters let you override your settings for individual URLs and API calls.
For individual URLs, Iframely also offers an options editor.
It adds a variety of provider-specific
_-prefixed parameters to fine-tune particular rich media.
The API key you see in your profile. If your code faces users, you may replace
key parameter, which should be the MD5 hash of your actual API key.
See how to restrict API access with your
key in that case.
URL-encoded value of the URL. Also, make sure it’s HTTP or HTTPs link (we suggest you match against
Please URL-encode the URLs you send to Iframely. Seriously.
Below parameters are meant to complement your API settings. If you are in production and want to test some features, you may activate them via these query-string parameters. And vice versa — if you have a feature in your settings, you can disable it via query-string.
To choose between query-string and API settings, consider this. Unlike your API settings, API query-string will be included with embed codes and you won’t be able to undo it without making another API request. Settings will be applied to all Iframely iFrames that are already on your site.
When we give
=1as parameter value,
=0is also available to undo the feature in your settings. You can use
falsevalues instead, if you like it better.
Explicitly activates our async iFrames.
Rich media from the publisher will be put into Iframely-hosted iFrame and include the required delivery helper. The media inside an iFrame will be kept up-to-date in the background on our end.
- Disables any required iFrame display helper.
- Disables any allowed Iframely interactive such as cards, click-to-play and images.
- If any, you will get rich media from the publisher as-is and handle it yourself.
In oEmbed API format, we cannot fit any auto-playing videos.
If your plan supports it and during the initial trial period, the parameter adds a content ID to the API response.
When you need to refresh the cache, you can use those IDs to re-fetch data in batches of up to 100 URLs.
For hosted iFrame, it will link the source to content ID rather than your API key. iFrames with IDs will remain in service even if you decide to cancel your subscription.
Rich media embed codes may also include
<script> tag. Your system, for example, React, may nullify scripts to prevent cross-site scripting attacks. The HTML content will not properly render.
omit_script parameter puts all such rich media into Iframely iFrame. This affects Twitter, Facebook, Instagram, TikToks and others.
Our embed.js script is also excluded from responses. We ask you to make an exception for it and add it to your page directly.
See our complete scripts delivery guide.
In browsers that support it, we may switch to bulk insert or rich media embeds. We use Web Components instead of iFrames to save on HTTP requests.
import=0 disables shadow DOM and imports. Iframely will use iFrame elements only.
Replaces inline styles in HTML embed code with CSS class names.
It also lets you fine-tune embed codes via CSS. It will add
iframely-embed class, rel classes such as
iframely-player, and domain classes such as
Removes default center aligning of Twitter, Facebook, Instagram and other media restricted with a max-width by publisher.
Activates lazy-loading when Iframely returns a hosted iFrame. For players, we put an image placeholder first. Then swap it with the video when it is loaded.
Puts rich media into a media card. Works for players, images and some apps.
&card=small to force a compact card layout.
Formats HTML code output for Accelerated Mobile Pages framework. See our AMP guide.
Activates Player.js events to control playback where possible. Requires and is delivered via hosted iFrame.
Activates click-to-play mode for players. The player will be loaded only when requested by user.
Puts rich media into a hosted iFrame and activates consents before your user is exposed to third-party rich media. Though not required for GDPR, can be used for its own privacy value.
Overrides your default theme settings for cards, consents and select rich media publishers that support themes (say, Twitter).
In “auto” mode, Iframely will match the user’s operating system preferences. Cards will work out of the box.
Our auto-toggle for third-party providers uses
Sec-CH-Prefers-Color-Scheme client hint header. It will require additional configuration of your (parent) page and your CDN:
theme=autoto work, your parent page needs to request client-hints from user’s browser by setting this HTTP header:
Accept-CH: Sec-CH-Prefers-Color-Scheme. Iframely will handle the rest.
Accept-Language — default is
en-US. For some supporting rich media publishers, it sets interface language.
For all publishers, it makes Iframely parsers fetch HTTP resources with that locale as the top choice via
Many sites render different meta depending on language locale.
The parameter value is an ISO 639-1 fully specified locale of two-letter language and region codes.
fr-FR are both valid values. For some languages, Iframely might accept just the two-letter language code and add the default region code automatically.
We recommend testing your locale choice with Twitter, Facebook, YouTube and TED before pushing it live. Instagram should also use either that language or the one from the user’s browser.
Returns only rich media that works under HTTPs with no active SSL mixed-content warnings.
“Prefer media-only”. For some publishers, Iframely knows status-like
app rich media AND simple media, such as photos or video.
This option will make Iframely return the most straightforward media in the
html field instead.
Disables any rich media from a publisher and forces URL to try and resolve into a summary card instead.
Activates autoplay for players when possible. Check for
autoplay in main
rel to confirm. Add
&mute=1 to mute the playback.
In pixels, returns only rich media that does not exceed the requested width. Responsive media will still take 100% of the available width.
It affects occasional fixed-width rich media. In most other cases, Iframely gives the responsive embed code anyway. We ask you to restrict the container on your side or use &omit-css=1 instead.
- Integer value, in pixels and without a unit of measure, as e.g.
- Or a percent of viewport height, as in
Parameter applies in the following cases:
For responsive apps, players and images with fixed aspect ratio. Iframely takes your
maxheightand media’s aspect ratio and calculates the max width that would match your
maxheight. It is set as
max-widthinline style of HTML output so that responsive media isn’t taller than the requested
In Iframely iFrame, for HTML-based embeds like Twitter, Facebook, Instagram, Gists whose dynamic height becomes known only after rendering. The
maxheight=parameter in pixels is respected, and such widget won’t exceed the requested size. Instead, if rich media becomes taller than the max-height, Iframely iFrame starts showing an internal scrollbar.
maxheightis ignored in all other cases.
It is an optional text value tag that will help you later verify your API traffic. The default value is the one you give for your API keys.
You may override origin to indicate your end-customer or other functional categories. That way, you may request us to delete all links with origin from your account. It addresses the “right to be forgotten” of the EU GDPR act.
For oEmbed API only, if you’d like to get your response as XML.
Adds title attribute to all iFrames in the embed codes (hosted or native). Use this if you need to meet Level AA of Web Content Accessibility Guidelines (WCAG) 2.1.
a-based hosted code, it adds page title as the text in
<a>…</a> tag. Use this if your CMS sanitizes links with no content or if you have SEO concerns.
This title also makes the links that are no longer available at the origin (e.g. 404) to keep falling back to a regular HTML link (otherwise, Iframely removes such N/A widgets by default).
For individual embeds publishers
Many rich media publishers provide various embedding options.
By default, Iframely provides rich media that we believe fit the most common use cases. But you, of course, might want it differently.
Most frequently requested adjustments are available for self-service in your settings. For other cases, our team can configure the exact embeds you like for your favourite publishers. Ask away.
For individual URLs
_ … =
Per-use customization is available for CMS and text editors.
In addition to your default account’s settings, API parameters and custom providers configuration, your users may choose a variant for an individual rich media in a specific post.
Our per-URL options editor will suggest additional query-string parameters for each URL and rich media publisher, starting with underscore
You give these options to your editors to choose from, then repeat requests to Iframely APIs with the chosen query-string for a specific rich media variant.