Skip to content
YAS.SH
Network & DNS🌐 YAS server-sideAPI availablebeginner

Open Graph Preview

Fetches a URL and shows its Open Graph / Twitter card metadata as a preview.

Processed by YAS · not stored
Ready to runInstant execution
All tools →
Loading tool…

What does this tool do?

Fetches a URL and shows its Open Graph / Twitter card metadata as a preview.

Why would I use it?

  • You want to see how your link will look when shared on social media.
  • You are debugging missing or broken share cards.
  • You want to check a competitor's OG tags.

Real-life example

Input
https://example.com
Output
og:title, og:description, og:image, twitter:card — rendered as a preview card

Missing tags are flagged so you can fix them.

Input → Process → Output → Next

Input
Enter a URL.
Process
YAS fetches the page and extracts OG/Twitter meta tags.
Output
A preview card plus the raw tags.
Next action
Add missing OG tags and re-test.

Common mistakes

  • Expecting image previews from pages without og:image.
  • Using relative image URLs (they must be absolute).
  • Forgetting twitter:card for X/Twitter shares.

What the result means

The tags control how links appear when shared.

Privacy & security

Your input is sent to YAS infrastructure because the tool requires server-side processing or public network queries. Input is not stored.

API

Endpoint
POST https://yas.sh/api/v1/tools/open-graph-preview
Request Header
Content-Type: application/json
cURL
curl -X POST "https://yas.sh/api/v1/tools/open-graph-preview" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com"}'
JavaScript
const res = await fetch("https://yas.sh/api/v1/tools/open-graph-preview", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
  "url": "https://example.com"
}),
});
const data = await res.json();
Python
import requests

r = requests.post("https://yas.sh/api/v1/tools/open-graph-preview", json={"url":"https://example.com"})
data = r.json()
FieldTypeRequiredDescription
urlstringYeshttp/https URL
Success response
{ "pageUrl": "...", "openGraph": { "title":"...", "image":"..." }, "twitter": {...}, "fallbackTitle": "..." }

Fetch a URL and show its Open Graph / Twitter meta as a preview card.

Error responses
  • 400 VALIDATION_ERROR — invalid input or unsupported option.
  • 413 PAYLOAD_TOO_LARGE — input exceeds the 64 KB limit.
  • 429 RATE_LIMIT_EXCEEDED — rate limit exceeded (60 req/min).
Limits
  • Maximum input: 64 KB per request.
  • Rate limit: 60 requests/min per IP address.
  • Authenticated accounts benefit from higher tier quotas.

Open Graph Preview: technical reference, use cases and FAQ

How Open Graph Preview works

Open Graph metadata is a set of meta tags with property attributes in the og: namespace — og:title, og:description, og:image, og:url, og:type — that tell social platforms how to render a shared link. Twitter/X layers its own twitter:card tags on top, falling back to Open Graph when they are absent. The preview is assembled by a crawler that fetches the URL and parses only the head, without executing most JavaScript.

That last point drives most failures. Metadata injected client-side after hydration is invisible to crawlers that do not run scripts, so a single-page application must render og tags server-side. Platforms also cache aggressively: once a preview is scraped, updating the tags does not change what is displayed until the cache is invalidated through the platform's own debugger.

When to use it: real-world scenarios

Checking a link before publishing a campaign

A missing or wrongly-cropped image measurably reduces click-through. Verifying takes seconds and cannot be undone after the post goes out.

Debugging a preview that shows the wrong content

Usually a stale platform cache or a client-side injected tag. Seeing the tags as a crawler sees them separates the two.

Standardising previews across a site

Templates often set og:title from the page title but forget og:image on non-article pages, producing inconsistent shares.

Validating dynamically generated preview images

Generated OG images must resolve at an absolute URL with correct dimensions and content type — all three fail quietly.

Pro tips

  • Use 1200×630 pixels for og:image. Smaller images are rendered as a small thumbnail rather than a large card, which halves visual impact.
  • og:image must be an absolute URL. Relative paths are the single most common reason an image does not appear.
  • Keep og:title under about 60 characters and og:description under about 155; platforms truncate beyond that with no indication.
  • After changing tags, force a re-scrape in each platform's debugger. Caches persist for days otherwise.

Limitations and edge cases

What this tool deliberately does not do, and where it will disagree with other implementations.

  • Rendering differs by platform: each applies its own crop, character limits and card layout, so one preview cannot represent all of them.
  • Client-side injected metadata is not evaluated, mirroring how most crawlers behave.
  • Platform-side caches cannot be cleared from here — that requires each platform's own tool.
  • Authenticated or geo-restricted pages may return different metadata to a crawler than to a user.

Frequently asked questions

Why is my image not showing in the preview?
Most often a relative og:image URL, an image below the platform's minimum size, or a URL that requires authentication. Use an absolute HTTPS URL to a publicly reachable 1200×630 image.
I updated my tags but the old preview still appears.
The platform cached the previous scrape. Use its debugger — Facebook's Sharing Debugger, LinkedIn's Post Inspector — to force a refresh; there is no way to expire it from your side.
Do I need Twitter card tags as well as Open Graph?
Not strictly — Twitter/X falls back to og: tags. Add twitter:card to control the layout explicitly and twitter:image where you want a different crop.
Does Open Graph affect SEO?
Not directly as a ranking signal, but it affects click-through on shared links, and engagement with your content is worth optimising in its own right.
Ask YAS AI
🍪 Cookies & privacy. Essential cookies keep you signed in and remember language and theme. Google AdSense and reCAPTCHA are Google technologies: AdSense runs only after Accept All; reCAPTCHA loads on sign-in and contact forms. See how Google uses data: https://policies.google.com/technologies/partner-sites cookie policy · privacy policy.
Settings