Browser functions: your code, our headless browser
Run any JavaScript remotely with the function parameter — full Puppeteer access, npm packages installed on the fly, and zero infrastructure. No Lambda bundle, no browser fleet, no server to manage.
/function
Reference page and a browser starts with full Puppeteer access — skip it and your function runs faster.
Write a normal JavaScript function and run it remotely in a sandboxed Node.js runtime. The return value comes back at result.value; if the function throws, result.isFulfilled is false and the error details take its place.
When the function references page, Microlink spawns headless Chrome, navigates to the target URL, and hands you the full Puppeteer API — click, type, evaluate, capture. When it does not, no browser is started and execution is faster and cheaper.
Need a library? require() any npm package — dependencies are detected from your code, installed into the sandbox on the fly, and cached so subsequent runs skip the install entirely.
From a one-liner to full browser automation
Every function runs in the same sandboxed runtime — what you reference inside it decides how much machinery spins up. Pay the browser cost only when you actually need a browser.
page and Microlink boots headless Chrome, navigates to the target URL, and passes you the live Puppeteer page — click, type, wait, evaluate, or capture anything the built-in parameters cannot express.require() inside your function and the runtime detects the dependencies, installs them into the sandbox, bundles, and caches the result — pin a version with require('[email protected]') when you need reproducibility.Puppeteer, without the infrastructure
The @microlink/function library handles serialization, compression, and the API call. Your function receives page — a live Puppeteer instance already navigated to the target URL.
const microlink = require('@microlink/function')
const fn = microlink(({ page }) => page.title())
const result = await fn('https://example.com')
console.log(result.isFulfilled) // true
console.log(result.value) // 'Example Domain'Dependencies, resolved for you
Write require() as if you were on your own machine. The first run installs and caches; subsequent runs skip the install phase — check result.profiling.phases to see exactly where the time goes.
const microlink = require('@microlink/function')
const fn = microlink(() => {
const { kebabCase } = require('lodash')
return kebabCase('Hello World')
})
const result = await fn('https://example.com')
console.log(result.value) // 'hello-world'The same runtime on every plan
Functions run on the free tier — enough to prototype workflows and every example on this page. Pro raises the execution limits and unlocks the parameters production scraping needs alongside your code.
Your code, our browser.
Prototype on the free tier — no API key, no setup. When your workload grows, Pro plans raise the execution limits and add proxy resolution, custom headers, and configurable TTL around your code.
What can I run inside a function?
page and Microlink starts headless Chrome with full Puppeteer access, already navigated to the target URL.require() any npm package — dependencies are installed on the fly and cached.Is the function parameter available on the free plan?
When should I use function instead of data?
function when you need to click, wait, compute, reshape, or orchestrate custom logic that rules cannot express.styles, scripts, and modules parameters are lighter than a full function — see browser automation.What happens if my function throws?
result.isFulfilled comes back false and result.value contains the error details — name, code, and message — so you can handle failures in your own code.ERR_ACCESS_DENIED error — see the troubleshooting guide.How do I make functions run faster?
page when you do not need a browser — plain functions execute without booting Chrome.result.profiling.phases to see where time goes: a high install value means dependencies were installed for the first time and will be cached for subsequent runs; a high run value means the function itself is doing heavy work — see the profiling guide.Can functions reach pages behind antibots or logins?
function with automatic proxy resolution to get past Cloudflare, DataDome, or Akamai, and forward session cookies with x-api-header-cookie for pages behind a login — see custom headers.