# URL Metadata, Open Graph & JSON-LD Extractor (Link Preview API) (`parth-tools/url-metadata-extractor`) Actor

Extract title, description, Open Graph, Twitter Card, favicon, canonical, language, feeds, hreflang and JSON-LD structured data from any list of URLs. Ready-made link previews. $0.70 per 1,000 URLs.

- **URL**: https://apify.com/parth-tools/url-metadata-extractor.md
- **Developed by:** [Parth](https://apify.com/parth-tools) (community)
- **Categories:** Developer tools, SEO tools
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.70 / 1,000 url metadata extracteds

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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## URL Metadata, Open Graph & JSON-LD Extractor (Link Preview API)

**Get everything a page says about itself — in one clean JSON row per URL.** Title, meta description, **Open Graph** (og:title, og:image, og:type…), **Twitter Card**, favicon & apple-touch icon, canonical URL, language, robots, author and publish dates, RSS/Atom feeds, hreflang alternates, H1/H2 headings and **JSON-LD structured data** (Product, Article, Organization, Recipe, Event, FAQ…) with a list of schema.org types.

Plus ready-to-use **`previewTitle` / `previewDescription` / `previewImage`** fields for link previews (OG → Twitter → HTML fallbacks).

**$0.70 per 1,000 URLs.** Failed URLs are free. No browser, no start fee.

### Use cases

- 🔗 **Link previews / unfurling** for chat apps, CMSs, bookmarking and newsletter tools
- 🧩 **Structured data harvesting** — product prices & availability, article dates, organization info from JSON-LD
- 🔎 **SEO & social audits** — find pages with missing OG images, Twitter cards, canonicals or descriptions
- 📚 **Enrich URL lists** — add titles, descriptions and images to spreadsheets or databases

### Input example

```json
{
    "urls": ["https://www.theverge.com", "https://blog.apify.com/how-to-use-mcp/"],
    "includeJsonLd": true,
    "includeHeadings": true,
    "includeAllMetaTags": false
}
```

### Output example

```json
{
    "url": "https://blog.apify.com/how-to-use-mcp/",
    "statusCode": 200,
    "title": "How to use MCP with Apify Actors",
    "description": "…",
    "canonical": "https://blog.apify.com/how-to-use-mcp/",
    "language": "en",
    "favicon": "https://…/apify-favicon.svg",
    "openGraph": { "title": "How to use MCP with Apify Actors", "image": "https://…/how-to-use-mcp-with-apify-actors.webp", "type": "article", "siteName": "Apify Blog" },
    "twitter": { "card": "summary_large_image", "title": "How to use MCP with Apify Actors" },
    "previewTitle": "How to use MCP with Apify Actors",
    "previewImage": "https://…/how-to-use-mcp-with-apify-actors.webp",
    "publishedAt": "2026-10-22T08:00:00.000Z",
    "feeds": [{ "type": "application/rss+xml", "title": "Apify Blog", "href": "https://blog.apify.com/rss/" }],
    "schemaTypes": ["Article"],
    "jsonLd": [{ "@context": "https://schema.org", "@type": "Article", "headline": "How to use MCP with Apify Actors" }],
    "h1": ["How to use MCP with Apify Actors"]
}
```

### Pricing

| Event | Price | When |
|---|---|---|
| URL metadata extracted | **$0.0007** ($0.70 / 1,000 URLs) | Each URL saved |
| Actor start | $0.00005 | Once per run |

### FAQ

**Does it execute JavaScript?** No. It reads the server-rendered HTML — which is exactly what social networks and chat apps read when they build link previews, so results match what users see when sharing.

**Can I call it as an API?** Yes — run it synchronously via the Apify API (`run-sync-get-dataset-items`) with a list of URLs and get JSON back.

**What if a site blocks bots?** The default user agent is a desktop browser. Heavily protected sites may still return an error row (free).

# Actor input Schema

## `urls` (type: `array`):

Pages to extract metadata from, one per line.

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

Add the parsed JSON-LD structured data blocks (Product, Article, Organization, Recipe, Event…). Schema types are always listed.

## `includeHeadings` (type: `boolean`):

Add the page's H1 and H2 texts.

## `includeAllMetaTags` (type: `boolean`):

Add a raw map of every \<meta> name/property → content.

## `userAgent` (type: `string`):

Request identity.

## `maxConcurrency` (type: `integer`):

Parallel requests.

## Actor input object example

```json
{
  "urls": [
    "https://www.theverge.com",
    "https://blog.apify.com/how-to-use-mcp/",
    "https://github.com/apify/crawlee"
  ],
  "includeJsonLd": true,
  "includeHeadings": true,
  "includeAllMetaTags": false,
  "userAgent": "browser",
  "maxConcurrency": 10
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `all` (type: `string`):

No description

# 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 = {
    "urls": [
        "https://www.theverge.com",
        "https://blog.apify.com/how-to-use-mcp/",
        "https://github.com/apify/crawlee"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("parth-tools/url-metadata-extractor").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 = { "urls": [
        "https://www.theverge.com",
        "https://blog.apify.com/how-to-use-mcp/",
        "https://github.com/apify/crawlee",
    ] }

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

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

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

```

## CLI example

```bash
echo '{
  "urls": [
    "https://www.theverge.com",
    "https://blog.apify.com/how-to-use-mcp/",
    "https://github.com/apify/crawlee"
  ]
}' |
apify call parth-tools/url-metadata-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parth-tools/url-metadata-extractor"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/vLCnft6rsHwXk7DIn/builds/o6kC9Co7jbDsRshyt/openapi.json
