OpenGraph Data Extractor
/api/opengraph 1 credit(s) per call
Extract OpenGraph metadata from any URL including title, description, image, and custom properties.
Overview
The OpenGraph Data Extractor fetches any URL and parses its OpenGraph meta tags. Returns structured data including title, description, image, site name, type, locale, audio, video, and any custom og:* properties. Also extracts the favicon.
Endpoint
POST
/api/opengraph
GET
/api/opengraph/fetch?url=https://example.com
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | Yes | The URL to extract OpenGraph data from (e.g. https://github.com) |
Response Fields
The response is wrapped in a standard API envelope:
| Field | Type | Description |
|---|---|---|
| success | boolean | true on success |
| data.url | string | The URL that was fetched |
| data.title | string? | The og:title value |
| data.description | string? | The og:description value |
| data.siteName | string? | The og:site_name value |
| data.image | string? | The og:image URL (resolved to absolute) |
| data.imageAlt | string? | The og:image:alt value |
| data.imageWidth | string? | The og:image:width value |
| data.imageHeight | string? | The og:image:height value |
| data.imageType | string? | The og:image:type value |
| data.type | string? | The og:type value (e.g. website, article) |
| data.locale | string? | The og:locale value |
| data.favicon | string? | Detected favicon URL from the page |
| data.audio | array | Audio items with url and type |
| data.video | array | Video items with url, type, width, height |
| data.extraProperties | array | Any other og:* properties not in the standard set, each with property and content |
| data.fetchTimeMs | int | Time taken to fetch and parse the page in milliseconds |
Example
Extract OpenGraph data from a URL:
curl -X POST https://simplewebapis.com/api/opengraph \
-H "Content-Type: application/json" \
-H "X-Api-Key: swa_your_key" \
-d '{"url": "https://github.com"}'
The response is a JSON object (Content-Type: application/json).
Try it out
Use the Playground to test this API live.