# Link Preview & Open Graph Extractor (`nordic-data/link-preview-extractor`) Actor

Turn any URL into a link preview: title, description, image, site name, favicon, Open Graph and Twitter Card tags, canonical URL, author and dates. Bulk, no browser, no API key. $0.0009 per URL.

- **URL**: https://apify.com/nordic-data/link-preview-extractor.md
- **Developed by:** [Niklas Bergström](https://apify.com/nordic-data) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.90 / 1,000 url previeweds

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 Extractor

Give it a list of URLs and get back **link-preview cards** like the ones Slack, X, LinkedIn or iMessage show: title, description, preview image (with size and alt text), site name, favicon, canonical URL, author and publish dates — from Open Graph, Twitter Card, standard meta tags and JSON-LD. Works in bulk over plain HTTP: no browser, no API key, no third-party unfurl service.

**$0.0009 per URL previewed.** Unreachable or blocked URLs, invalid inputs and duplicates are free.

### What you get

| Field | Meaning |
|---|---|
| `title`, `description`, `image`, `imageWidth`, `imageHeight`, `imageAlt` | The preview card (Open Graph first, then Twitter Card, then `<title>` / meta description) |
| `siteName`, `type`, `locale`, `favicon` | Site identity |
| `canonicalUrl`, `ogUrl`, `finalUrl`, `statusCode` | Where the URL ends up |
| `author`, `publishedTime`, `modifiedTime`, `keywords` | Article metadata |
| `video`, `audio`, `oembedUrl` | Rich media and the oEmbed endpoint, when declared |
| `twitterCard`, `twitterSite`, `themeColor`, `robots`, `jsonLdTypes` | Extra tags |
| `hasOpenGraph`, `hasTwitterCard`, `missingTags` | Audit: which of og:title, og:description, og:image, twitter:card and canonical are missing |
| `metaTags`, `jsonLd` | Optional: every meta tag and the parsed JSON-LD |

### Use cases

- **Unfurl links** in your chat app, CMS, newsletter tool or bookmark manager.
- **Social sharing audits:** find pages with no `og:image` or a missing Twitter Card before a campaign.
- **Content enrichment:** add titles, images and publish dates to lists of article or product URLs for RAG pipelines and dashboards.
- **SEO checks:** compare canonical URLs, robots meta and titles at scale.

### Input example

```json
{
  "urls": ["https://apify.com", "https://github.com/apify/crawlee", "https://www.svt.se/"],
  "userAgent": "browser",
  "includeAllMetaTags": false,
  "includeJsonLd": false,
  "maxConcurrency": 15
}
```

### Output example

```json
{
  "recordType": "preview",
  "url": "https://apify.com/",
  "finalUrl": "https://apify.com/",
  "statusCode": 200,
  "title": "Apify: Marketplace of ready-to-run tools for AI",
  "description": "Thousands of tools to automate your business…",
  "image": "https://apify.com/og-image?title=Thousands+of+tools%0Afor+your+AI",
  "imageWidth": 1200,
  "imageHeight": 630,
  "siteName": "Apify",
  "type": "website",
  "favicon": "https://apify.com/favicon.ico",
  "twitterCard": "summary_large_image",
  "hasOpenGraph": true,
  "missingTags": [],
  "checkedAt": "2026-11-12T06:40:00Z"
}
```

(Example values; live pages change.)

### How it works

Each URL is fetched once (redirects followed, first 1.5 MB read). If a site rejects a browser-like request with 403/429, the Actor retries once with a link-preview bot user agent — the same way chat apps unfurl links. Direct image or file URLs return their media type. Only public pages are requested; no login, forms or captcha solving.

### Related Actors

- [Website Favicon and Logo Extractor](https://apify.com/nordic-data/website-favicon-logo-extractor)
- [Website SEO Audit](https://apify.com/nordic-data/website-seo-audit)
- [Bulk URL Status & Redirect Chain Checker](https://apify.com/nordic-data/bulk-url-status-redirect-checker)

# Changelog

This Actor's version history is a separate document: https://apify.com/nordic-data/link-preview-extractor/changelog.md

# Actor input Schema

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

Page URLs (articles, products, homepages) or domains to preview. Duplicates are skipped and never charged.

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

Fetch like a desktop browser, or like a link-preview bot (some sites serve richer Open Graph tags to preview bots).

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

Add a `metaTags` object with every <meta> name/property and its content.

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

Add up to 10 parsed JSON-LD (schema.org) objects found on the page.

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

How many URLs are fetched in parallel (1-40).

## Actor input object example

```json
{
  "urls": [
    "https://apify.com",
    "https://github.com/apify/crawlee",
    "https://en.wikipedia.org/wiki/Web_scraping"
  ],
  "userAgent": "browser",
  "includeAllMetaTags": false,
  "includeJsonLd": false,
  "maxConcurrency": 15
}
```

# Actor output Schema

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

Main results (view: Overview).

## `runStats` (type: `string`):

Counts of delivered, hidden, invalid, duplicate and failed inputs.

# 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://apify.com",
        "https://github.com/apify/crawlee",
        "https://en.wikipedia.org/wiki/Web_scraping"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("nordic-data/link-preview-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://apify.com",
        "https://github.com/apify/crawlee",
        "https://en.wikipedia.org/wiki/Web_scraping",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("nordic-data/link-preview-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://apify.com",
    "https://github.com/apify/crawlee",
    "https://en.wikipedia.org/wiki/Web_scraping"
  ]
}' |
apify call nordic-data/link-preview-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nordic-data/link-preview-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/Vfo2WxLmdPnWwrebA/builds/aHW97GMyGAr20Wbj9/openapi.json
