Skip to content

Content

The content methods turn a URL into rendered output — structured data, documents, and hosted assets. Every method follows the same method(url, options) shape, and options are routed automatically.

Metadata

Unified metadata from Open Graph, Twitter Cards, JSON-LD, and HTML:
const { title, description, image } = await microlink.metadata('https://vercel.com')
See data fields for everything the response can carry.

Markdown

The page as clean Markdown, ready for LLM context windows. Use selector to scope what gets converted:
const markdown = await microlink.markdown('https://example.com', {
  selector: 'article'
})

HTML

Fully rendered HTML, captured after JavaScript runs:
const html = await microlink.html('https://example.com')

Text

Readable plain text with the markup stripped out:
const text = await microlink.text('https://example.com')

Screenshot

Any URL as a hosted image. The result is an asset object with url, type, width, height, and size:
const { url } = await microlink.screenshot('https://example.com', {
  fullPage: true
})
Pass animated: true to capture the page as an animation, or any other screenshot parameter such as device emulation or custom styles.

Pdf

Print any URL to PDF with format, margin, and scale control:
const { url } = await microlink.pdf('https://example.com', { format: 'A4' })
See the pdf parameters for every knob.
The brand logo behind any URL. Use square: true to prefer a square variant:
const { url } = await microlink.logo('https://github.com', { square: true })

Embed

oEmbed-style iframe HTML for rich cards, with maxWidth/maxHeight support:
const { html } = await microlink.embed('https://www.youtube.com/watch?v=9P6rdqiybaw')
See the iframe parameter for the list of supported providers.