Skip to content
LINK PREVIEW API

Link Preview API: title, description, og:image and a screenshot for any URL

Turn a URL into everything a link card needs. Read a page's Open Graph tags in a real browser, fall back to a hosted screenshot when there's no og:image, and render your own OG images from HTML, with free self-hosted code first and honest notes on what RenderKit does and doesn't return.

Last updated

Short answer

A link preview API takes a URL and returns what a preview card needs: title, description, image, and the final URL. With RenderKit, POST /v1/extract with meta_og: true returns the page title, meta description, and every og:* tag, and POST /v1/screenshot adds a hosted screenshot for pages without an og:image. Each call costs 1 credit.

Chat apps, CMS editors, bookmarking tools, and social feeds all show the same thing when someone pastes a link: a card with an image, a title, a line of description, and the site name. Building one means fetching a stranger's page from your server, which is where the edge cases live: JavaScript-rendered pages with no tags in the initial HTML, relative image paths, redirects, slow sites, and users who paste http://169.254.169.254/ to see what your server will fetch.

To be clear up front about what RenderKit is: a screenshot, PDF, and extraction API that happens to return the metadata a preview needs. It isn't a dedicated unfurling service. It renders every page in Chromium, returns Open Graph tags, the title, meta description, author, and published date, and gives you a real screenshot when a site has no image. It doesn't return favicons or logos, oEmbed data, or twitter:* tags. If you need those, the free script below or a dedicated service fits better.

The Open Graph protocol (ogp.me) names four required properties for every page: og:title, og:type, og:image, and og:url. Real pages are less tidy, so a robust preview reads each field with a fallback chain:

Fallback order most preview code uses. Relative URLs in og:image or og:url must be resolved against the page's final URL.
Card fieldRead firstThenLast resort
Titleog:title<title>The hostname
Descriptionog:description<meta name="description">Leave it out
Imageog:imagetwitter:imageA screenshot of the page
Site nameog:site_nameThe hostnamen/a
Canonical URLog:urlFinal URL after redirectsThe URL you were given
Icon<link rel="icon">/favicon.icoNo icon

For most sites you don't need an API. Fetch the page from your server, read the <head>, and parse the meta tags. This Node.js script (Node 18 or newer, plus cheerio) does that with the safety checks a production version needs: it refuses private and internal addresses, follows redirects manually so every hop is checked, times out after 8 seconds, only accepts HTML, and stops reading at </head> instead of downloading the whole page.

preview.mjs
// preview.mjs: npm i cheerio, then: node preview.mjs https://github.com
import { lookup } from "node:dns/promises";
import { BlockList, isIP } from "node:net";
import * as cheerio from "cheerio";

// Never fetch internal addresses on behalf of a user-supplied URL (SSRF).
const blocked = new BlockList();
for (const [net, prefix] of [
  ["0.0.0.0", 8], ["10.0.0.0", 8], ["100.64.0.0", 10], ["127.0.0.0", 8],
  ["169.254.0.0", 16], ["172.16.0.0", 12], ["192.168.0.0", 16],
]) blocked.addSubnet(net, prefix, "ipv4");
for (const [net, prefix] of [["::1", 128], ["fc00::", 7], ["fe80::", 10]])
  blocked.addSubnet(net, prefix, "ipv6");

async function assertPublic(url) {
  if (url.protocol !== "http:" && url.protocol !== "https:") throw new Error("http(s) only");
  const host = url.hostname.replace(/^\[|\]$/g, "");
  const addrs = isIP(host) ? [{ address: host, family: isIP(host) }] : await lookup(host, { all: true });
  for (const { address, family } of addrs) {
    if (blocked.check(address, family === 6 ? "ipv6" : "ipv4")) throw new Error(`blocked address ${address}`);
  }
}

