Skip to content

Browser Automation

Shape the page first. Set the device, wait for the right state, click, and run scripts — declarative options on the same request, applied before capture.

Overview

Declarative steps, then the capture.

Pass automation options on any product call — device, waitUntil, waitForSelector, click, scripts. The page is shaped into the right state before the screenshot, PDF, or data is taken.
  • One product call — the page is prepared, then captured
  • device emulates viewport, DPR and user-agent presets
  • waitUntil / waitForSelector settle dynamic, client-rendered pages
  • click, scroll and scripts drive the UI before extraction
  • Escalate to a function only when the flow is truly custom
Parameters

Options that shape the page.

Examples
device presets the viewport before the screenshot is taken.
Emulate a phone
import createClient from 'microlink.io'

const microlink = createClient({
  apiKey: process.env.MICROLINK_API_KEY
})

const { url } = await microlink.screenshot(
  'https://example.com',
  { device: 'iPhone 11', fullPage: true }
)