Open Graph & Link Preview Extractor avatar

Open Graph & Link Preview Extractor

Pricing

from $3.00 / 1,000 url extracteds

Go to Apify Store
Open Graph & Link Preview Extractor

Open Graph & Link Preview Extractor

Extract Open Graph, Twitter Card, and meta tags from any URL in bulk. Build link previews, social cards, and unfurl data for your apps and automation workflows.

Pricing

from $3.00 / 1,000 url extracteds

Rating

0.0

(0)

Developer

Harsh

Harsh

Maintained by Community

Actor stats

0

Bookmarked

3

Total users

2

Monthly active users

4 days ago

Last modified

Share

Extract Open Graph, Twitter Card, and other social meta tags from any URL in bulk. Use the results to build link previews, social cards, and unfurl data for your apps.

Input

FieldTypeRequiredDefaultDescription
urlsstring[]YesURLs to extract meta tags from
includeTwitterCardsbooleanNotrueInclude Twitter Card meta tags
timeoutMsintegerNo15000Per-request timeout in milliseconds

Output (per URL)

FieldDescription
urlInput URL
titlePage title (og:title or <title>)
descriptionPage description (og:description or meta description)
ogImageOpen Graph image URL (resolved to absolute)
ogTypeOpen Graph type (website, article, etc.)
siteNameOpen Graph site name
twitterCardTwitter Card type
twitterImageTwitter Card image URL
twitterTitleTwitter Card title
twitterDescriptionTwitter Card description
canonicalUrlCanonical link URL
faviconFavicon URL
localeOpen Graph locale
errorError message if extraction failed (null on success)

How it works

  1. Fetches each URL with axios (configurable timeout, follows redirects)
  2. Parses HTML with cheerio
  3. Extracts meta[property^="og:"], meta[name^="twitter:"], link[rel=canonical], and link[rel=icon]
  4. Resolves relative image and link URLs against the page URL
  5. Processes all URLs in parallel with graceful per-URL error handling

Run locally

$apify run

Example input (storage/key_value_stores/default/INPUT.json):

{
"urls": ["https://apify.com", "https://github.com"],
"includeTwitterCards": true,
"timeoutMs": 15000
}

Deploy to Apify

apify login
apify push

Resources