Skip to content
POST AI agent ready /v1/url-metadata

URL Metadata API - Extract Open Graph, Title & Favicon

Fetches a URL and extracts title, description, Open Graph tags, Twitter Card tags, favicon, canonical URL, language, author, keywords, and theme color. Useful for link previews and social sharing.

Parameters

stringrequired

Full URL to fetch and extract metadata from.

Code examples

curl -X POST https://api.botoi.com/v1/url-metadata \
  -H "Content-Type: application/json" \
  -d '{"url":"https://github.com"}'

When to use this API

Generate rich link previews in a chat app

When a user pastes a URL into a chat message, call this endpoint to fetch the title, description, and OG image. Render a preview card below the message, similar to how Slack or Discord display link unfurls.

Validate OG tags before publishing content

Before sharing a blog post on social media, extract its OG tags to confirm the title, description, and image are correct. Catch missing or truncated metadata before it goes live on Twitter, LinkedIn, or Facebook.

Build a bookmark manager with automatic metadata

When a user saves a URL to their bookmark collection, auto-populate the title, description, and thumbnail from the extracted metadata. Save the user from manually entering details for each bookmark.

Frequently asked questions

Does this endpoint follow redirects?
Yes. The endpoint follows HTTP redirects and extracts metadata from the final destination URL. The status field reflects the HTTP status of the final response.
What is the difference between og and twitter fields?
og contains Open Graph meta tags (used by Facebook, LinkedIn, and others). twitter contains Twitter Card tags. Many sites set both, but Twitter Card tags take priority on Twitter/X when both are present.
Can I extract metadata from single-page apps?
The endpoint fetches the initial HTML response without executing JavaScript. If a SPA renders its meta tags client-side, those tags will not appear in the response.
Is there a timeout for slow URLs?
Yes. The endpoint times out after 10 seconds if the target URL does not respond. A timeout returns a 400 error with a descriptive message.
What does the canonical field contain?
The canonical field contains the value of the <link rel="canonical"> tag, which indicates the preferred URL for a page. This helps you deduplicate URLs that serve the same content.

Get your API key

Free tier includes 5 requests per minute with no credit card required. Upgrade for higher limits.