# Link Preview & Open Graph Meta Tags Extractor (`klyve1/link-preview-metadata`) Actor

Get the title, description, Open Graph, Twitter Card, canonical, favicon, language and JSON-LD of any list of URLs. Build link previews, audit social sharing tags and enrich URL lists in bulk.

- **URL**: https://apify.com/klyve1/link-preview-metadata.md
- **Developed by:** [Nico Klyve](https://apify.com/klyve1) (community)
- **Categories:** SEO tools, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 page reads

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

## Link Preview & Open Graph Meta Tags Extractor

Turn any list of URLs into rich link previews and complete metadata: title, meta description, Open Graph tags, Twitter Card, preview image, site name, favicon, canonical URL, language, author, publication dates, RSS feeds, hreflang alternates and schema.org JSON-LD. Each page also gets a list of social sharing and SEO issues (missing og:image, title too long...).

### What people use it for

- **Link previews in apps, chats and newsletters**: get the title, description, image and favicon to render a card like Slack, LinkedIn or Discord do.
- **Social sharing audits**: check that every page of your site has og:title, og:description, og:image and twitter:card before a campaign.
- **SEO audits**: titles, meta descriptions, canonical links, robots meta and hreflang for a list of pages.
- **Content enrichment**: add titles, images, authors and dates to a list of article URLs for a database, a CRM or an LLM pipeline.
- **Structured data checks**: see which schema.org types (Product, Article, Organization...) each page declares.

### Example output

```json
{
  "url": "https://github.com/apify/crawlee",
  "finalUrl": "https://github.com/apify/crawlee",
  "statusCode": 200,
  "loadTimeMs": 519,
  "title": "GitHub - apify/crawlee: Crawlee, a web scraping and browser automation library for Node.js...",
  "description": "Crawlee, a web scraping and browser automation library for Node.js to build reliable crawlers...",
  "preview": {
    "title": "GitHub - apify/crawlee: Crawlee, a web scraping and browser automation library...",
    "description": "Crawlee, a web scraping and browser automation library for Node.js...",
    "image": "https://repository-images.githubusercontent.com/66670819/8242c30a-d9dc-4580-ae44-f7ea1bfd9b41",
    "siteName": "GitHub",
    "favicon": "https://github.githubassets.com/favicons/favicon.png",
    "type": "object"
  },
  "canonicalUrl": null,
  "language": "en",
  "themeColor": "#1e2327",
  "h1": "A web scraping and browser automation library",
  "openGraph": { "image": "https://repository-images.githubusercontent.com/66670819/...", "site_name": "GitHub", "type": "object", "title": "GitHub - apify/crawlee: ...", "url": "https://github.com/apify/crawlee", "description": "Crawlee, a web scraping and browser automation library..." },
  "twitterCard": { "card": "summary_large_image", "site": "@github", "image": "https://repository-images.githubusercontent.com/66670819/...", "title": "GitHub - apify/crawlee: ..." },
  "feeds": [],
  "jsonLdTypes": [],
  "issues": ["Title over 60 characters", "Meta description over 160 characters", "Missing canonical link"],
  "error": null,
  "fetchedAt": "2026-11-18T17:58:47.900Z"
}
```

### Input

| Field | What it does |
|---|---|
| URLs | Pages to read, one per line. |
| Include full JSON-LD | Add the full schema.org data (the list of types is always included). |
| Respect robots.txt | Skip pages disallowed for all bots (default on, skipped pages are free). |
| Parallel requests | Default 5. |
| Timeout per page | Default 20 seconds. |

### Pricing

Pay per result: **$0.001 per page read** ($1 per 1,000 pages). Pages that fail (timeout, HTTP error, not HTML, blocked by robots.txt) are reported with an `error` and are free.

### Good to know

- One light HTTP request per page, no browser: fast and cheap. Metadata added only by JavaScript after load is not seen (most sites put their meta tags in the HTML for social networks anyway).
- The Actor uses a clear user agent, respects robots.txt by default and does not bypass bot protection or logins.
- Relative image, favicon and canonical URLs are converted to absolute URLs.

# Actor input Schema

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

Web pages to read, one per line. Missing https:// is added automatically.

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

Add the full structured data (schema.org JSON-LD) of each page. The list of JSON-LD types is always included.

## `respectRobotsTxt` (type: `boolean`):

Skip pages that the site's robots.txt disallows for all bots. Skipped pages are free.

## `concurrency` (type: `integer`):

How many pages are fetched at the same time.

## `timeoutSecs` (type: `integer`):

A page that takes longer is reported as a timeout (free).

## Actor input object example

```json
{
  "urls": [
    "https://github.com/apify/crawlee",
    "https://www.bbc.com/news",
    "https://developer.mozilla.org/en-US/docs/Web/HTML"
  ],
  "includeJsonLd": true,
  "respectRobotsTxt": true,
  "concurrency": 5,
  "timeoutSecs": 20
}
```

# Actor output Schema

## `results` (type: `string`):

All rows produced by the run.

# 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://github.com/apify/crawlee",
        "https://www.bbc.com/news",
        "https://developer.mozilla.org/en-US/docs/Web/HTML"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("klyve1/link-preview-metadata").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://github.com/apify/crawlee",
        "https://www.bbc.com/news",
        "https://developer.mozilla.org/en-US/docs/Web/HTML",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("klyve1/link-preview-metadata").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://github.com/apify/crawlee",
    "https://www.bbc.com/news",
    "https://developer.mozilla.org/en-US/docs/Web/HTML"
  ]
}' |
apify call klyve1/link-preview-metadata --silent --output-dataset

```

## MCP server setup

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

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/OcBCf0BhAKSdl2PUV/builds/USaN8ld0QauUSzF30/openapi.json
