📸Screenshots & Previews

Scrape Social Media Preview Data

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.

What you'd use this for

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.

How it works

example
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,
  }
}

Questions & Answers

Which social preview tags are extracted?+

og:title, og:description, og:image, og:url, og:site_name, twitter:card, twitter:title, twitter:image, twitter:description.

What if og:image is a relative URL?+

It's returned as-is. You may need to resolve it against the base URL.

What about video previews?+

og:video is not currently extracted but is present in the raw HTML.

Ready to start fetching?

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