export async function linkPreview(input) {
  let url = new URL(input);
  let res;
  for (let hop = 0; hop < 5; hop++) {
    await assertPublic(url); // re-check every redirect hop
    res = await fetch(url, {
      redirect: "manual",
      signal: AbortSignal.timeout(8000),
      headers: { "user-agent": "Mozilla/5.0 (compatible; LinkPreviewBot/1.0)", accept: "text/html" },
    });
    const next = res.headers.get("location");
    if (res.status >= 300 && res.status < 400 && next) { url = new URL(next, url); continue; }
    break;
  }
  if (!res.ok) throw new Error(`HTTP ${res.status}`);
  if (!(res.headers.get("content-type") ?? "").includes("text/html")) throw new Error("not an HTML page");

  // Meta tags live in <head>: stop reading at </head> or after ~512 KB.
  const reader = res.body.getReader();
  let html = "";
  const decoder = new TextDecoder();
  while (html.length < 512_000) {
    const { done, value } = await reader.read();
    if (done) break;
    html += decoder.decode(value, { stream: true });
    if (html.includes("</head>")) break;
  }
  reader.cancel().catch(() => {});

  const $ = cheerio.load(html);
  const meta = (key) =>
    $(`meta[property="${key}"]`).attr("content") ?? $(`meta[name="${key}"]`).attr("content");
  const abs = (src) => { try { return src ? new URL(src, url).toString() : undefined; } catch { return undefined; } };

  return {
    url: abs(meta("og:url")) ?? url.toString(),
    title: meta("og:title") ?? meta("twitter:title") ?? ($("title").first().text().trim() || url.hostname),
    description: meta("og:description") ?? meta("twitter:description") ?? meta("description"),
    image: abs(meta("og:image") ?? meta("twitter:image")),
    siteName: meta("og:site_name") ?? url.hostname,
    favicon: abs($('link[rel~="icon"]').attr("href") ?? "/favicon.ico"),
  };
}

console.log(await linkPreview(process.argv[2]));
node preview.mjs https://github.com/vercel/next.js
{
  url: 'https://github.com/vercel/next.js',
  title: 'GitHub - vercel/next.js: The React Framework',
  description: 'The React Framework. Contribute to vercel/next.js development by creating an account on GitHub.',
  image: 'https://repository-images.githubusercontent.com/70107786/4602445c-…',
  siteName: 'GitHub',
  favicon: 'https://github.githubassets.com/favicons/favicon.png'
}

Node's BlockList matches IPv4 rules against IPv4-mapped IPv6 addresses too, so ::ffff:10.0.0.1 is caught by the 10.0.0.0/8 rule. That covers the obvious SSRF holes, with one gap worth knowing: the script resolves DNS, then fetch resolves it again, so a hostile DNS server could answer differently the second time (DNS rebinding). Closing that gap means pinning the connection to the checked IP with a custom agent; if your previews are for untrusted input at scale, budget for it.

Where the do-it-yourself version runs out of road:

  • JavaScript-rendered pages. Some single-page apps set their title and Open Graph tags from JavaScript after load. A plain HTTP fetch sees the empty shell, and the preview shows the hostname and nothing else.
  • No image at all. Plenty of pages, including docs, dashboards, and older blogs, have no og:image. Without a browser you have no way to make one.
  • Bot protection. Some sites answer server-side requests with a challenge page or a 403, and your preview shows the challenge's title.
  • Operations. You own the timeouts, caching, retries, and the SSRF policy. For a few hundred links a day that's fine. For a public "paste any link" box it's a real service to run.

RenderKit fixes the first two problems: every request loads the page in Chromium and waits for the network to go idle, so tags added by JavaScript are present, and the same API can screenshot the page when there's no image. Targets that resolve to private or reserved addresses are refused with 422 TARGET_NOT_ALLOWED, so the SSRF policy isn't yours to maintain.

Metadata only: POST /v1/extract

/v1/extract is RenderKit's page-to-text endpoint. The title and meta description are included by default; meta_og, meta_author, and meta_published_date opt in to the rest. The page text comes back in content too; use it for search snippets, or ignore it.

POSTextract.sh
curl https://api.renderkit.tech/v1/extract \
  -H "x-api-key: $RENDERKIT_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "url": "https://example.com/blog/launch-week",
    "format": "text",
    "meta_og": true,
    "meta_author": true,
    "meta_published_date": true,
    "cache_ttl": 604800
  }'
