Get started with Iframely
If you know where you are heading to, use links to the left. Otherwise, read on. This quick intro gives the same links, but put in proper context.
What Iframely APIs do
Iframely APIs will take your URL and try to find rich media embed codes and unified meta semantics for it. Embed codes, native or Iframely-hosted iFrames, will be responsive if possible. You can see responses from Iframely via API explorer.
Is there a way to use embeds without learning APIs?
You can use embed.js library to use embeds without making API calls, just by changing HTML a little on your page. If you need more control, connect to APIs.
There is a number of Iframely integrations available: WordPress plugin, Meteor package, Medium-like text editor add-on, CKEditor supports Iframely, NodeBB forums, to mention a few. There are also guides for ReactJS and AngularJS.
API formats and endpoints
How to render an embed
In a simple scenario, you'll just use the
html field of the API response. Depending on your API settings, HTML may contain native embed code from the publisher as is, our use display proxy via our smart iFrames, short URLs or summary cards.
The cards design, if allowed for general links, uses your cards settings.
How do I get other features?
All features are delivered via oEmbed or Iframely endpoints but with specific optional query string parameters and/or your API settings. For example,
- use smart iFrames and short URLs via
- use AMP compatible format with
- use promo API and get promo cards HTML codes by adding
&promo=...parameter with 3rd party media you want to attach to your card.
Which URLs to send to Iframely
Should API usage be a concern, you can opt to skip URLs if Iframely couldn't find embed that meets your criteria. You'll get result code 417 in such cases. See error handling.
Should I cache embed codes?
Yes, generally you do. Providers change their embed codes, videos get removed, we add new providers, etc.
But if you use our embed.js or our iFrames with lazy-loading, the embeds will keep updating by themselves. If you use iFrames without embed.js script - you should be fairly safe too, except we won't be able to remove a no longer available video from your page.
If you use native embed codes from the publisher, you would need to make a decision about caching on your own. The trigger can be either your own time-to-live settings, or a user event, such as page view. We recommend cache time-to-live value of 1 day. Iframely on its part uses heuristic algorithm that re-checks fresh URLs more often than the older ones.
Basically, you just attach rich media to your own URLs. Check out our Klip To app for a demo.