Social Preview API - Extract Open Graph & Twitter Card Meta Tags
Fetches a URL and extracts Open Graph tags (og:title, og:description, og:image, og:type, og:site_name), Twitter Card tags (twitter:card, twitter:title, twitter:image, twitter:site, twitter:creator), and general HTML metadata (title, description, canonical, favicon). Returns warnings for missing or malformed tags.
Code examples
curl -X POST https://api.botoi.com/v1/social-preview/extract \
-H "Content-Type: application/json" \
-d '{"url":"https://github.com"}'When to use this API
Link preview cards in chat and CMS platforms
When a user pastes a URL into your app, call this endpoint to fetch the Open Graph data and render a rich link preview card with title, description, and image. Works for Slack-style link unfurling.
SEO auditing for social sharing
Scan your pages to verify Open Graph and Twitter Card tags are present and correctly formatted. Catch missing og:image tags or truncated descriptions before sharing campaigns go live.
Content management system enrichment
When editors add external links to articles, auto-populate the link title, description, and thumbnail from the extracted metadata. Saves manual data entry and keeps preview cards consistent.
Frequently asked questions
What happens if the page has no Open Graph tags?
Does this follow redirects?
Can I extract metadata from pages that require JavaScript?
What are the common warnings returned?
Is the og:image URL validated?
Get your API key
Free tier includes 5 requests per minute with no credit card required. Upgrade for higher limits.