# URL Metadata & Open Graph Extractor (`sfoln/url-metadata`)

Extract metadata from any list of URLs: title, meta description, canonical, language, favicon, Open Graph and Twitter Card tags, JSON-LD types, feeds, H1, word and link counts. One fast HTTP fetch per URL, no browser. $1 per 1,000 URLs; failed and missing pages are free.

- Family: Web toolkit for agents
- Categories: Developer tools, SEO tools, Automation
- Store: https://apify.com/sfoln/url-metadata (Markdown: https://apify.com/sfoln/url-metadata.md)
- JSON: https://www.sfoln.com/actors/url-metadata.json
- MCP: https://mcp.apify.com?tools=sfoln/url-metadata
- REST (sync): POST https://api.apify.com/v2/actors/sfoln~url-metadata/run-sync-get-dataset-items
- REST (async): POST https://api.apify.com/v2/actors/sfoln~url-metadata/runs

URL Metadata & Open Graph Extractor turns a list of URLs into clean, structured page metadata: title, meta description, canonical URL, language, favicon, Open Graph and Twitter Card tags, JSON-LD schema types, publish/modify dates, author, robots and generator tags, the first H1, a visible word count, internal/external link counts and RSS/Atom feed links. Built for link previews, SEO audits, content inventories, lead enrichment and AI agents that need to know what a page is about without rendering it.

## Price per delivered record

| Event | Price | Per 1,000 | Charged for |
| --- | --- | --- | --- |
| URL metadata record (`url-metadata`) | $0.001 | $1 / 1,000 | Charged once per URL whose page was fetched and analysed (status ok). Missing pages (404/410), dead domains, blocked or invalid URLs and failed fetches are not charged. |

Pay-per-event, USD, billed by Apify; no platform usage charge. Only records with status `ok` are charged. Cap a run with `maxTotalChargeUsd`. Apify free plan: up to 10 per run.

## Run

```bash
curl -X POST "https://api.apify.com/v2/actors/sfoln~url-metadata/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"urls":["https://apify.com","https://blog.apify.com"]}'
```

MCP client configuration:

```json
{
  "mcpServers": {
    "apify": {
      "type": "http",
      "url": "https://mcp.apify.com?tools=sfoln/url-metadata"
    }
  }
}
```

Example prompt: Get the title, description, Open Graph image and canonical URL of https://apify.com and https://blog.apify.com for a link preview.

## Input

Paste URLs (one per line). Each URL produces one dataset record with page metadata and a `status` field.

| Field | Type | Default | Meaning |
| --- | --- | --- | --- |
| `urls` (required) | array | — | URLs: Pages to analyse, one per line. `https://` is added when the scheme is missing. Duplicates are removed. Objects with a `url` key are accepted too. Accounts on the Apify free plan can process up to 10 URLs per run. |
| `maxUrls` | integer | `1000` | Max URLs: Safety cap on how many URLs are processed in this run. |
| `timeoutSecs` | integer | `10` | Fetch timeout (seconds): Maximum time to wait for one page (redirects included). Slow pages are retried once. |
| `concurrency` | integer | `5` | Concurrency: How many pages are fetched in parallel. |
| `includeRaw` | boolean | `false` | Include fetch details: Attach low-level fetch details (detected charset) under `raw`. |

Example input:

```json
{
  "urls": [
    "https://apify.com",
    "https://blog.apify.com"
  ]
}
```

## Output

One record per input item with `status` (`ok` is charged; `not_found`, `error`, `skipped_*` are free) and `charged`. The run stores an `OUTPUT` summary record.

