Node.js Metadata API
Extract title, description, image and logo from any URL with one HTTP request in Node.js — no HTML parsing, no tag soup, no browser to maintain.
Extract metadata in Node.js
No package and no parser — the Microlink REST API turns any URL into normalized metadata with a single HTTP GET. Here it is with the global fetch that ships with Node.js 18+.
Step 01 · Extract any URL
A few lines with global fetch — no npm package to add. Point it at a page and read the metadata from the JSON response.
extract.js
const params = new URLSearchParams({ url: 'https://microlink.io' })
const { data } = await fetch(`https://api.microlink.io?${params}`)
.then(res => res.json())
console.log(data.title) // 'Microlink | The web, ready for AI'
console.log(data.description) // 'A single API for turning any URL into data…'
console.log(data.image.url) // absolute, CDN-hosted
console.log(data.logo.url) // absolute, CDN-hostedStep 02 · Pick the fields you need
Title, description, publisher, author, date, lang, image and logo all come back in one call — build exactly the object your product needs.
fields.js
const params = new URLSearchParams({ url: 'https://microlink.io' })
const { data } = await fetch(`https://api.microlink.io?${params}`)
.then(res => res.json())
const preview = {
title: data.title,
description: data.description,
publisher: data.publisher,
author: data.author,
date: data.date,
lang: data.lang,
image: data.image?.url ?? null,
logo: data.logo?.url ?? null
}Step 03 · Render JavaScript pages
Tags injected by client-side JavaScript only exist after the page renders — prerender with a real browser and wait for them, still one request.
spa.js
const params = new URLSearchParams({
url: 'https://app.example.com',
prerender: 'true', // render JS in a real browser first
waitForSelector: 'h1' // wait until the content exists
})
const { data } = await fetch(`https://api.microlink.io?${params}`)
.then(res => res.json())
console.log(data.title)Step 04 · Build a link preview
Image and logo come back as absolute, CDN-hosted URLs — drop them straight into an img tag and you have a link preview.
link-preview.js
const params = new URLSearchParams({ url: 'https://microlink.io' })
const { data } = await fetch(`https://api.microlink.io?${params}`)
.then(res => res.json())
const html = `
<a href="${data.url}" class="card">
<img src="${data.image?.url ?? data.logo?.url}" alt="" />
<strong>${data.title}</strong>
<p>${data.description}</p>
</a>`Drop it into your framework
A route handler, an Express endpoint, or a chat bot unfurl — the same request becomes your own metadata endpoint for link previews and enrichment.
- Next.js
- Express
- Discord Bot
- Plain Node.js
import express from 'express'
const app = express()
// GET /preview?url=https://microlink.io
app.get('/preview', async (req, res) => {
const { data } = await fetch(
`https://api.microlink.io?url=${encodeURIComponent(req.query.url)}`
).then(res => res.json())
res.json({
title: data.title,
description: data.description,
image: data.image?.url ?? null
})
})Skip the tag-parsing maintenance
Rolling your own means fetching HTML, parsing Open Graph and Twitter Cards, merging JSON-LD and oEmbed, and adding a headless browser for JavaScript-injected tags. The API gives you normalized metadata from any page without any of the moving parts.
DIY tag parsing
- Fetch the HTML and parse og, twitter and meta tags yourself
- Merge JSON-LD, oEmbed and microdata by hand — every site differs
- Resolve relative image and logo URLs against redirects yourself
- JavaScript-injected tags need a headless browser — a 300 MB binary
- Each browser eats hundreds of MB of RAM per worker
- You build the caching, retries and autoscaling
Microlink for Node.js
- One HTTP request — global fetch, no npm package to add
- Open Graph, Twitter Cards, JSON-LD and oEmbed merged for you
- Image and logo as absolute, CDN-hosted URLs
- JavaScript-injected tags captured with prerender=true
- Cached responses from a global edge network
- Autoscaled fleet with a 99.9% uptime SLA
Built for the way you write Node.js.
A REST API that feels native in Node.js — one call, JSON back, and at home in anything from a script to a serverless function. Read the API overview to go deeper.
No HTML Parsing
No tag soup, no regex, no DOM library to install. One HTTP GET returns a normalized JSON object.
Zero Dependencies
Node.js 18+ ships global fetch — the examples work with no npm install and nothing to vendor.
Every Source Merged
Open Graph, Twitter Cards, JSON-LD, oEmbed, microdata and plain HTML tags are merged into a single normalized response.
CDN-Hosted Assets
Image and logo come back as absolute URLs on a global CDN — hot-link them directly, no downloading or proxying.
JavaScript Rendering
Tags injected by client-side JavaScript are captured too, with prerender=true and waitForSelector.
Link Preview Ready
Title, description, image, logo and publisher are exactly the fields a link preview card needs — one call, one card.
Framework Friendly
Drop it into Next.js, Express, or a chat bot as a route or a few-line function.
Zero Infrastructure
Managed Headless Chrome, autoscaled and load-balanced. No browser pool, no servers, no patching to maintain.
Generous Free Tier
Sign up for a free API key: 100 requests per month with every Pro feature, no credit card.
No HTML Parsing
No tag soup, no regex, no DOM library to install. One HTTP GET returns a normalized JSON object.Zero Dependencies
Node.js 18+ ships global fetch — the examples work with no npm install and nothing to vendor.Every Source Merged
Open Graph, Twitter Cards, JSON-LD, oEmbed, microdata and plain HTML tags are merged into a single normalized response.
CDN-Hosted Assets
Image and logo come back as absolute URLs on a global CDN — hot-link them directly, no downloading or proxying.JavaScript Rendering
Tags injected by client-side JavaScript are captured too, with prerender=true and waitForSelector.Link Preview Ready
Title, description, image, logo and publisher are exactly the fields a link preview card needs — one call, one card.
Framework Friendly
Drop it into Next.js, Express, or a chat bot as a route or a few-line function.Zero Infrastructure
Managed Headless Chrome, autoscaled and load-balanced. No browser pool, no servers, no patching to maintain.Generous Free Tier
Sign up for a free API key: 100 requests per month with every Pro feature, no credit card.
Try it live in the playground
Paste a URL and see the exact metadata response before you write a line of Node.js.
Node.js Metadata API FAQ
Everything Node.js developers ask before integrating the Microlink metadata API.
Which metadata sources are covered?
Open Graph, Twitter Cards, JSON-LD, oEmbed, microdata, RDFa and plain HTML tags — all merged and normalized into a single JSON response, so you never parse tag soup yourself.
Do I need to install a package?
No. The examples use the global fetch that ships with Node.js 18+. If you prefer the official SDK, the microlink SDK wraps the same API with typed conveniences.
What about tags rendered by JavaScript?
Pass
prerender=true and the page is rendered in a real browser before extraction, so tags injected by React, Vue or any client-side framework are captured too. Combine it with waitForSelector to wait for specific content.Are image and logo URLs ready to use?
Yes. They come back as absolute URLs hosted on a global CDN — resolve-relative-URL bugs included — so you can hot-link them directly in an
img tag or store them as-is.Is there a free tier or do I need an API key?
Yes, and it is free: sign up for an API key and you get 100 requests per month with every Pro feature, no credit card. Add it as x-api-key and start extracting.
When you need more volume, pick a paid plan: same key, bigger quota. See pricing for the limits.
How fresh is the metadata?
Responses are cached at the edge with a sane default TTL, and you control freshness per request — see the API overview for cache parameters.
Start extracting in Node.js
Sign up for a free API key: 100 requests per month with every Pro feature, no credit card. Send your first request and ship metadata in minutes.
Free API key
100 requests/month
No credit card