OG Meta Tags API Documentation
Complete reference for the OG Meta Tags API
Authentication
Pass your API key via header or query parameter:
Authorization: Bearer sk_live_your_key_here
Query: ?api_key=sk_live_your_key_here
GET POST /v1/meta/extract
Parameters
| Field | Type | Required | Description |
|---|---|---|---|
url | string | yes | URL to extract meta tags from (http/https) |
Success Response (200)
{
"success": true,
"data": {
"url": "https://github.com",
"title": "GitHub",
"description": "Where the world builds software",
"image": "https://github.githubassets.com/images/og-image.png",
"site_name": "GitHub",
"type": "website",
"locale": "en",
"og": { ... },
"twitter": { ... },
"meta": { ... },
"general": { ... },
"duration_ms": 230
}
}
Response Fields
| Field | Description |
|---|---|
title | Best title found (og:title > <title>) |
description | Best description found (og:description > meta description) |
image | Primary social image (og:image > twitter:image) |
og | All Open Graph properties as key-value object |
twitter | All Twitter Card properties |
meta | Standard meta tags (description, keywords, author, robots) |
general | Page title, canonical URL, favicon, language |
Code Examples
JavaScript
const res = await fetch( `https://snapapis.com/api/v1/meta/extract?api_key=${KEY}&url=${encodeURIComponent(url)}` ); const { data } = await res.json(); console.log(data.title, data.image);
Python
import requests r = requests.get('https://snapapis.com/api/v1/meta/extract', params={'api_key': KEY, 'url': 'https://github.com'}) data = r.json()['data'] print(data['og'])