| Field | Type | Meaning |
| --- | --- | --- |
| `input` | string | object | Input: The URL as given in the input. |
| `url` | string | URL: Normalized requested URL. |
| `finalUrl` | string | null | Final URL: URL after redirects. |
| `redirected` | boolean | null | Redirected: True when the request was redirected. |
| `statusCode` | integer | null | HTTP status: Final HTTP status code. |
| `contentType` | string | null | Content type: Content-Type response header. |
| `title` | string | null | Title: <title> text. |
| `description` | string | null | Meta description: <meta name=description> content. |
| `canonical` | string | null | Canonical URL: Absolute <link rel=canonical> URL. |
| `language` | string | null | Language: <html lang>, Content-Language meta/header or og:locale. |
| `favicon` | string | null | Favicon: Absolute icon URL (falls back to /favicon.ico). |
| `ogTitle` | string | null | og:title |
| `ogDescription` | string | null | og:description |
| `ogImage` | string | null | og:image: Absolute image URL. |
| `ogType` | string | null | og:type |
| `ogSiteName` | string | null | og:site_name |
| `ogUrl` | string | null | og:url |
| `ogLocale` | string | null | og:locale |
| `twitterCard` | string | null | twitter:card |
| `twitterTitle` | string | null | twitter:title |
| `twitterDescription` | string | null | twitter:description |
| `twitterImage` | string | null | twitter:image |
| `twitterSite` | string | null | twitter:site |
| `twitterCreator` | string | null | twitter:creator |
| `jsonLdTypes` | array | JSON-LD types: Distinct schema.org @type values found in JSON-LD blocks (incl. @graph). |
| `publishedTime` | string | null | Published: article:published_time or equivalent (as written on the page). |
| `modifiedTime` | string | null | Modified: article:modified_time / og:updated_time or equivalent. |
| `author` | string | null | Author |
| `robots` | string | null | Robots meta |
| `xRobotsTag` | string | null | X-Robots-Tag header |
| `generator` | string | null | Generator: CMS / site generator meta. |
| `keywords` | string | null | Meta keywords |
| `themeColor` | string | null | Theme color |
| `h1` | string | null | First H1 |
| `h1Count` | integer | H1 count |
| `wordCount` | integer | Word count: Visible-text word estimate. |
| `linksInternal` | integer | Internal links: Distinct same-host link targets. |
| `linksExternal` | integer | External links: Distinct other-host link targets. |
| `feeds` | array | Feeds: RSS / Atom / JSON Feed links: { url, type, title }. |
| `pageBytes` | integer | null | Bytes analysed |
| `truncated` | boolean | null | Truncated: True when the page exceeded 1 MB. |
| `responseTimeMs` | integer | null | Response time (ms) |
| `status` | string | Status: ok \| not_found \| error \| skipped_invalid \| skipped_budget \| skipped_free_plan |
| `charged` | boolean | Charged: Whether this record incurred a pay-per-event charge. |
| `source` | string | Source: Data source (selfhosted = fetched by this Actor). |
| `fetchedAt` | string | Fetched at: ISO timestamp. |

Example record:

```json
{
  "input": "https://apify.com",
  "url": "https://apify.com/",
  "finalUrl": "https://apify.com/",
  "redirected": false,
  "statusCode": 200,
  "contentType": "text/html; charset=utf-8",
  "title": "Apify: Full-stack web scraping and data extraction platform",
  "description": "Cloud platform for web scraping, browser automation, AI agents, and data for AI...",
  "canonical": "https://apify.com/",
  "language": "en",
  "favicon": "https://apify.com/favicon.ico",
  "ogTitle": "Apify: Full-stack web scraping and data extraction platform",
  "ogDescription": "Cloud platform for web scraping...",
  "ogImage": "https://apify.com/og-image.png",
  "ogType": "website",
  "ogSiteName": "Apify",
  "twitterCard": "summary_large_image",
  "twitterSite": "@apify",
  "jsonLdTypes": [
    "Organization",
    "WebSite"
  ],
  "publishedTime": null,
  "modifiedTime": null,
  "author": null,
  "robots": "index, follow",
  "generator": null,
  "h1": "Build reliable web scrapers. Fast.",
  "h1Count": 1,
  "wordCount": 1432,
  "linksInternal": 118,
  "linksExternal": 21,
  "feeds": [],
  "pageBytes": 412339,
  "truncated": false,
  "responseTimeMs": 312,
  "status": "ok",
  "charged": true,
  "chargedEvent": "url-metadata",
  "source": "selfhosted",
  "fetchedAt": "2026-10-14T10:00:00.000Z"
}
```

## Related

- [URL to Markdown & Article Extractor](https://www.sfoln.com/actors/url-to-markdown-summary.md) (`sfoln/url-to-markdown-summary`)
- [Website to Markdown Crawler (llms.txt)](https://www.sfoln.com/actors/website-to-markdown.md) (`sfoln/website-to-markdown`)
- [AI Web Scraper – Any URL to Structured JSON](https://www.sfoln.com/actors/ai-web-scraper.md) (`sfoln/ai-web-scraper`)
- [URL Safety Checker – Phishing & Malware](https://www.sfoln.com/actors/url-safety-check.md) (`sfoln/url-safety-check`)
- [Domain WHOIS & DNS Lookup](https://www.sfoln.com/actors/domain-intelligence.md) (`sfoln/domain-intelligence`)
- [Website Change Monitor – Text Diff Alerts](https://www.sfoln.com/actors/website-change-monitor.md) (`sfoln/website-change-monitor`)
- [SEO Audit API – On-Page Checks for Any URL](https://www.sfoln.com/actors/onpage-seo-audit.md) (`sfoln/onpage-seo-audit`)

Publisher: SFOLN LLC, contact@sfoln.com. Catalogue: https://www.sfoln.com/catalog.json. Agent guide: https://www.sfoln.com/agents.md.