200 · application/json
{
  "success": true,
  "data": {
    "id": "rk_7Hd2pQ9xLm",
    "type": "extract",
    "status": "done",
    "content": "Launch week recap. Five releases in five days…",
    "meta": {
      "title": "Launch week recap | Example",
      "description": "Five releases in five days: what shipped and why.",
      "author": "Dana Ortiz",
      "published_date": "2026-11-20T09:00:00.000Z",
      "og": {
        "og:title": "Launch week recap",
        "og:description": "Five releases in five days: what shipped and why.",
        "og:image": "https://example.com/og/launch-week.png",
        "og:url": "https://example.com/blog/launch-week",
        "og:type": "article",
        "og:site_name": "Example"
      },
      "word_count": 1284,
      "source_url": "https://example.com/blog/launch-week",
      "format": "text"
    },
    "render_ms": 1390,
    "credits_used": 1,
    "cached": false,
    "created_at": "2026-11-27T10:12:03.000Z",
    "completed_at": "2026-11-27T10:12:04.390Z"
  },
  "message": "Success"
}

Metadata plus a screenshot: POST /v1/screenshot

/v1/screenshot with meta_title and meta_og returns a hosted image of the page along with its title and Open Graph tags, in one call and for 1 credit. A 1200×630 viewport matches the usual card ratio, and thumbnail_width: 600 resizes the stored image so cards load quickly:

POSTscreenshot.sh
curl https://api.renderkit.tech/v1/screenshot \
  -H "x-api-key: $RENDERKIT_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "url": "https://example.com/blog/launch-week",
    "viewport_width": 1200,
    "viewport_height": 630,
    "thumbnail_width": 600,
    "format": "webp",
    "block_cookie_banners": true,
    "meta_title": true,
    "meta_og": true,
    "cache_ttl": 604800
  }'
