You've seen it: paste a link in Slack and it unfurls into a beautiful card with title, description, and image. That's Open Graph metadata. denkbot.dog extracts it automatically. Now you can build the same unfurl feature for your own app. The dog reads the head tags.
Link unfurling in chat applications, social media sharing previews, bookmarking tools with rich previews, and any UI that needs to display a link's social card.
async function unfurlUrl(url) {
const { metadata, title } = await fetch('https://api.denkbot.dog/scrape', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({ url }),
}).then(r => r.json())
return {
title: metadata.ogTitle || title,
description: metadata.ogDescription || metadata.description,
image: metadata.ogImage,
url: metadata.ogUrl || url,
siteName: metadata.ogSiteName,
}
}og:title, og:description, og:image, og:url, og:site_name, twitter:card, twitter:title, twitter:image, twitter:description.
It's returned as-is. You may need to resolve it against the base URL.
og:video is not currently extracted but is present in the raw HTML.

€19/year. Unlimited requests. API key ready in 30 seconds.