Link preview and social card API
Link preview and social card image API
Every shared link deserves a picture. When a site's Open Graph image is missing, wrong or blank, SnapRender captures the page as a clean 1200 by 630 card, ready to show. For chat apps, social tools, feeds and aggregators that unfurl other people's links.
200 free previews a monthNo cardCached repeats are free

No more blank cards
You cannot control what other sites put in their meta tags, and often they put nothing. A capture of the page itself always has something to show.
-
A picture for every link
Use the site's own image when it has one and a capture of the page when it does not. Your feed never shows a grey box.
-
Real content from JavaScript sites
Single-page apps render in real Chrome before the capture, so the card shows the page people will see, not an empty shell.
-
The right shape, cleaned up
A 1200 by 630 card, rendered at 2x for sharp screens, with cookie banners and ads removed, in JPEG or WebP. Cached, so popular links cost one render.
The fallback, in two calls
Respect the site's own image when it has one. Capture the page when it does not.
- Read the page's tags
/v1/extractwithtype=metadatareturns the title, description and the Open Graph and Twitter tags of the rendered page. - Use
ogImageif it is thereShow the site's own image and you are done. No render is spent on a capture.
- Otherwise, capture a card
A 1200 by 630 screenshot with
cache=true, so the next person to share that link gets it from cache, free.
curl "https://app.snap-render.com/v1/extract?url=https://example.com&type=metadata" \
-H "X-API-Key: sk_live_your_key_here"
{
"type": "metadata",
"content": {
"title": "Example Domain",
"ogTitle": null,
"ogImage": null,
"twitterImage": null,
...
}
}curl "https://app.snap-render.com/v1/screenshot?url=https://example.com&width=1200&height=630&format=jpeg&quality=85&cache=true" \
-H "X-API-Key: sk_live_your_key_here" \
--output preview.jpgimport { SnapRender } from 'snaprender';
const snap = new SnapRender({ apiKey: 'sk_live_your_key_here' });
async function previewImage(url) {
const { content: meta } = await snap.extract({ url, type: 'metadata' });
if (meta.ogImage) return meta.ogImage; // the site's own image
return snap.capture({ // a 1200x630 capture instead
url, width: 1200, height: 630,
format: 'jpeg', quality: 85, cache: true,
});
}from snaprender import SnapRender
snap = SnapRender(api_key="sk_live_your_key_here")
def preview_image(url: str):
meta = snap.extract(url, type="metadata")["content"]
if meta.get("ogImage"):
return meta["ogImage"] # the site's own image
return snap.capture(url, width=1200, height=630,
format="jpeg", quality=85, cache=True)
Full reference: extraction and screenshots in the docs.
Who uses link preview images
Every product that shows links other people shared.
-
Chat and team tools
Rich unfurls for every URL posted in your product, including the ones Slack-style unfurling leaves blank.
Link preview APIs compared -
Social media schedulers
Show users how a link will look on X, LinkedIn and Facebook before they publish, with a capture when the tags are missing.
Read the guide -
Feeds, aggregators and RSS readers
A consistent image beside every item, even for sources that never set one.
Website thumbnails -
Your own OG images
Render your HTML card template at 1200 by 630 for each blog post or product page, no design tool needed.
Try HTML to PNG
Screenshots as an API call
Send a GET request, get a PNG back. Ads and cookie banners blocked by default.
200 free renders a month. Paid plans start at $9.
Simple pricing for link previews
Start with 200 free previews a month. A cached preview served again does not count.
| Plan | Price | Previews a month | Captures a minute | Cache up to |
|---|---|---|---|---|
| Free | $0 | 200 | 10 | 1 day |
| Starter | $9 | 2,000 | 30 | 7 days |
| Growth | $29 | 10,000 | 60 | 30 days |
| Business | $79 | 50,000 | 120 | 30 days |
| Scale | $199 | 200,000 | 200 | 30 days |
Metadata reads and captures both count as one render. Every plan has every feature. All plans and yearly prices.
See a preview of your link
Paste a URL and get the capture with the API call that made it. No sign-up.
Want to see how a link unfurls on X, LinkedIn and Slack? The OG image checker shows all of them.
Try it on your URL
Live capture, no signup. You get the screenshot and the exact API call that produced it.
This is the exact API call that made the image above. Swap in your key and it runs anywhere.
200 renders a month free.
You hit the free demo limit here. The full tool can verify you are human and keep going.
Continue in the full toolQuestions
How do I get a preview image when a page has no Open Graph image?
Capture the page at 1200 by 630 pixels, the standard Open Graph size: width=1200&height=630. SnapRender renders it in real Chrome with cookie banners and ads removed, and the result works as a card image anywhere.
How can I tell whether a page already has an OG image?
Call /v1/extract with type=metadata. You get the title, description, canonical URL and the Open Graph and Twitter tags, including ogImage. Use the site's own image when it exists and a capture when it does not. To check a single link by hand, use the free OG image checker.
What size should social card images be?
1200 by 630 pixels suits X, Facebook, LinkedIn, Slack and most chat apps. Set the viewport to exactly that size and every card comes out the same shape.
Does it work on JavaScript single-page apps?
Yes. Pages render in a full Chrome browser, so React, Vue, Angular and Next.js sites show their real content. That fixes the common case where a scraper reads the raw HTML and finds an empty page.
How does caching work for previews?
Add cache=true and the same preview is served from cache for cache_ttl seconds: up to 1 day on Free, 7 days on Starter and 30 days on Growth and above. Cached previews return in under 200 ms and do not count against your quota.
Can I generate my own OG images?
Yes. POST your own HTML card template with width 1200 and height 630 and get a PNG, JPEG or WebP back. Try it with the free HTML to PNG tool.