URL Metadata API

Fetch any URL and get its title, description, Open Graph and Twitter Card tags, favicon, canonical, feeds and JSON-LD as JSON.

GETPOSThttps://apibox.io.vn/v1/url-metadata

Give a public url and the API fetches the page (following redirects) and parses its <head>: title, description, preview image and alt text, site name, type, locale, language, canonical URL, author, keywords, published time, theme color and robots directive. Values fall back from Open Graph to Twitter Card to standard meta tags, and image and icon URLs are made absolute.

The response also includes all open_graph, twitter_card and other meta tags, the list of icons (with the first one as favicon, or /favicon.ico), RSS/Atom feeds, alternates (hreflang links), up to 5 parsed json_ld blocks, plus the final URL, HTTP status, content type, redirect chain and response time. For non-HTML URLs only the basic fields are returned.

Results are cached for 1 hour per URL; add fresh=true to bypass the cache. The page is read up to 1.5 MB, with a 10 second timeout and at most 8 redirects. Only public http/https hosts are allowed.

Parameters

NameInTypeRequiredDefault
urlbody|querystringyesPublic http/https URL of the page (max 4096 characters).
freshbody|querybooleannofalseBypass the 1-hour cache and fetch the page again.

Example

curl "https://apibox.io.vn/v1/url-metadata?url=https://github.com" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "url": "https://github.com/",
  "final_url": "https://github.com/",
  "status": 200,
  "content_type": "text/html; charset=utf-8",
  "redirects": [],
  "response_ms": 461,
  "title": "GitHub · Change is constant. GitHub keeps you ahead. · GitHub",
  "description": "Join the world's most widely adopted, AI-powered developer platform where millions of developers, businesses, and the largest open source community build software that advances humanity.",
  "image": "https://images.ctfassets.net/8aevphvgewt8/76epZKB2wF998m4e4bLLXn/c505f20b00ec70b88b1be5aec42c4be4/OG_image.jpg",
  "image_alt": "Join the world's most widely adopted, AI-powered developer platform where millions of developers, businesses, and the largest open source community build software that advances humanity.",
  "site_name": "GitHub",
  "type": "object",
  "locale": null,
  "lang": "en",
  "canonical": "https://github.com/",
  "author": null,
  "keywords": [],
  "published_time": null,
  "theme_color": "#1e2327",
  "robots": null,
  "favicon": "https://github.githubassets.com/favicons/favicon.png",
  "icons": [
    {
      "href": "https://github.githubassets.com/favicons/favicon.png",
      "rel": "alternate icon",
      "type": "image/png"
    },
    {
      "href": "https://github.githubassets.com/favicons/favicon.svg",
      "rel": "icon",
      "type": "image/svg+xml"
    }
  ],
  "feeds": [],
  "alternates": [
    "https://github.com/",
    "https://github.com/?locale=pt-br",
    "https://github.com/?locale=ja"
  ],
  "open_graph": {
    "image": "https://images.ctfassets.net/8aevphvgewt8/76epZKB2wF998m4e4bLLXn/c505f20b00ec70b88b1be5aec42c4be4/OG_image.jpg",
    "site_name": "GitHub",
    "type": "object",
    "title": "GitHub · Change is constant. GitHub keeps you ahead. · GitHub",
    "url": "https://github.com/",
    "description": "Join the world's most widely adopted, AI-powered developer platform..."
  },
  "twitter_card": {
    "site": "@github",
    "card": "summary_large_image",
    "title": "GitHub · Change is constant. GitHub keeps you ahead. · GitHub"
  },
  "meta": {
    "viewport": "width=device-width",
    "description": "Join the world's most widely adopted, AI-powered developer platform..."
  },
  "json_ld": []
}

Use cases

  • Build link previews (cards) in chat apps, CMS or social feeds
  • Audit Open Graph and Twitter Card tags before sharing a page
  • Collect titles, favicons and descriptions for bookmarks
  • Discover RSS feeds and structured data (JSON-LD) of a website

FAQ

How do I get the Open Graph image of a URL?

Call /v1/url-metadata?url=... and read image (og:image, falling back to twitter:image) or the full open_graph object.

Are results cached?

Yes, for 1 hour per URL. Add fresh=true to fetch the page again, for example right after updating your meta tags.

Does it follow redirects?

Yes, up to 8 redirects. The response contains final_url and the redirects chain with each status code.

Related APIs

Start with 1,000 free requests every month. Get free API key →