Skip to content

embed

Type: <string>
It returns the specified data field as response over the target url, mimicking the same headers and body of the original resource.

Interactive Code Editor

Test API requests with multiple programming languages. Edit code, execute requests, and view responses in real-time.

You can use dot notation to reference a nested data field of the response payload.

Why use embed

The embed parameter transforms Microlink API from a JSON endpoint into a direct asset server. Instead of receiving JSON and parsing it with JavaScript, you get the actual resource (image, PDF, etc.) that can be used directly in:
  • HTML <img> tags
  • CSS background-image properties
  • Markdown image syntax
  • Open Graph meta tags

HTML integration

Embed screenshots directly in your HTML markup:
And it will be rendered as an external image:

CSS integration

Use embedded URLs directly in stylesheets:

Markdown integration

Embed in any Markdown document:

Common embed fields

FieldDescriptionUse case
screenshot.urlScreenshot image URLSocial cards, previews
pdf.urlGenerated PDF URLDocument downloads
image.urlPrimary image URLLink previews
logo.urlWebsite logo URLBrand displays
video.urlVideo source URLMedia embeds

Combining with other parameters

Embed works well with other parameters for customized output:

Interactive Code Editor

Test API requests with multiple programming languages. Edit code, execute requests, and view responses in real-time.

Generate and embed a mobile screenshot directly.

Open Graph images

A common use case is generating dynamic Open Graph images:

Security considerations

To authenticate requests securely when using embed in client-side code, use and to protect your API credentials.
Read more about that at the authentication section.