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)
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
proxy
and edge-proxy
to don't expose your credentials. Read more about that at authentication section.