Skip to main content
Glama

getOgData

Read-onlyIdempotent

Fetch Open Graph metadata and social preview data (title, description, image, favicon) for any URL. Returns merged results from OG tags, HTML fallbacks, and a hybrid source.

Instructions

Fetch Open Graph metadata, HTML-inferred tags, and hybrid social preview data for any URL via the OpenGraph.io API (v3). Returns og:title, og:description, og:image, og:type, favicon, and more, merged from three sources: raw Open Graph tags (openGraph), HTML-inferred fallbacks (htmlInferred), and a best-of hybrid (hybridGraph). Use hybridGraph as your primary source — it fills gaps automatically.

Pick the right tool: getOgData → Open Graph tags, social preview metadata (title, description, image, favicon) getOgMarkdown → Clean readable text / article prose — ideal for feeding into an LLM getOgScrapeData → Raw HTML — use when you need to do your own parsing or link extraction getOgExtract → Targeted elements by tag (html_elements) or named CSS selectors (selectors) getOgScreenshot → Visual capture of a page as an image getOgQuery → Natural-language question answered from page content (100–200 credits/request)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL of the webpage to analyze.
retryNoAutomatically retry failed requests with escalating proxy tiers. Defaults to true on v3.
use_aiNoEnhance the metadata response with AI-generated fields. Requires an AI-enabled plan.
cache_okNoUse cached results. Set to false to bypass cache and get fresh data. Defaults to true.
use_proxyNoRoute the request through a standard proxy.
auto_proxyNoAutomatically escalate to a proxy if the direct request fails. Defaults to true on v3.
accept_langNoAccept-Language header for the outbound request. Use 'auto' to mirror the caller's language. Defaults to 'auto'.
ai_sanitizeNoScan the fetched content for prompt-injection attempts before returning it.
auto_renderNoAutomatically detects JS-heavy / SPA pages and re-fetches with browser rendering when needed. Enabled by default on v3 — leave unset unless you want to disable it. For guaranteed JS execution on every request use full_render: true instead.
full_renderNoForces a full browser execution pass on every request regardless of page type. Use when auto_render hasn't produced the content you expected, or when you need guaranteed JavaScript execution. Slower than auto_render — prefer auto_render for most cases.
max_retriesNoMaximum number of retry attempts (1–4). Defaults to 4.
use_premiumNoRoute the request through a premium proxy.
use_superiorNoRoute the request through a superior-tier proxy.
max_cache_ageNoMaximum cache age in milliseconds. Results older than this will be re-fetched. Defaults to 432000000 (5 days).
proxy_countryNoTwo-letter ISO country code for geo-targeted proxy exit node (e.g. 'US', 'GB').
load_more_waitNoMilliseconds to wait after each load_more click (0–5000). Defaults to 1500.
retry_escalateNoEscalate proxy tier on each retry attempt. Defaults to true.
ai_sanitize_modeNo'sanitize' cleans the content, 'warn' returns it with a safety report, 'block' returns HTTP 422 when risk_score >= 0.7.
load_more_clicksNoNumber of times to click the load_more_selector (1–10). Defaults to 3.
load_more_scrollNoScroll between load_more clicks. Defaults to true.
scroll_to_bottomNoScroll to the bottom of the page before extraction. Useful for lazy-loaded content. Forces full_render.
wait_for_selectorNoCSS selector to wait for before extracting data. Forces full_render.
load_more_selectorNoCSS selector for a 'load more' button to click before extraction. Forces full_render.
load_more_item_selectorNoCSS selector to watch for new items when using load_more_selector.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
openGraphNoRaw Open Graph tag values
hybridGraphNoBest-of merged metadata from all sources
requestInfoNoRequest metadata (cache status, version, options echo)
htmlInferredNoHTML-inferred fallback values
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, openWorldHint, idempotentHint, destructiveHint. The description adds valuable behavioral context: three data sources merging behavior, automatic gap-filling by hybridGraph, and hints about defaults (retry, cache_ok). Does not contradict annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with purpose, followed by a clear sibling comparison table. Every sentence adds value, and it is concise given the complexity (24 parameters).

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (24 parameters, output schema exists), the description explains the data sources, hybrid nature, and usage guidance. It could mention that the output schema provides detailed field descriptions, but overall it is complete enough.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline is 3. The description does not elaborate on individual parameters beyond the schema, but provides overall context about data sources and output structure that helps understand parameter relevance.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool fetches Open Graph metadata, HTML-inferred tags, and hybrid social preview data. It specifies the verb 'Fetch' and resource, and distinguishes from siblings by listing what each sibling tool does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly provides a 'Pick the right tool' section that tells when to use getOgData versus alternatives like getOgMarkdown, getOgScrapeData, etc. It also advises using hybridGraph as the primary source.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/securecoders/opengraph-io-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server