Link Preview & Metadata Extractor
Pricing
Pay per usage
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
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
3 days ago
Last modified
Categories
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
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
url | string | yes | — | The URL to extract metadata from |
includeFavicon | boolean | no | true | Also find and return the favicon URL |
userAgent | string | no | Apify-Metadata-Extractor/1.0 | Custom User-Agent header |
timeout | integer | no | 15 | Request 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.icofallback) - 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-metadatapython3.12 -m venv .venv.venv/bin/pip install apify aiohttp beautifulsoup4APIFY_LOCAL_STORAGE_DIR=./storage mkdir -p storage/key_value_stores/defaultecho '{"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.