Iframely short URL IDs

For the subscription plans that support it, or during initial trial period, Iframely can provide permanent short IDs for your URLs for further re-use in your system.

Short ID can be used as a permanent public source for:

  • any of our iFrame helpers (such iFrames don't include your API key and will work even if your account is no longer in good standing with us).

  • refresh your cache of URL data by repeating API calls using the short IDs instead of full API calls. For example, request AMP version of rich media.

  • Batch requests for up to 100 URLs using their short IDs.

  • Regular short URLs with iframe.ly domain, or your custom one. Such short URLs are optimized for social sharing on Twitter, Facebook, WordPress or other sites and will come with rich media attached if possible. It is particularly useful when combined with our promo cards or promo api.

Short IDs are unique for your account and are linked to your API settings.

Get short IDs

If your plan supports it, ID will always be used for any required iFrame helper that Iframely generates based on publisher's data or according to your API settings:

<iframe src="//iframe.ly/ABCDEFG" ...></iframe>

To activate IDs for all URLs, make API call with &id=1 query-string parameter in oEmbed or Iframely formats.

That parameter will add short ID to the response even when Iframely returns the native embed code from publisher without our iFrame helper.

When short ID is available, it will be returned as id field in the JSON response. If our iFrame is returned as well in html field, embed code will link to our CDN and short ID automatically.

If you have received short id for your previous API call, your repeat calls may go directly to:

Such API calls do not require api_key and are publicly available (yet are still linked to your account).

You may add any optional API parameters to such anonymous calls. For example, quickly get an AMP-formated iFrame with &iframe=amp.

If you fetch JSON data from users' browser, please use CDN: cdn.iframe.ly/{ID}.json (or your own domain if you're on "bring your own CDN")

Batch requests of up to 100 IDs

Instead of making a hundred API calls, we suggest you combine it into one. Simply generate an endpoint address this way: IDs delimited with - hyphen. For example,

Again, you can use any of the optional API parameters.

The response will contain Iframely or oEmbed JSONs as values, with IDs as the root level keys:

        "ID1": {
        "ID1": {


        "IDn": {

In other words, body.IDn from response of such batch calls will be the same JSON object as if you called iframe.ly/IDn.json or iframe.ly/IDn.oembed for a single ID.

The order of IDs in response may not match the order from request. We fill the data based on latency of an individual ID.

Short URLs + Twitter & Facebook

You may also use short IDs as the short URLs: iframe.ly/ABC.

Our short URLs will redirect regular users to original content, while providing meta semantics optimized for Twitter and Facebook social sharing.

Twitter and Facebook will see rich media attached to our short URLs and will show it in their timelines if possible. It is particularly powereful, when used in combination with Promo API.

To use short URLs with your custom domain, simply:

  • Add CNAME to your DNS config and point it to iframe.ly
  • Use id field from API responses and generate the short link with your domain in it

Heads up: Custom domains will only work with HTTP as we don't have your SSL certificate. But no worries - the accompanying embed code will still point to iframe.ly domain and will support SSL alright.

Previous article: Player events
Next article: URL Options