200 · application/json
{
  "success": true,
  "data": {
    "id": "rk_3Kp8vW2nRt",
    "type": "screenshot",
    "status": "done",
    "url": "https://cdn.renderkit.tech/renders/9f2c41…b7.webp",
    "url_expires_at": "2027-11-27T10:14:22.000Z",
    "meta": {
      "title": "Launch week recap | Example",
      "og": {
        "og:title": "Launch week recap",
        "og:description": "Five releases in five days: what shipped and why.",
        "og:image": "https://example.com/og/launch-week.png",
        "og:site_name": "Example"
      },
      "thumbnail_width": 600
    },
    "render_ms": 2210,
    "credits_used": 1,
    "cached": false,
    "created_at": "2026-11-27T10:14:20.000Z",
    "completed_at": "2026-11-27T10:14:22.210Z"
  },
  "message": "Success"
}
Metadata each endpoint can return. — means the endpoint doesn't return that field.
Field/v1/extract/v1/screenshot
title (the page's <title>)On by defaultWith meta_title: true
description (<meta name="description">)On by default—
og (every og:* tag)With meta_og: trueWith meta_og: true
author (<meta name="author">)With meta_author: true—
published_dateWith meta_published_date: true (article:published_time, else the first <time datetime>)—
source_url (final URL after redirects)Always—
Hosted image url—Always (kept for 365 days)
  • og keys are full property names (og:title, og:image), read from <meta property="og:…"> tags in the rendered page. Tags written as name="og:…" aren't collected.
  • Values come back exactly as the page wrote them, so resolve a relative og:image against source_url (extract) or the URL you requested (screenshot).
  • Screenshot meta has no description. Use og:description from the same response, or call extract when the description matters.
  • Add cache_ttl (up to 2,592,000 seconds, 30 days): an identical request inside that window returns the stored result with cached: true for 0 credits.

The pattern: a server-side function that gets the preview and caches it, a small route your front end can call, and a card component that degrades to a plain link. The function asks extract for the metadata first (1 credit) and only takes a screenshot when the page has no og:image (1 more credit), so most links cost 1 credit the first time and nothing on repeats. It uses the Node SDK (npm i renderkit-sdk); plain fetch with an x-api-key header works the same way.

lib/link-preview.ts
// lib/link-preview.ts: server-only (it reads your API key)
import { RenderKit } from "renderkit-sdk";

const rk = new RenderKit(process.env.RENDERKIT_API_KEY);
const WEEK = 7 * 24 * 60 * 60; // seconds

export type LinkPreview = {
  url: string;
  title: string;
  description?: string;
  image?: string;
  siteName: string;
};

type PageMeta = {
  title?: string;
  description?: string;
  source_url?: string;
  og?: Record<string, string>;
};

// A small per-instance cache in front of RenderKit's own render cache.
const memo = new Map<string, { expires: number; value: LinkPreview }>();

export async function getLinkPreview(input: string): Promise<LinkPreview> {
  const target = new URL(input); // throws on anything that isn't a URL
  if (target.protocol !== "https:" && target.protocol !== "http:") {
    throw new Error("Only http(s) links can be previewed");
  }
  const key = target.toString();
  const hit = memo.get(key);
  if (hit && hit.expires > Date.now()) return hit.value;

  // 1 credit. Identical requests inside cache_ttl are served from cache for 0 credits.
  const page = await rk.extract({ url: key, format: "text", meta_og: true, cache_ttl: WEEK });
  const meta = (page.meta ?? {}) as PageMeta;
  const og = meta.og ?? {};
  const finalUrl = meta.source_url ?? key;
  const host = new URL(finalUrl).hostname;

  let image = absolute(og["og:image"], finalUrl);
  if (!image) {
    // The page has no og:image: show a screenshot of it instead (1 more credit, also cached).
    const shot = await rk.screenshot({
      url: finalUrl,
      viewport_width: 1200,
      viewport_height: 630,
      thumbnail_width: 600,
      format: "webp",
      block_cookie_banners: true,
      cache_ttl: WEEK,
    });
    image = shot.url ?? undefined;
  }

  const value: LinkPreview = {
    url: finalUrl,
    title: og["og:title"] || meta.title || host,
    description: og["og:description"] || meta.description,
    image,
    siteName: og["og:site_name"] || host,
  };

  if (memo.size >= 5_000) memo.delete(memo.keys().next().value!);
  memo.set(key, { expires: Date.now() + 24 * 60 * 60 * 1000, value });
  return value;
}

function absolute(src: string | undefined, base: string): string | undefined {
  if (!src) return undefined;
  try {
    return new URL(src, base).toString();
  } catch {
    return undefined;
  }
}

Expose it through a route handler. The Cache-Control header lets a CDN in front of your app answer repeat lookups without reaching your server at all:

app/api/link-preview/route.ts
// app/api/link-preview/route.ts
import { getLinkPreview } from "@/lib/link-preview";

export async function GET(request: Request) {
  const url = new URL(request.url).searchParams.get("url");
  if (!url) return Response.json({ error: "Missing ?url=" }, { status: 400 });

  try {
    const preview = await getLinkPreview(url);
    return Response.json(preview, {
      // Let your CDN keep a preview for a day and serve a stale copy for up to a week.
      headers: { "Cache-Control": "public, s-maxage=86400, stale-while-revalidate=604800" },
    });
  } catch {
    return Response.json({ error: "No preview available" }, { status: 422 });
  }
}

Then the card. It fetches the preview on the client, shows a placeholder while loading, and falls back to a plain link if anything fails. In a React Server Component you can call getLinkPreview() directly and skip the route.

components/link-preview-card.tsx
// components/link-preview-card.tsx
"use client";

import { useEffect, useState } from "react";
import type { LinkPreview } from "@/lib/link-preview";

export function LinkPreviewCard({ href }: { href: string }) {
  const [preview, setPreview] = useState<LinkPreview | null>(null);
  const [failed, setFailed] = useState(false);

  useEffect(() => {
    const controller = new AbortController();
    setPreview(null);
    setFailed(false);
    fetch(`/api/link-preview?url=${encodeURIComponent(href)}`, { signal: controller.signal })
      .then((res) => (res.ok ? res.json() : Promise.reject(new Error(`HTTP ${res.status}`))))
      .then((data: LinkPreview) => setPreview(data))
      .catch((err) => {
        if (err.name !== "AbortError") setFailed(true);
      });
    return () => controller.abort();
  }, [href]);

  // Whatever happens, the reader still gets a working link.
  if (failed) {
    return (
      <a href={href} target="_blank" rel="noopener noreferrer">
        {href}
      </a>
    );
  }
  if (!preview) return <div className="link-card link-card--loading" aria-busy="true" />;

  return (
    <a href={preview.url} className="link-card" target="_blank" rel="noopener noreferrer">
      {preview.image && <img src={preview.image} alt="" width={600} height={315} loading="lazy" />}
      <span className="link-card__body">
        <span className="link-card__site">{preview.siteName}</span>
        <strong className="link-card__title">{preview.title}</strong>
        {preview.description && <span className="link-card__desc">{preview.description}</span>}
      </span>
    </a>
  );
}
link-card.css
.link-card { display: flex; flex-direction: column; max-width: 600px; overflow: hidden;
  border: 1px solid #e5e7eb; border-radius: 12px; color: inherit; text-decoration: none; }
.link-card img { width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; }
.link-card__body { display: grid; gap: 4px; padding: 12px 16px; }
.link-card__site { font-size: 12px; color: #6b7280; text-transform: uppercase; }
.link-card__title { font-size: 16px; line-height: 1.3; }
.link-card__desc { font-size: 14px; color: #4b5563; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.link-card--loading { height: 380px; max-width: 600px; border-radius: 12px; background: #f3f4f6; }
  • Caching happens in three layers: the in-memory Map (per server instance; use Redis or your database when you run several), the CDN via Cache-Control, and RenderKit's render cache, where identical requests within cache_ttl are free. Store finished previews alongside the message or post that contains the link, and most lookups never leave your database.
  • Rate-limit the route. Every new URL costs a credit, and the route will preview any URL anyone sends it. Require a signed-in user, or only preview links inside content your app stores.
  • Hosted images are public URLs on cdn.renderkit.tech, retained for 365 days. Don't screenshot pages that show private data.
  • If you only want one call per link, skip extract and call /v1/screenshot with meta_title and meta_og: 1 credit gets the title, the og:* tags, and an image, at the cost of the <meta name="description"> fallback.

OG image API: generate Open Graph images from HTML

The other half of link previews is your own pages: every post and product page should have an og:image so that other apps render a good card for it. The approach that keeps cards consistent with your site is to design the card as HTML and screenshot it at 1200×630. Send the HTML in the html field, set the viewport to the card size, and leave full_page off so the capture is exactly the viewport:

lib/og-image.ts
// lib/og-image.ts: render an Open Graph card from HTML
import { RenderKit } from "renderkit-sdk";

const rk = new RenderKit(process.env.RENDERKIT_API_KEY);

const ENTITIES: Record<string, string> = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" };
const escapeHtml = (s: string) => s.replace(/[&<>"']/g, (c) => ENTITIES[c]);

export async function renderOgImage(card: { title: string; kicker: string; site: string }): Promise<string> {
  const html = `<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@500;800&display=swap">
<style>
  * { margin: 0; box-sizing: border-box; }
  body {
    width: 1200px; height: 630px; padding: 72px;
    display: grid; grid-template-rows: auto 1fr auto; gap: 24px;
    font-family: Inter, system-ui, sans-serif; color: #f8fafc;
    background: radial-gradient(circle at 85% 15%, #2563eb 0, transparent 45%), #0b1120;
  }
  .kicker { font-size: 28px; font-weight: 500; color: #93c5fd; text-transform: uppercase; letter-spacing: .08em; }
  h1 { align-self: center; font-size: 76px; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; }
  footer { font-size: 28px; color: #cbd5e1; }
</style>
</head>
<body>
  <div class="kicker">${escapeHtml(card.kicker)}</div>
  <h1>${escapeHtml(card.title)}</h1>
  <footer>${escapeHtml(card.site)}</footer>
</body>
</html>`;

  const shot = await rk.screenshot({
    html,
    viewport_width: 1200,
    viewport_height: 630,
    format: "png",
    cache_ttl: 2_592_000, // 30 days: re-rendering an identical card costs 0 credits
  });
  if (!shot.url) throw new Error("Render returned no image URL");
  return shot.url; // https://cdn.renderkit.tech/renders/<hash>.png
}
app/blog/[slug]/page.tsx
// app/blog/[slug]/page.tsx
import type { Metadata } from "next";
import { renderOgImage } from "@/lib/og-image";
import { getPost } from "@/lib/posts"; // your data source

export async function generateMetadata({ params }: { params: Promise<{ slug: string }> }): Promise<Metadata> {
  const { slug } = await params;
  const post = await getPost(slug);
  // Best: render once at publish time and store the URL on the post.
  const image = post.ogImage ?? (await renderOgImage({ title: post.title, kicker: "Blog", site: "example.com" }));
  return {
    title: post.title,
    openGraph: { images: [{ url: image, width: 1200, height: 630, alt: post.title }] },
    twitter: { card: "summary_large_image", images: [image] },
  };
}
  • Escape anything user-written before putting it in the template, as escapeHtml does. A post title containing <script> should render as text, not run.
  • Web fonts load before the capture because rendering waits for the network to go idle; a Google Fonts <link> is enough. CSS grid, filters, gradients, and any other CSS Chromium supports work as they would in a browser.
  • Render once, store the URL. Image URLs are content-addressed, so an identical card always maps to the same file, and with cache_ttl set a repeat render costs 0 credits. Calling it from generateMetadata on every request still adds a network round trip, so save the URL when the post is published.
  • Retina cards: device_scale: 2 produces a 2400×1260 image of the same layout. 1200×630 is the size Next.js uses in its own Open Graph examples and the common default for social cards.

Open Graph image in Next.js: opengraph-image and ImageResponse

If your site is on Next.js, there's a built-in, API-free way to add Open Graph images. Put an opengraph-image.tsx file in a route segment and Next.js generates the image and adds the og:image, og:image:width, og:image:height, og:image:type, and og:image:alt tags for you:

app/blog/[slug]/opengraph-image.tsx
// app/blog/[slug]/opengraph-image.tsx
import { ImageResponse } from "next/og";
import { getPost } from "@/lib/posts";

export const alt = "Blog post cover";
export const size = { width: 1200, height: 630 };
export const contentType = "image/png";

export default async function Image({ params }: { params: Promise<{ slug: string }> }) {
  const { slug } = await params;
  const post = await getPost(slug);

  return new ImageResponse(
    (
      <div
        style={{
          width: "100%",
          height: "100%",
          display: "flex",
          flexDirection: "column",
          justifyContent: "space-between",
          padding: 72,
          background: "#0b1120",
          color: "#f8fafc",
        }}
      >
        <div style={{ fontSize: 28, color: "#93c5fd" }}>BLOG</div>
        <div style={{ fontSize: 76, lineHeight: 1.05 }}>{post.title}</div>
        <div style={{ fontSize: 28, color: "#cbd5e1" }}>example.com</div>
      </div>
    ),
    { ...size },
  );
}

ImageResponse uses Satori and Resvg (the engine behind @vercel/og) to turn JSX and CSS into a PNG, and Next.js documents the trade-offs: only flexbox and a subset of CSS properties are supported, so display: grid won't work; fonts must be ttf, otf, or woff; and the bundle, including fonts and images, is capped at 500 KB.

When to use which. Both produce a static PNG that social platforms fetch from your og:image URL.
Next.js opengraph-imageHTML screenshot (RenderKit)
CostFree, runs in your app1 credit per new card, 0 for cached repeats
CSS supportFlexbox and a CSS subset (Satori)Everything Chromium renders: grid, filters, web fonts
Reuse existing HTML templates or componentsRebuild the card in inline-style JSXSend any HTML, or screenshot a URL on your site
FrameworkNext.js onlyAny language or framework
Images of other people's pagesNoYes, with url instead of html

Our honest take: on Next.js, with a card design that fits in flexbox, use opengraph-image. It's free and lives next to the page. Reach for an HTML screenshot when the design needs full CSS, when you already have the card as HTML or as a page on your site, when you're not on Next.js, or when you're previewing pages you don't control. The OG image generation page covers the screenshot route in more detail.

As of November 2026, from each vendor's own website. — means we couldn't confirm it on the vendor's page, not that the feature is missing. Check current terms before you choose.
OptionWhat you getJS renderingScreenshotsFree tierEntry paid plan
Self-hosted (fetch + cheerio)Any tag in the HTML, including favicon and twitter:*NoNoFree; you run itn/a
RenderKitTitle, meta description, all og:* tags, author, published date, final URLYes, Chromium on every requestYes, hosted for 365 days500 credits for 14 days, no card$9/month for 5,000 credits
MicrolinkNormalized title, description, image, logo, author, publisher, date, language, URL—Yes, on the free plan25 requests/day, no cardPro: $49/month for 46,000 requests
LinkPreview.netTitle, description, image, URL——60 requests/hour, personal use only$8/month (200/hour, personal); $25/month for commercial use (1,000/hour)
OpenGraph.ioOpen Graph data, 1 credit per requestYes, +10 credits when browser rendering is neededYes, 20 credits each100 requests, no card$25/month for 50,000 credits
  • Need favicons, logos, or oEmbed? Microlink's metadata includes a logo, and the self-hosted script reads <link rel="icon">. RenderKit returns neither.
  • Need commercial use on a tight budget? Read the license terms: LinkPreview.net's free and Basic plans are marked for personal use only.
  • Already using RenderKit for screenshots, PDFs, or markdown? Previews run on the same key and the same credit meter. See also RenderKit vs Microlink.

RenderKit charges by render, not by field: an extract is 1 credit, a screenshot is 1 credit, cache hits cost nothing, and failed renders are refunded. A metadata-only preview is 1,000 credits per 1,000 links. A preview that also screenshots every page is 2,000. With the extract-first pattern above, you pay the second credit only for pages without an og:image.

Effective cost when you use a plan's full monthly credits (they don't roll over). Repeat previews served from cache cost 0.
PlanPriceCreditsPer 1,000 metadata previewsPer 1,000 previews with a screenshot
Free trial$0500, for 14 daysCovers 500 previewsCovers 250 previews
Hobby$9/month5,000$1.80$3.60
Growth$29/month25,000$1.16$2.32
Business$79/month150,000$0.53$1.05

Limits worth knowing

  • One URL per request. There's no batch endpoint, so a message with five links is five requests. Rate limits are 10 requests a minute with 1 concurrent render on the trial, and 60 a minute with 3 concurrent on Hobby.
  • No CAPTCHA solving. A site that blocks automated browsers may return its challenge page, and the preview shows the challenge's title. Check for that before saving a preview.
  • Render region. Screenshots render from France (EU), so some sites show EU cookie banners, languages, or prices; block_cookie_banners hides most banners, and country: "us" (Growth and up) renders through a US IP. Extracts go out through US residential IPs.
  • Timeouts. Trial requests are capped at 15 seconds of page load; paid plans allow 30 to 60 seconds.
  • No signed URLs. Screenshot URLs are public, content-addressed links; anyone who has the link can open the image.

Start with the free script if your links come from a handful of well-behaved sites. When previews start coming back empty for JavaScript-heavy pages, or you want a real image for every link, get a free key: 500 credits, no card, and the full screenshot API reference and extract API reference are in the docs.

Common questions

A service that takes a URL and returns the data needed to show a preview card: title, description, image, site name and the final URL after redirects. Most read the page's Open Graph tags; better ones render the page in a browser so tags added by JavaScript are found, and can screenshot the page when it has no og:image.

You can build one for free by fetching the page server-side and parsing its meta tags with a library such as cheerio, as shown on this page. Hosted options with free tiers (as of November 2026) include Microlink at 25 requests a day, LinkPreview.net at 60 requests an hour for personal use, OpenGraph.io with 100 free requests, and RenderKit's 500-credit trial.

Fetch the page's HTML and read the content attribute of <meta property="og:image">, resolving it against the page URL if it is relative. With RenderKit, POST the URL to /v1/extract with meta_og: true and read meta.og["og:image"]; the page is rendered in Chromium first, so tags set by JavaScript are included.

Add an opengraph-image.tsx file to the route segment that default-exports a function returning an ImageResponse from next/og, and export size, contentType and alt. Next.js generates the PNG and adds the og:image tags automatically. Alternatively, set openGraph.images in generateMetadata to any image URL, such as a screenshot of an HTML card.

1200 by 630 pixels, a ratio of about 1.91 to 1, is the common default and the size Next.js uses in its Open Graph examples. If you render cards from HTML, a 1200x630 viewport with device_scale 2 gives a sharper 2400x1260 image of the same layout.

With RenderKit, yes: every request loads the page in Chromium and waits for network idle before reading the title and Open Graph tags, so single-page apps that set their tags client-side return real values. A plain HTTP fetch, including the free script on this page, only sees tags present in the initial HTML.

Store each finished preview with the content that contains the link, add a short in-memory or Redis cache in front of the API, and send Cache-Control headers from your preview route so a CDN can answer repeats. On RenderKit, setting cache_ttl (up to 30 days) makes identical repeat requests free.

1 credit for metadata (extract) and 1 more if you also screenshot the page. On the Hobby plan ($9 for 5,000 credits) that works out to $1.80 per 1,000 metadata previews, or $3.60 with a screenshot each; cached repeats are free and failed renders are refunded.

Ship your first render in 60 seconds.

500 free credits to start. No card. Cancel by ignoring it.

Get your free key$npm i renderkit-sdk