OpenGraph.io API Documentation

OpenGraph.io is a fast and easy way to get Open Graph ( http://ogp.me ) information from websites. If you have dealt in the OpenGraph world at all you know that many sites still do not provide OG tags. Never fear, we’ve got you covered.

Our spiders will scour the site for OpenGraph data and if we find some we will send it to you. If we don’t find anything we will analyze the HTML on the page and provide you with simulated OG data.

Since our API is very straight forward and REST based you can use any HTTP client library to work with our service.

NOTE TO EXISTING USERS: We have recently added a new version (1.1) of the API which all users should migrate to.   If you are relying on the hybridGraph element you should not have to make any changes on your end aside from the version in your requests to OpenGraph.

Site Lookup

Request:

GET https://opengraph.io/api/1.1/site/<URL encoded site URL>
Request Parameter Required Description
cache_ok
no This will force our servers to pull a fresh version of the site being requested. This can significantly slow down the time it takes to get a response.
app_id
yes The API key for registered users.  Create an account (no cc ever required) to receive your app_id.
full_render
no This will fully render the site using a chrome browser before parsing its contents. This is especially helpful for single page applications and JS redirects. This will slow down the time it takes to get a response by around 1.5 seconds.
Response Element Parent Description
url
The url that was provided in the request. In case you forgot.
hybridGraph
As much of the Open Graph data that can be inferred from the site requested. Our service will first check for proper OG tags
on the site. If they exist the hybridGraph element will mirror them. For elements that are not discovered, our service will
analyze the site’s markup to make best guesses for each OG data point where possible.For the quickest solution, we recommend you use this for your application if you just need to know basic information about the site
htmlInferred
The resulting relevant information found when parsing the site’s markup.
openGraph
The OpenGraph tags pulled from the site. These values will be empty if there are no tags specified for a page. In most cases, you should probably be using the `hybridGraph` element

Example Response: ( http://opengraph.io/api/1.0/site/http%3A%2F%2Fmailchimp.com&app_id=YOURAPPID )

"hybridGraph":{
  "url": "http://mailchimp.com",
  "hybridGraph": {
  "title": "Send Better Email | MailChimp",
  "description": "MailChimp is the best way to design, send, and share email newsletters.",
  "image": "http://static.mailchimp.com/www/images/freddie-opengraph.png",
  "url": "http://mailchimp.com/",
  "type": "website",
  "site_name": "MailChimp"
},
"openGraph": {
  "error": null,
  "title": "Send Better Email | MailChimp",
  "type": "website",
  "admins": "4302132",
  "site_name": "MailChimp",
  "image": "http://static.mailchimp.com/www/images/freddie-opengraph.png",
  "url": "http://mailchimp.com/",
  "description": "MailChimp is the best way to design, send, and share email newsletters."
},
"htmlInferred": {
  "title": "Send Better Email | MailChimp",
  "description": "The latest album from Urban Seekers drops this Tuesday at finer record shops across the country. Stream the new album on the Double Double website and be sure to check out dates for the upcoming Urban Seekers tour.",
  "images": [
"http://static.mailchimp.com/web/home/animation/neo.png"
  ],
  "image_guess": "http://static.mailchimp.com/web/home/animation/neo.png"
},
"_id": "530ef2bd4792516eea434270",
"__v": 0,
"accessed": 1,
"updated": "2014-02-27T08:09:33.488Z",
"created": "2014-02-27T08:09:33.487Z"
}