# URL Metadata Scraper - OG, Twitter, JSON-LD (`wiry_kingdom/url-metadata-scraper`) Actor

Extract complete metadata from any URL: Open Graph tags, Twitter Card metadata, JSON-LD structured data, favicons, hreflang alternates, canonical URLs and HTML meta. Perfect for link previews, SEO audits, social media tools, bookmark managers and content aggregators.

- **URL**: https://apify.com/wiry\_kingdom/url-metadata-scraper.md
- **Developed by:** [Mohieldin Mohamed](https://apify.com/wiry_kingdom) (community)
- **Categories:** SEO tools, Developer tools
- **Stats:** 0 total users, 0 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## URL Metadata Scraper - OG, Twitter Card, JSON-LD

**Extract every piece of metadata from any URL in one API call.** URL Metadata Scraper pulls Open Graph tags, Twitter Card metadata, JSON-LD structured data, favicons, hreflang alternates, canonical URLs, and basic HTML meta - everything you need for **link previews, SEO audits, social media tools, content aggregators, and bookmark managers**.

Pass in a list of URLs, get back a normalized JSON payload with title, description, image, site name, author, language, structured data types, and much more. No custom selectors. No broken previews.

### What does URL Metadata Scraper do?

This actor fetches each URL and extracts a complete metadata profile:

- **Normalized top-level fields** - title, description, image, site name, type, author, language (picks the best value across OG, Twitter, and HTML meta)
- **Open Graph** - All `og:*` properties (title, description, image, type, site_name, locale, video, audio, article, book, profile, ...)
- **Twitter Card** - All `twitter:*` properties (card, title, description, image, creator, site, player, ...)
- **JSON-LD structured data** - Every `<script type="application/ld+json">` block parsed and returned as-is, plus a normalized list of schema types for quick filtering
- **Favicons** - All declared icons including `apple-touch-icon`, `mask-icon`, and `manifest`
- **hreflang alternates** - Language variants of the page
- **Canonical URL** - The authoritative URL after redirects and `<link rel="canonical">`
- **Basic meta** - keywords, author, viewport, theme-color, description
- **HTTP info** - final URL, status code, content-type, content-language

### Why use URL Metadata Scraper?

- **Link preview cards** - Build Discord, Slack, or iMessage-style link previews without maintaining your own parser
- **Social media tools** - Preview how a URL will appear when shared on Facebook, Twitter, LinkedIn before hitting publish
- **SEO audits** - Bulk-check Open Graph and structured data compliance across thousands of URLs in minutes
- **Content aggregators** - Power "read later" apps, RSS readers, or news aggregators with rich metadata
- **Bookmark managers** - Show users clean titles and thumbnails when they save URLs
- **Knowledge bases** - Enrich internal documents, Slack links, or Notion pages with source metadata
- **AI agents** - Give LLM-based agents structured context about any URL they encounter

Built on Apify: scheduling, API access, proxy rotation, webhooks, and monitoring out of the box.

### How to use URL Metadata Scraper

1. Click **Try for free** and sign in to Apify
2. Paste your URLs into the **URLs** field
3. (Optional) Turn off JSON-LD or favicons to slim down the output
4. Click **Start** - results appear in seconds
5. Download as JSON, CSV, or Excel, or query via the Apify API

### Input

```json
{
    "startUrls": [
        { "url": "https://apify.com" },
        { "url": "https://github.com" }
    ],
    "includeJsonLd": true,
    "includeFavicons": true,
    "maxRequestsPerCrawl": 100
}
````

| Field | Type | Description |
|-------|------|-------------|
| `startUrls` | array | List of URLs to scrape. Each entry is `{ "url": "..." }`. Required. |
| `includeJsonLd` | boolean | Include JSON-LD structured data in the output. Default: true. |
| `includeFavicons` | boolean | Include favicons and apple-touch-icons. Default: true. |
| `maxRequestsPerCrawl` | integer | Safety cap on requests. Default: 100, max: 5000. |

### Output

```json
{
    "url": "https://apify.com/",
    "statusCode": 200,
    "title": "Apify: Full-stack web scraping and data extraction platform",
    "description": "Build, deploy, and scale web scraping and automation Actors...",
    "image": "https://apify.com/og-image.png",
    "siteName": "Apify",
    "type": "website",
    "author": null,
    "language": "en",
    "canonicalUrl": "https://apify.com/",
    "keywords": ["web scraping", "data extraction", "automation"],
    "themeColor": "#ffffff",
    "viewport": "width=device-width, initial-scale=1",
    "openGraph": {
        "title": "Apify...",
        "description": "Build, deploy, and scale...",
        "image": "https://apify.com/og-image.png",
        "type": "website",
        "site_name": "Apify",
        "locale": "en_US"
    },
    "twitterCard": {
        "card": "summary_large_image",
        "site": "@apify",
        "title": "Apify...",
        "description": "...",
        "image": "https://apify.com/og-image.png"
    },
    "favicons": [
        { "rel": "icon", "href": "https://apify.com/favicon.ico", "sizes": null, "type": "image/x-icon" },
        { "rel": "apple-touch-icon", "href": "https://apify.com/apple-touch-icon.png", "sizes": "180x180", "type": null }
    ],
    "hreflangs": [],
    "jsonLd": [ ... ],
    "structuredDataTypes": ["Organization", "WebSite"],
    "contentType": "text/html; charset=utf-8",
    "contentLanguage": "en",
    "scrapedAt": "2026-04-13T19:42:17.301Z"
}
```

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

#### Output fields

| Field | Type | Description |
|-------|------|-------------|
| `title` | string | Best title found (OG > Twitter > `<title>`) |
| `description` | string | Best description found |
| `image` | string | Absolute URL of the primary image |
| `siteName` | string | Site name from OG |
| `type` | string | OG type (website, article, product, ...) |
| `canonicalUrl` | string | Canonical URL after redirect resolution |
| `openGraph` | object | All Open Graph properties |
| `twitterCard` | object | All Twitter Card properties |
| `favicons` | array | All favicon / apple-touch-icon links |
| `hreflangs` | array | Language alternates |
| `jsonLd` | array | Every parsed JSON-LD block |
| `structuredDataTypes` | array | Normalized list of schema.org types on the page |

### How much does it cost to extract URL metadata?

The actor uses a lightweight Cheerio crawler with no headless browser and 10 concurrent requests, so it is very cheap. Extracting 1,000 URLs typically costs pennies on the Apify free tier.

### Tips and advanced options

- **Batch thousands of URLs** - Paste a CSV or file of URLs; the actor processes them in parallel
- **Disable JSON-LD for lean output** - If you only need OG tags for link previews, turn off `includeJsonLd` to shrink your dataset size by 50-80%
- **Schedule recurring scans** - Use Apify Schedules to detect when a page's metadata changes (e.g., for monitoring competitor landing pages)
- **Integrate with your link preview service** - Call the actor's API from your app every time a user pastes a URL and cache the result

### FAQ

**Which sites are supported?** Any public URL that returns HTML. The extractor is site-agnostic and handles millions of pages per month reliably.

**Is this legal?** The actor reads only public HTML and the metadata the site voluntarily declares - exactly what your browser does when it renders a page. No terms of service are bypassed.

**What if the site blocks scrapers?** Add an Apify proxy configuration in the run settings and the actor will route through datacenter or residential IPs.

**Can it handle JavaScript-rendered pages?** Most metadata is in static HTML and works with Cheerio. For pages that render OG tags via JS, use a PlaywrightCrawler variant.

### Support

Hit a site where metadata extraction fails or returns the wrong title? Open an issue with the URL and we will investigate.

# Actor input Schema

## `startUrls` (type: `array`):

List of URLs to extract metadata from. Each entry is { "url": "..." }.

## `maxRequestsPerCrawl` (type: `integer`):

Upper bound on the number of URLs processed.

## `includeJsonLd` (type: `boolean`):

Include all JSON-LD structured data blocks in the output. Default: true.

## `includeFavicons` (type: `boolean`):

Include favicons and apple-touch-icons in the output. Default: true.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://apify.com"
    },
    {
      "url": "https://github.com"
    }
  ],
  "maxRequestsPerCrawl": 100,
  "includeJsonLd": true,
  "includeFavicons": true
}
```

# Actor output Schema

## `dataset` (type: `string`):

One row per scraped URL with Open Graph, Twitter Card, JSON-LD and favicon data

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "startUrls": [
        {
            "url": "https://apify.com"
        },
        {
            "url": "https://github.com"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("wiry_kingdom/url-metadata-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "startUrls": [
        { "url": "https://apify.com" },
        { "url": "https://github.com" },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("wiry_kingdom/url-metadata-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startUrls": [
    {
      "url": "https://apify.com"
    },
    {
      "url": "https://github.com"
    }
  ]
}' |
apify call wiry_kingdom/url-metadata-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=wiry_kingdom/url-metadata-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "URL Metadata Scraper - OG, Twitter, JSON-LD",
        "description": "Extract complete metadata from any URL: Open Graph tags, Twitter Card metadata, JSON-LD structured data, favicons, hreflang alternates, canonical URLs and HTML meta. Perfect for link previews, SEO audits, social media tools, bookmark managers and content aggregators.",
        "version": "0.1",
        "x-build-id": "2AXH95HqsETPzs7xc"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/wiry_kingdom~url-metadata-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-wiry_kingdom-url-metadata-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/wiry_kingdom~url-metadata-scraper/runs": {
            "post": {
                "operationId": "runs-sync-wiry_kingdom-url-metadata-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/wiry_kingdom~url-metadata-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-wiry_kingdom-url-metadata-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "startUrls"
                ],
                "properties": {
                    "startUrls": {
                        "title": "URLs",
                        "type": "array",
                        "description": "List of URLs to extract metadata from. Each entry is { \"url\": \"...\" }.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "maxRequestsPerCrawl": {
                        "title": "Max requests per crawl",
                        "minimum": 1,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Upper bound on the number of URLs processed.",
                        "default": 100
                    },
                    "includeJsonLd": {
                        "title": "Include JSON-LD",
                        "type": "boolean",
                        "description": "Include all JSON-LD structured data blocks in the output. Default: true.",
                        "default": true
                    },
                    "includeFavicons": {
                        "title": "Include favicons",
                        "type": "boolean",
                        "description": "Include favicons and apple-touch-icons in the output. Default: true.",
                        "default": true
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
