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://www.opengraph.to/api/v1/og

Endpoints

GET/api/v1/og

Scrape and analyze Open Graph metadata for any URL.

Query Parameters

ParameterTypeRequiredDescription
urlstringYesThe URL to analyze (must be publicly accessible)

Example

$ curl "https://www.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://www.opengraph.to/api/v1/og \
  -H "Content-Type: application/json" \
  -d '{"url": "https://github.com"}'

Response

200Success

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

Response Fields

FieldTypeDescription
urlstringNormalized URL that was analyzed
titlestringPage title (from og:title or <title>)
descriptionstringPage description (from og:description or meta description)
imageobject | nullOG image with url, width, height, alt
twitterobjectTwitter Card data (card, site, title, description, image)
analysisobjectScore (0-100), summary, and list of issues found
suggestedTagsstringHTML 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\" />..."
}
429Rate Limited
{
  "error": "Rate limit exceeded",
  "message": "Maximum 10 requests per hour. Try again later.",
  "retryAfter": 2847
}
502Scrape 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:

HeaderDescription
X-RateLimit-LimitMax requests allowed in the window (10)
X-RateLimit-RemainingRequests remaining in the current window
X-RateLimit-ResetUnix timestamp when the window resets
Retry-AfterSeconds to wait (only on 429 responses)

Code Examples

JS
JavaScript / TypeScript
const response = await fetch(
  'https://www.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://www.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://www.opengraph.to/api/v1/og?url=https://github.com"

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

# Show response headers (rate limit info)
curl -i "https://www.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.