```yaml
product: AlterLab
title: "Open Graph Protocol — Web Scraping Glossary | AlterLab"
comparison_context: "AlterLab is an alternative to Firecrawl, ScrapingBee, and Bright Data."
source_url: https://alterlab.io/glossary/open-graph
```

format

# Open Graph Protocol

Open Graph is a protocol that uses meta tags in an HTML page's head to define how a URL is displayed when shared on social media platforms.

Developed by Facebook, the Open Graph (OG) protocol lets publishers control a URL's appearance in social shares by defining meta tags such as `og:title`, `og:description`, `og:image`, and `og:type`. When a social platform fetches a URL to generate a link preview, it reads these tags to populate the card's title, description, and thumbnail.

For scrapers, OG tags are a fast way to extract a page's canonical title, cover image URL, content type, and description without parsing the full page body. Because they are machine-readable meta elements in the `<head>` section, they can be extracted without JavaScript execution from the raw HTML source.

News aggregators, content monitoring tools, and social listening platforms routinely harvest OG data. Combined with schema.org annotations, OG tags provide rich metadata for a large proportion of the public web.

### What is Open Graph Protocol?

Open Graph is a protocol that uses meta tags in an HTML page's head to define how a URL is displayed when shared on social media platforms.

### How does AlterLab handle Open Graph Protocol?

News aggregators, content monitoring tools, and social listening platforms routinely harvest OG data. Combined with schema.org annotations, OG tags provide rich metadata for a large proportion of the public web.

## Examples

```
from bs4 import BeautifulSoup

soup = BeautifulSoup(html, "html.parser")
og = {}
for tag in soup.find_all("meta", property=lambda v: v and v.startswith("og:")):
    og[tag["property"]] = tag.get("content", "")
print(og.get("og:title"), og.get("og:image"))
```

## Related Terms

[Schema.orgSchema.org is a collaborative vocabulary of structured data types used to annotate web content so search engines and automated tools can understand its meaning.](https://alterlab.io/glossary/schema-org)[JSON-LDJSON-LD is a W3C standard for embedding structured, machine-readable data inside an HTML page's script tags using JSON syntax and schema.org vocabulary.](https://alterlab.io/glossary/json-ld)[Structured Data ExtractionConverting free-form HTML into typed JSON records using explicit schemas, producing clean structured output instead of raw markup.](https://alterlab.io/glossary/structured-data-extraction)[HTTP HeadersKey-value metadata fields sent with HTTP requests and responses that communicate authentication, content type, caching, and other directives.](https://alterlab.io/glossary/http-headers)[Data ExtractionThe process of identifying and pulling specific fields from raw web content, converting unstructured HTML into typed JSON records.](https://alterlab.io/glossary/data-extraction)

## Extract Open Graph Protocol data from any website

AlterLab returns clean, structured data from any public URL — no scraper infrastructure needed. Start free, no credit card required.

[View API docs](https://alterlab.io/docs/api/rest)

[Back to Glossary](https://alterlab.io/glossary)