Link Preview & Metadata Extractor avatar

Link Preview & Metadata Extractor

Pricing

Pay per usage

Go to Apify Store
Link Preview & Metadata Extractor

Link Preview & Metadata Extractor

Extract Open Graph, Twitter Cards, meta descriptions, favicons, and all metadata from any URL. Structured link previews with canonical URLs, language detection, HTTP status codes. Pure HTTP, no browser needed. Perfect for SEO audits and content aggregators.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

C R

C R

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Share

An Apify Actor that extracts structured metadata and link previews from any URL — Open Graph tags, Twitter Cards, favicons, SEO meta tags, and more. Pure HTTP + BeautifulSoup, no headless browser needed.

Input

FieldTypeRequiredDefaultDescription
urlstringyesThe URL to extract metadata from
includeFaviconbooleannotrueAlso find and return the favicon URL
userAgentstringnoApify-Metadata-Extractor/1.0Custom User-Agent header
timeoutintegerno15Request timeout in seconds (1–120)

Output

Returns a JSON object with:

  • Title: <title> tag
  • Description: <meta name="description">
  • Open Graph: og:title, og:description, og:image, og:url, og:type, og:site_name, og:locale, og:image:width, og:image:height, og:image:alt, og:video, og:audio
  • Twitter Card: twitter:card, twitter:title, twitter:description, twitter:image, twitter:site, twitter:creator, twitter:image:alt
  • Favicon: resolved favicon URL (from <link rel="icon"> or /favicon.ico fallback)
  • Canonical URL: <link rel="canonical">
  • Language: <html lang="">
  • Author, Keywords, Robots, Viewport
  • All meta tags: flat array of every <meta> tag
  • HTTP: status_code, content_type, response_time_ms

Error handling

Structured errors for invalid URLs, connection failures, DNS errors, timeouts, SSL errors, HTTP 4xx/5xx, and non-HTML content types:

{
"url": "https://example.com",
"error": "Connection failed: ...",
"error_type": "connection_error",
"timestamp": "2026-07-07T12:00:00.000Z"
}

Local testing

cd /root/apify-metadata
python3.12 -m venv .venv
.venv/bin/pip install apify aiohttp beautifulsoup4
APIFY_LOCAL_STORAGE_DIR=./storage mkdir -p storage/key_value_stores/default
echo '{"url":"https://example.com","includeFavicon":true}' > storage/key_value_stores/default/INPUT.json
.venv/bin/python -m src

Then check storage/datasets/default/ for results.

Deployment

Push to Apify using the CLI or GitHub integration. Uses the apify/actor-python:3.12 base image.