Skip to content
Core feature · free tier

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.

One render pipeline
every plan · every output
Request
url + browser parameters
Emulate
device · viewport · colorScheme
Interact
click · scroll · waitForSelector
Capture
screenshot · pdf · data · meta

The same parameters apply to every workflow — automate once, capture in any format.

Shape the page state

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.

Three control planes → one request

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.

01 · interact & wait
Get the page into the right state
Click DOM elements by CSS selector to open tabs, dismiss overlays, or trigger navigation; scroll to the section you care about; and hold the capture until the content actually exists — wait for a selector, a browser lifecycle event, or a fixed amount of time.
clickscrollwaitForSelectorwaitUntil
02 · emulate
Render as any device, any preference
One 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.
deviceviewportcolorSchememediaType
03 · rewrite
Change the page before it renders
Inject inline CSS or external stylesheets with 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.
stylesscriptsmodulesadblock
Code

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.

index.js
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)
Interaction

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.

index.js
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)
Included on every plan

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.

01 · adblock
No cookie banners in your screenshots
Third-party requests for advertisements, trackers, and cookie-consent services are blocked by default — they bloat response times and clutter the interface. The engine is powered by Cliqz, and one boolean turns it off when you want the page untouched.
adstrackerscookie banners
02 · pro pairing
When the page fights back
Automation shapes the page — Pro gets you to it. Automatic proxy resolution handles antibots like Cloudflare and DataDome, custom headers carry your session past login walls, and configurable TTL caches the shaped result so repeats cost nothing.
proxyx-api-header-*ttl

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?

Yes. The click parameter clicks DOM elements matching CSS selectors — accept a modal, switch a tab, trigger navigation — and scroll brings a specific element into view.
Both mutate the browser page state before any output is produced, and they compose with screenshots, PDFs, metadata, and data extraction alike.

How do I wait for dynamic content to render?

Three tools, from precise to blunt: waitForSelector pauses until a specific element exists in the DOM; waitUntil waits for browser lifecycle events; waitForTimeout waits a fixed number of milliseconds.
For SPAs, 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?

Yes. A single 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.
You usually do not have to do anything: adblock is enabled by default and blocks third-party requests for advertisements, trackers, and cookie-consent services before they load.
For anything site-specific that survives, inject a styles rule to hide it, or use click to dismiss it explicitly.

Can I inject my own CSS or JavaScript?

Yes. styles accepts inline CSS or URLs to external stylesheets; scripts injects plain JavaScript and modules injects ES modules — all applied before the capture.
When injection is not expressive enough, the function parameter runs your code with full Puppeteer access inside the same browser.

Do these parameters work on the free plan?

Yes — every parameter on this page is part of the core rendering engine and works on the free tier, across every output.
Pro plans add the layers around it: automatic proxy resolution against antibots, custom headers for authenticated pages, and configurable TTL so repeated captures serve from cache.