OpenGraph.io

REST API Quickstart

Make your first OpenGraph.io API call in under 5 minutes. This guide walks you through authentication, your first request, and understanding the response.

Before You Begin

You'll need an OpenGraph.io App ID to authenticate your requests. Sign up for a free account to get started with 100 free API credits per month.

Get your free API key →

4 Steps to Your First API Call

  1. Get Your App ID

    After signing up, find your App ID in the dashboard. You'll use this to authenticate all API requests.

  2. Make Your First Request

    Use curl or any HTTP client to unfurl a URL. Replace YOUR_APP_ID with your actual App ID:

    curl
    curl "https://opengraph.io/api/1.1/site/https%3A%2F%2Fgithub.com?app_id=YOUR_APP_ID"

    Important: The URL must be URL-encoded. In the example above, https://github.com becomes https%3A%2F%2Fgithub.com. See URL Encoding for details.

  3. Understand the Response

    The API returns OpenGraph metadata, Twitter Card data, and intelligently inferred values:

    Response
    {
      "hybridGraph": {
        "title": "GitHub: Let's build from here",
        "description": "GitHub is where over 100 million developers shape the future of software.",
        "image": "https://github.githubassets.com/images/modules/site/social-cards/github-social.png",
        "url": "https://github.com/",
        "site_name": "GitHub",
        "type": "website"
      },
      "openGraph": {
        "title": "GitHub: Let's build from here",
        "description": "GitHub is where over 100 million developers...",
        "image": { "url": "..." }
      },
      "htmlInferred": {
        "title": "GitHub: Let's build from here",
        "description": "GitHub is where over 100 million developers..."
      }
    }
  4. Explore More Endpoints

    Now that you've made your first call, explore our other powerful endpoints:

Code Examples

curl "https://opengraph.io/api/1.1/site/https%3A%2F%2Fgithub.com?app_id=YOUR_APP_ID"

Next Steps