iframe

Type:
<boolean> | <object>

Default: false
It enables embedded detection over the target url.
When is present, a new iframe data field will be returned when is possible. Any URL that implements specification is supported.
  • CLI
  • JavaScript
  • Shell
  • Python
  • Ruby
const mql = require('@microlink/mql')

const { status, data } = await mql('https://www.youtube.com/watch?v=9P6rdqiybaw', { iframe: true })

mql.render(data)
If the discovery has been done successfully, the iframe field will be now present into the response:
{
  "iframe": {
    "html": "<blockquote class=\"twitter-tweet\"><p lang=\"en\" dir=\"ltr\">our new shiny website has landed <a href=\"https://t.co/KIrhYYcTRx\">https://t.co/KIrhYYcTRx</a> <a href=\"https://t.co/cM0se2UoIg\">pic.twitter.com/cM0se2UoIg</a></p>&mdash; microlink.io (@microlinkhq) <a href=\"https://twitter.com/microlinkhq/status/1032664633960800257?ref_src=twsrc%5Etfw\">August 23, 2018</a></blockquote>\n<script async src=\"https://platform.twitter.com/widgets.js\" charset=\"utf-8\"></script>\n",
    "scripts": [{
      "async": true,
      "src": "https://platform.twitter.com/widgets.js",
      "charset": "utf-8"
      }]
    }
}
The `iframe` field has `scripts` and `html` subfields.
Additionally, you can supply any consumer query parameter supported by , like maxWidth or maxHeight:
  • CLI
  • JavaScript
  • Shell
  • Python
  • Ruby
const mql = require('@microlink/mql')

const { status, data } = await mql('https://www.youtube.com/watch?v=9P6rdqiybaw', { iframe: {maxWidth: 350} })

mql.render(data)
Keep in mind the support for this query parameters depend on every provider implementation.
Most of the most popular sites over the Internet supports oEmbed protocol.
A non exhaustive list of supported providers are: