Open Graph, Twitter Card & SEO extraction from any URL

URL Metadata API

The URL Metadata API turns any web page into clean, structured JSON. Give it a URL and it fetches the page with a real browser User-Agent, follows redirects, and parses the HTML to extract the title, meta description and keywords, canonical link, charset, html lang, every Open Graph tag, every Twitter Card tag, and all favicons.

Built on Cloudflare's edge network with a streaming HTMLRewriter parser, it never buffers giant pages into memory and responds in milliseconds. Relative canonical, og:image and favicon URLs are automatically resolved to absolute URLs against the final post-redirect address, and non-HTML responses are detected and returned gracefully instead of producing garbage.

Free tier · no credit card · billed on RapidAPI

<300ms
Response Time
10+
Metadata Fields
99.9%
Uptime SLA

Key features

  • Title, description, keywords, canonical, charset and html lang extraction
  • Every Open Graph (og:*) tag returned as structured key/value pairs
  • Every Twitter Card (twitter:*) tag captured
  • All favicons with rel, href, sizes and type, plus optional /favicon.ico fallback
  • Relative og:image, canonical and favicon URLs resolved to absolute
  • Follows redirects and reports both the original and final URL
  • Streaming HTMLRewriter parser — large pages never fully buffered
  • Built-in SSRF guard rejects localhost and private-range hosts

Perfect for

  • Rich link previews in chat and social apps
  • Generating share cards and unfurled URLs
  • Bulk SEO and metadata audits
  • Competitor and brand page monitoring
  • Enriching URL-based datasets and bookmarks
  • Content pipelines and CMS imports
  • Validating Open Graph and Twitter Card markup
  • Building reading lists and content aggregators
Documentation

URL Metadata API Documentation

Everything you need to integrate — base URL, auth, and copy-paste examples.

The URL Metadata API fetches a target URL with a browser-like User-Agent (following redirects) and parses the HTML with Cloudflare's streaming HTMLRewriter to extract SEO, Open Graph, Twitter Card, favicon and page metadata. Relative canonical, og:image and favicon URLs are resolved to absolute against the final response URL. A single GET /v1/extract endpoint covers every use case.

Base URL

https://edge-apis.e9736.workers.dev

Authentication

Pass your API key as the ?apikey= query parameter. When called through RapidAPI, authentication is handled by the RapidAPI proxy headers instead.

headers
# Direct (edge) — query param auth
GET /url-metadata/v1/extract?url=https://example.com&apikey=YOUR_KEY

# Via RapidAPI — header auth
{
  "X-RapidAPI-Key": "YOUR_RAPIDAPI_KEY",
  "X-RapidAPI-Host": "url-metadata-api.p.rapidapi.com"
}

Request & response

Request
http
GET /url-metadata/v1/extract?url=https://www.example.com/blog/launch&apikey=YOUR_KEY HTTP/1.1
Response
json
{
"url": "https://www.example.com/blog/launch",
"final_url": "https://www.example.com/blog/launch",
"status": 200,
"content_type": "text/html; charset=utf-8",
"title": "We just launched — Example Blog",
"description": "Read about our brand new product launch and what it means for you.",
"keywords": ["launch", "product", "example", "news"],
"canonical": "https://www.example.com/blog/launch",
"lang": "en",
"charset": "utf-8",
"open_graph": {
  "og:title": "We just launched",
  "og:type": "article",
  "og:image": "https://www.example.com/img/launch-hero.png"
},
"twitter": {
  "twitter:card": "summary_large_image",
  "twitter:image": "https://www.example.com/img/launch-hero.png"
},
"favicons": [
  { "rel": "icon", "href": "https://www.example.com/favicon-32.png", "sizes": "32x32", "type": "image/png" }
],
"images": ["https://www.example.com/img/launch-hero.png"]
}

Code examples

cURL
curl --request GET \
  --url 'https://url-metadata-api.p.rapidapi.com/v1/extract?url=https://www.example.com/blog/launch' \
  --header 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
  --header 'X-RapidAPI-Host: url-metadata-api.p.rapidapi.com'

Endpoints

