The official SDK
for the Microlink API.
One import gives you every Microlink product as a semantic method — screenshots, PDFs, metadata, scraping, search — in Node.js, browsers, and Deno.
Quick start
npm install microlink.ioOne import
Every Microlink product behind a single createClient() factory.Runs everywhere
Node.js, browsers, and Deno — same code, same responses.Batteries included
HTTP, auth, retries, errors, and binary handling already solved by @microlink/mql underneath.Free to start
No API key needed; add one for search and pro quotas.
Every product is a method.
All of them follow the same contract: same authentication, same errors, same response shape.
Content
Turn a URL into rendered output — structured data, documents, and hosted assets.
.screenshot()
Any URL as a hosted image — full page, device emulation, custom CSS..metadata()
Unified metadata from Open Graph, Twitter Cards, JSON-LD, and HTML..markdown()
The page as clean Markdown, ready for LLM context windows..html()
Fully rendered HTML, captured after JavaScript runs..pdf()
Print any URL to PDF with format, margin, and scale control..embed()
oEmbed-style iframe HTML for rich cards..logo()
The brand logo behind any URL, with an optional color palette..text()
Readable plain text with the markup stripped out.
Specialized
Deeper capabilities — remote code execution, search, custom extraction, and tech detection.
.run()
Execute your own JavaScript against a live page and get the value back..search()
Google results as structured data, with built-in pagination and per-result expansion..video()
The primary video as a direct, playable asset..audio()
The primary audio track as a direct asset..extract()
Typed values pulled with CSS selector rules..technologies()
The tech stack powering any site..lighthouse()
A full Lighthouse report for any URL.
Collections
Sweep a page and get every matching resource back as an array.
.links()
Matching hrefs as absolute, deduped URLs..images()
Image assets collected from the page..videos()
Video sources collected from the page..audios()
Audio sources collected from the page..emails()
Addresses found in mailto links and plain text.
See it run.
Real calls, real responses — switch products without changing shape.
Capture any URL as a hosted image.
Take a screenshot
import createClient from 'microlink.io'
const microlink = createClient({
apiKey: process.env.MICROLINK_API_KEY
})
const { url } = await microlink.screenshot(
'https://www.apple.com/music',
{ type: 'png', fullPage: true }
)
console.log(url)
// → 'https://cdn.microlink.io/…'Built on open source,
trusted by developers
The SDK, the transport layer beneath it, and the terminal experience on top are all developed in the open. Explore the code, contribute, or run it yourself — MIT licensed.
FAQ
Everything about the microlink.io package.
What is microlink.io?
The official SDK for the Microlink API. It organizes the API into semantic products — one method per product — so you call
microlink.screenshot(url) instead of composing query strings by hand.How is it different from @microlink/mql?
It’s a thin semantic layer over @microlink/mql: HTTP, authentication, retries, errors, and binary handling are already solved there. Each product method sets the right API parameters and unwraps the result for you.
What happened to the previous Microlink SDK?
The previous SDK was a UI component for rendering link previews in React, Vue, or vanilla JavaScript. It keeps working and its documentation stays available, but it’s no longer maintained. This package is the SDK going forward: it returns data and assets from every Microlink product, with no UI attached.
Do I need an API key?
Not to start.
createClient() works on the free tier out of the box. Pass createClient({ apiKey }) to unlock pro plans — the key travels as the x-api-key header.search is the exception: it needs an API key on every request.How do errors work?
Every method throws a
MicrolinkError carrying code, statusCode, and a human-readable description, so a single try/catch covers the whole client. Retries happen automatically underneath.Where does it run?
Node.js, browsers, and Deno. It’s published on npm as microlink.io and distributed under the MIT license.
Does it include a CLI?
Yes — installing the package also ships a
microlink binary where every product is a subcommand, such as microlink markdown https://example.com. Looking for the standalone terminal experience? That’s @microlink/cli.