# Link Preview API — Bulk OpenGraph & Metadata Unfurl (`technicaldost/link-preview-api`) Actor

Bulk URL to OpenGraph link-preview metadata: title, description, preview image, favicon, site name and canonical URL. Unfurl links for chat apps, CMS, bookmarking and feeds. No browser, no API key.

- **URL**: https://apify.com/technicaldost/link-preview-api.md
- **Developed by:** [Technical Dost Solutions](https://apify.com/technicaldost) (community)
- **Categories:** Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 link previews

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 web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## Link Preview API — Bulk OpenGraph & Metadata Unfurl

**Link Preview API** turns any list of URLs into clean, structured **link-preview metadata** in one call —
the same "unfurl" you see when you paste a link into Slack, Discord, WhatsApp, or a CMS. It reconciles
**OpenGraph**, **Twitter Card**, and standard HTML meta tags into one tidy record per URL: title,
description, preview image, site name, favicon, canonical URL, and oEmbed endpoint. Built for developers
who need fast, cheap, bulk **link previews** without running a headless browser.

Give it `["https://github.com", "https://stripe.com"]` and get back a rich preview object for each — ready
to render a link card, populate a bookmark, or enrich a feed.

### Features

- **One record per URL** reconciling OpenGraph + Twitter Card + `<meta>` + `<title>`.
- **Preview image, favicon, site name, canonical URL, oEmbed** resolved to absolute URLs.
- **Bulk + concurrent** — unfurl up to 100 URLs per run.
- **No proxy, no browser** — plain HTTP fetch, so it's fast and low-cost (great margins, cheap for you).
- **Graceful failures** — unreachable or 404 URLs return `ok: false` with an `error`, never crash the run.
- **Developer-friendly JSON** ready for link cards, chat unfurls, bookmarking apps, and content feeds.

### Input

| Field | Type | Description |
|---|---|---|
| `urls` | array (required) | URLs to unfurl, e.g. `["https://github.com","stripe.com"]` (scheme optional). |
| `maxItems` | integer | Max URLs processed per run. Default `100`. |

```json
{
  "urls": ["https://github.com", "https://www.apify.com"],
  "maxItems": 100
}
```

### Output

One structured preview per URL:

```json
{
  "url": "https://github.com",
  "finalUrl": "https://github.com/",
  "ok": true,
  "status": 200,
  "title": "GitHub · Build and ship software",
  "description": "Join the world's most widely adopted AI-powered developer platform.",
  "image": "https://github.githubassets.com/assets/og-image.png",
  "siteName": "GitHub",
  "type": "object",
  "canonical": "https://github.com/",
  "favicon": "https://github.com/favicon.ico",
  "twitterCard": "summary_large_image",
  "oembed": null,
  "fetchedAt": "2026-06-23T00:00:00.000Z"
}
```

### How to generate link previews from a list of URLs

1. Put your URLs in `urls` (scheme is optional — `stripe.com` works).
2. Run the Actor and read one preview record per URL from the dataset.
3. Export as JSON, CSV, or Excel, or call the Actor's API from your backend to unfurl links on demand.

### Common use cases

- **Chat & comment link unfurls** — render rich link cards like Slack/Discord.
- **Bookmarking & read-later apps** — store title, description, and preview image per saved link.
- **CMS & social scheduling** — preview how a URL will look when shared before publishing.
- **Feed & newsletter enrichment** — attach images and descriptions to a list of links.

### FAQ

**Does it need an API key?** No. You pass URLs; the Actor fetches and parses public page metadata.

**Does it run a headless browser?** No — it uses plain HTTP for speed and low cost. JavaScript-rendered
meta tags on heavily client-side sites may be limited; most sites expose OpenGraph in server HTML.

**What if a URL is down or 404s?** You get a record with `ok: false` and an `error`; the run continues.

**Does it return personal data?** No — only public page metadata (title, description, image, favicon).

**What formats can I export?** JSON, CSV, and Excel via the dataset, or call the Actor API directly.

### Pricing

Pay-per-event: a tiny per-run start fee plus a small per-URL charge. You pay only for URLs you unfurl — no
monthly seats. See the Pricing tab for current rates.

### Further reading

- Building link previews (unfurling) for chat and CMS apps.
- OpenGraph vs Twitter Card meta tags.

# Actor input Schema

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

List of page URLs to unfurl into link-preview metadata.

## `maxItems` (type: `integer`):

Maximum number of URLs to process per run.

## Actor input object example

```json
{
  "urls": [
    "https://www.apify.com",
    "https://github.com"
  ],
  "maxItems": 100
}
```

# 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.apify.com",
        "https://github.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("technicaldost/link-preview-api").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.apify.com",
        "https://github.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("technicaldost/link-preview-api").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 '{
  "urls": [
    "https://www.apify.com",
    "https://github.com"
  ]
}' |
apify call technicaldost/link-preview-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=technicaldost/link-preview-api",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

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