GET /v1/extract

Fetch the target URL and extract title, meta description/keywords, canonical link, charset, html lang, all Open Graph tags, all Twitter Card tags, favicons and Open Graph images. Returns base fields with a note for non-HTML responses.

/v1/extract?url=https://www.example.com/blog/launch

Parameters

Required Parameters

  • url - The page URL to inspect. Must use http:// or https://.

Optional Parameters

  • timeout_ms - Upstream fetch timeout in milliseconds. Default 10000, capped at 20000.
  • favicon_fallback - If no icon link is found in the HTML, include the conventional /favicon.ico guess (flagged with "default": true). Default true.
  • block_private - Reject localhost / private-range literal hosts (best-effort SSRF guard). Set to false to allow such hosts. Default true.
Pricing

URL Metadata API Pricing

Choose the right plan for your metadata extraction needs with flexible pricing options and no hidden fees

No credit card to start · cancel anytime

Basic

Free
500 Requests / Month
  • Full metadata extraction
  • Open Graph & Twitter Card tags
  • Favicon detection
  • 5 requests / second
Get Started Free
Most popular

Pro

$9.99/month
25,000 Requests / Month
  • Full metadata extraction
  • Open Graph & Twitter Card tags
  • 20 requests / second
  • $0.50 / 1k overage
Subscribe Now

Ultra

$49.99/month
250,000 Requests / Month
  • Full metadata extraction
  • Open Graph & Twitter Card tags
  • 50 requests / second
  • $0.30 / 1k overage
Subscribe

Need higher volume or a custom SLA?

Talk to us about enterprise rates, dedicated support, and compliance docs.

Contact sales
FAQ

Frequently asked questions

A single call to /v1/extract returns the page title, meta description and keywords, canonical link, charset, html lang attribute, every Open Graph (og:*) tag, every Twitter Card (twitter:*) tag, all favicons (with rel, href, sizes and type), Open Graph image URLs, and request metadata including the original url, the final_url after redirects, the HTTP status and the content_type.

Yes. The API fetches the target URL with a browser-like User-Agent and follows redirects, reporting both the original url you supplied and the final_url after redirection. Relative URLs for the canonical link, og:image and favicons are automatically resolved to absolute URLs against the final post-redirect response URL, so the data you get back is ready to render without further normalization.

Non-HTML responses such as PDFs, images and JSON are detected via the content_type header. Instead of returning garbage, the API responds with the base request fields (url, final_url, status, content_type), empty metadata collections (open_graph, twitter, favicons, images), and an explanatory note field so your integration can handle these cases gracefully.

Yes. By default (block_private=true) the API includes a best-effort SSRF guard that rejects requests to localhost and private-range literal hosts, preventing the endpoint from being used to probe internal infrastructure. If you control the input and need to inspect internal pages, you can disable this with block_private=false.

Use the optional timeout_ms parameter, which sets the upstream fetch timeout in milliseconds. It defaults to 10000ms and is capped at 20000ms. If the target page fails to load or exceeds the timeout, the API returns a 502 response with an error and detail message so you can retry or skip that URL.

The API runs on Cloudflare's global edge network across 300+ locations and typically responds in under 300ms. It parses HTML with a streaming HTMLRewriter rather than a DOM library, so even very large pages are never fully buffered into memory — metadata is extracted as the bytes stream through, keeping memory usage flat and responses fast.

Absolutely. The API is ideal for generating rich link previews, share cards, bulk SEO and metadata audits, and dataset enrichment. Fan out requests in parallel within your plan's rate limit (5 req/s on Basic, 20 on Pro, 50 on Ultra), cache results since page metadata changes infrequently, and persist the final_url to deduplicate links that resolve to the same destination.

Every week you build in-house is a week you don't ship product

2,500+ teams already made the switch. Start with a free tier today, or talk to us about your enterprise needs.

For developers

Free tier, no credit card. Integrate your first API in under 30 minutes.

Get API keys freeRead the docs

For teams and enterprise

Custom volumes, SLA guarantees, dedicated support, and compliance documentation.

Talk to sales

or email sales@apicodex.io