Open Graph API — extract page metadata

Need Open Graph and Twitter card metadata from code without building your own scraper? Use the TinyUtils Open Graph API.

The problem

Metadata extraction looks simple, but production usage needs redirect handling, host safety checks, timeouts, and predictable parsing rules. Doing this repeatedly across scripts and services is noisy.

TinyUtils fetches the page and returns clean metadata fields in one API call.

Quick solution

curl

curl "https://tinyutils.dev/api/open-graph?url=https://example.com"

Example response

{
  "input_url": "https://example.com",
  "final_url": "https://www.example.com/",
  "status": 200,
  "title": "Example Domain",
  "description": "Example description",
  "canonical": "https://www.example.com/",
  "open_graph": {
    "title": "Example Domain",
    "description": "Example description",
    "type": "website"
  },
  "twitter": {
    "card": "summary_large_image",
    "title": "Example Domain"
  },
  "error": null,
  "meta": {
    "responseTimeMs": 96,
    "cached": false,
    "rateLimitedScope": "global"
  }
}

Use cases

JavaScript example

JavaScript (fetch)

const res = await fetch(
  "https://tinyutils.dev/api/open-graph?url=https://example.com"
);
const data = await res.json();

if (!data.error) {
  console.log("Title:", data.title);
  console.log("Canonical:", data.canonical);
  console.log("OG image:", data.open_graph.image);
}

See also

Try the Open Graph tool

Enter any URL and inspect metadata instantly.

Open Graph tool →