Browser automation: shape the page before you capture it
Click, scroll, wait, emulate devices, and inject CSS or JavaScript — 30+ query parameters that control the headless browser on every request. The page state you shape is the page every output sees.
The same parameters apply to every workflow — automate once, capture in any format.
Every request can run through headless Chrome — prerender decides automatically when a target needs it. Before anything is captured, you control what the browser does: click DOM elements, scroll to a section, and wait for dynamic content with waitForSelector, waitUntil, or waitForTimeout.
You also control what the browser is: device presets set the right viewport, user agent, and resolution in one word; colorScheme forces light or dark mode; mediaType switches to print CSS. Inject your own styles, scripts, or ES modules before the page renders.
And some things are handled before you ask: the built-in adblock engine strips advertisements, trackers, and cookie-consent banners by default, and CSS animations are frozen so captures come out consistent every time.
Interact, emulate, rewrite
Each parameter is one query-string key — compose as many as you need on a single request, no scripting required. When declarative parameters stop being enough, browser functions give you full Puppeteer access.
device keyword sets the matching viewport, user agent, and resolution — or tune viewport by hand. Force colorScheme: 'dark' to capture the dark theme, or mediaType: 'print' to render print stylesheets.styles, run your own JavaScript with scripts or ES modules — hide elements, override themes, stub APIs. Meanwhile adblock keeps ads, trackers, and cookie banners out by default.Dark mode, on an iPhone, without owning one
Device emulation and color-scheme forcing are single parameters — the screenshot below renders exactly what a dark-mode iPhone user would see.
import mql from '@microlink/mql'
const { data } = await mql('https://example.com', {
screenshot: true,
device: 'iPhone 15 Pro',
colorScheme: 'dark',
meta: false
})
console.log(data.screenshot.url)Click first, wait, then extract
Interaction parameters compose with every output — here the browser clicks a tab, waits for the price to exist in the DOM, and only then runs the data extraction rules.
const { data } = await mql('https://example.com/pricing', {
click: '.tab-annual',
waitForSelector: '.price',
data: {
price: { selector: '.price', attr: 'text', type: 'number' }
}
})
console.log(data.price)Clean by default, unblockable on Pro
Every automation parameter on this page works on the free tier — they are part of the core rendering engine, not an add-on. Pro plans matter when the target itself pushes back.
Set the stage, then capture it.
Every browser parameter works on the free tier, across every output. When targets push back, Pro plans add proxy resolution, custom headers, and configurable TTL around the same requests.
Can I click or scroll before the capture happens?
click parameter clicks DOM elements matching CSS selectors — accept a modal, switch a tab, trigger navigation — and scroll brings a specific element into view.How do I wait for dynamic content to render?
waitForSelector pauses until a specific element exists in the DOM; waitUntil waits for browser lifecycle events; waitForTimeout waits a fixed number of milliseconds.prerender (enabled automatically when needed) makes sure client-rendered content is executed before capture — see the prerender reference.Can I emulate a mobile device or dark mode?
device value — like 'iPhone 15 Pro' or 'iPad' — sets the matching viewport, user agent, and screen resolution; viewport lets you fine-tune by hand.colorScheme forces the prefers-color-scheme media feature to light or dark, and mediaType switches the page to its print stylesheets.How do I get rid of cookie banners and ads?
adblock is enabled by default and blocks third-party requests for advertisements, trackers, and cookie-consent services before they load.styles rule to hide it, or use click to dismiss it explicitly.Can I inject my own CSS or JavaScript?
styles accepts inline CSS or URLs to external stylesheets; scripts injects plain JavaScript and modules injects ES modules — all applied before the capture.