Link Preview API
Generate rich link previews from a URL
ogfetch is a link preview API that turns any URL into the title, description, image, and favicon you need to render an unfurled preview card, the way Slack, Discord, and iMessage do. One call, clean JSON, no headless browser to run.
100 free requests on signup. No credit card required.
Render a preview card
const res = await fetch(
'https://ogfetch.dev/v1/fetch?url=' +
encodeURIComponent(link),
{ headers: { 'X-Api-Key': 'ogf_your_key' } }
);
const d = await res.json();
renderCard({
title: d.og.title ?? d.title,
description: d.og.description ?? d.description,
image: d.og.image,
favicon: d.favicon,
siteName: d.og.siteName,
});Try it now
No signup needed. Paste a URL and see the JSON.
01
Everything a card needs
Title, description, hero image, favicon, and site name in one response, with sensible fallbacks from OG tags to standard meta tags.
02
Drop-in for any app
Chat apps, comment boxes, CMS editors, note tools, and bookmark managers. If your product accepts pasted links, this renders the preview.
03
No infra to run
You skip running and scaling your own scraper or headless browser fleet. Call the API, cache the result, render the card.
FAQ
What is a link preview API?
A link preview API takes a URL and returns the metadata needed to render a rich preview card: title, description, image, and favicon. It is what powers the unfurled previews you see when you paste a link into Slack, Discord, or iMessage.
Can I use this to unfurl links in a chat app?
Yes. That is a primary use case. When a user pastes a link, call ogfetch with that URL and use the returned title, image, and description to render the preview card. Cache the result so repeated links do not re-fetch.
What if a page has no Open Graph tags?
ogfetch falls back to the standard <title> tag, meta description, and favicon, so you still get a usable preview even when a site has not added OG tags.
Is there a free tier?
Yes, 100 free requests on signup with no credit card. After that, one-time credit packs start at $3 and never expire.