From link previews to PDF generation — see how developers use CaptureAPI to power their applications with code examples.
Generate rich link previews for chat applications, social platforms, and content management systems. Show users a visual snapshot of any URL before they click.
// Generate a link preview thumbnail
const preview = await fetch(
"https://captureapi.dev/api/v1/screenshot?" +
new URLSearchParams({
url: "https://github.com/vercel/next.js",
width: "600",
height: "400",
format: "webp"
}),
{ headers: { "X-API-Key": "cap_your_key" } }
);Track visual changes on any website. Detect layout shifts, broken pages, and unauthorized content updates by comparing periodic screenshots.
# Capture a full-page screenshot for monitoring
curl "https://captureapi.dev/api/v1/screenshot?\
url=https://your-site.com&\
fullPage=true&\
format=png&\
width=1280" \
-H "X-API-Key: cap_your_key" \
-o "snapshot-$(date +%Y%m%d).png"Convert HTML dashboards, invoices, and reports into professionally formatted PDF documents. Perfect for automated report generation and document workflows.
import requests
# Generate a PDF invoice
response = requests.get(
"https://captureapi.dev/api/v1/pdf",
params={
"url": "https://your-app.com/invoice/123",
"format": "A4",
"margin": "20mm"
},
headers={"X-API-Key": "cap_your_key"}
)
with open("invoice-123.pdf", "wb") as f:
f.write(response.content)Generate unique Open Graph images for every page on your site. No more generic social previews — each link gets a custom-designed card with your content.
// Next.js: dynamic OG image in metadata
export async function generateMetadata({ params }) {
const ogUrl = new URL(
"https://captureapi.dev/api/v1/og"
);
ogUrl.searchParams.set("title", params.title);
ogUrl.searchParams.set("theme", "gradient");
return {
openGraph: {
images: [{ url: ogUrl.toString() }]
}
};
}Generate thumbnails for website directories, portfolios, bookmark managers, and search results. Give users a visual preview of any URL.
// Generate thumbnails for a website directory
const urls = [
"https://github.com",
"https://vercel.com",
"https://nextjs.org"
];
const thumbnails = await Promise.all(
urls.map(url =>
fetch(
`https://captureapi.dev/api/v1/screenshot?` +
`url=${encodeURIComponent(url)}` +
`&width=400&height=300&format=webp`,
{ headers: { "X-API-Key": "cap_key" } }
)
)
);Start capturing screenshots, generating PDFs, and creating OG images today. Free tier includes 200 screenshots/month.
Social Media Cards
Create dynamic Open Graph images for blog posts, product pages, and marketing campaigns. Every shared link gets a beautiful, branded preview card.