embed

Type: <string>
It returns the specified data field as response over the target url, mimic the same headers and body.
  • CLI
  • JavaScript
  • Shell
  • Python
  • Ruby
const mql = require('@microlink/mql')

const { status, data } = await mql('https://news.ycombinator.com/item?id=13713480', { screenshot: true, embed: 'screenshot.url' })

mql.render(data)
You can use dot notation to reference a nested data field of the response payload.
In this way, you can embed any data field directly as part of your HTML markup.
<img 
  src="https://api.microlink.io/?url=https%3A%2F%2Fnews.ycombinator.com%2Fitem%3Fid%3D13713480&meta=false&screenshot=&embed=screenshot.url" alt="Hacker News">
In order to authenticate your requests, you should use and to don't expose your credentials.
Read more about that at authentication section.