Public REST API

Open Graph API

Check OG meta tags, Twitter Cards, and SEO metadata for any URL programmatically. Free to use with rate limiting.

No Auth Required

No API key needed

10 req / hour

Per IP rate limit

JSON Response

5 min cache

Base URL

GET  https://opengraph.to/api/v1/og

Endpoints

GET /api/v1/og

Scrape and analyze Open Graph metadata for any URL.

Query Parameters

Parameter Type Required Description
url string Yes The URL to analyze (must be publicly accessible)

Example

$ curl "https://opengraph.to/api/v1/og?url=https://github.com"
POST /api/v1/og

Same as GET but accepts a JSON body. Useful for integrations and scripts.

Request Body

Content-Type: application/json

{
  "url": "https://github.com"
}

Example

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

Response

200 Success

Returns the scraped OG data, analysis with score, and suggested meta tags.

Response Fields

Field Type Description
url string Normalized URL that was analyzed
title string Page title (from og:title or <title>)
description string Page description (from og:description or meta description)
image object | null OG image with url, width, height, alt
twitter object Twitter Card data (card, site, title, description, image)
analysis object Score (0-100), summary, and list of issues found
suggestedTags string HTML meta tags code you can copy-paste

Example Response

{
  "url": "https://github.com",
  "title": "GitHub: Let's build from here",
  "description": "GitHub is where over 100 million developers shape the future of software...",
  "siteName": "GitHub",
  "type": "website",
  "locale": "en_US",
  "image": {
    "url": "https://github.githubassets.com/assets/campaign-social.png",
    "width": 1200,
    "height": 630,
    "alt": "GitHub",
    "type": ""
  },
  "twitter": {
    "card": "summary_large_image",
    "site": "@github",
    "creator": "",
    "title": "GitHub: Let's build from here",
    "description": "GitHub is where over 100 million developers shape the future...",
    "image": "https://github.githubassets.com/assets/campaign-social.png"
  },
  "favicon": "https://github.githubassets.com/favicons/favicon.svg",
  "canonical": "https://github.com/",
  "analysis": {
    "score": 82,
    "summary": "Good setup, but there are some improvements you can make.",
    "issues": [
      {
        "severity": "info",
        "category": "image",
        "slug": "missing-og-image-alt",
        "title": "Missing og:image:alt",
        "description": "Adding alt text to your OG image improves accessibility and SEO."
      }
    ]
  },
  "suggestedTags": "<meta property=\"og:title\" content=\"GitHub\" />..."
}
429 Rate Limited
{
  "error": "Rate limit exceeded",
  "message": "Maximum 10 requests per hour. Try again later.",
  "retryAfter": 2847
}
502 Scrape Failed
{
  "error": "HTTP 404: Not Found"
}

Rate Limiting

The API enforces a strict rate limit of 10 requests per hour per IP address. This is tracked server-side and cannot be bypassed with headers.

Every response includes rate limit headers so you can track your usage:

Header Description
X-RateLimit-Limit Max requests allowed in the window (10)
X-RateLimit-Remaining Requests remaining in the current window
X-RateLimit-Reset Unix timestamp when the window resets
Retry-After Seconds to wait (only on 429 responses)

Code Examples

JS
JavaScript / TypeScript
const response = await fetch(
  'https://opengraph.to/api/v1/og?url=https://github.com'
);

const data = await response.json();

console.log(data.title);          // "GitHub: Let's build from here"
console.log(data.analysis.score); // 82
console.log(data.image?.url);      // "https://github.githubassets.com/..."

// Check rate limit
const remaining = response.headers.get('X-RateLimit-Remaining');
console.log(`Requests left: ${remaining}`);
PY
Python
import requests

response = requests.get(
    "https://opengraph.to/api/v1/og",
    params={"url": "https://github.com"}
)

data = response.json()

print(data["title"])            # "GitHub: Let's build from here"
print(data["analysis"]["score"]) # 82

# Check remaining quota
remaining = response.headers.get("X-RateLimit-Remaining")
print(f"Requests left: {remaining}")
cURL
cURL
# GET request
curl "https://opengraph.to/api/v1/og?url=https://github.com"

# POST request
curl -X POST https://opengraph.to/api/v1/og \
  -H "Content-Type: application/json" \
  -d '{"url": "https://github.com"}'

# Show response headers (rate limit info)
curl -i "https://opengraph.to/api/v1/og?url=https://github.com"

Use Cases

CI/CD Pipelines

Validate OG tags after each deploy. Fail the build if the score drops below a threshold.

Dashboards

Build internal tools that monitor OG tags across your pages and track score changes.

Link Previews

Fetch OG data to render rich link previews in your app, chat, or CMS.

SEO Audits

Automate OG & SEO checks across multiple pages and generate reports.