# Open Graph & Link Preview Extractor (Bulk) (`smilemask/open-graph-link-preview`) Actor

Extract link-preview metadata for any list of URLs in bulk: Open Graph and Twitter Card tags (title, description, image, type, site name), plain <title>/<meta description>, canonical URL and favicon. The same data Slack, Discord and social platforms use to build a link preview card.

- **URL**: https://apify.com/smilemask/open-graph-link-preview.md
- **Developed by:** [돈벼락](https://apify.com/smilemask) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.80 / 1,000 results

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

## Open Graph & Link Preview Extractor (Bulk)

Extract link-preview metadata for any list of URLs in bulk: Open Graph and Twitter Card tags (title, description, image, type, site name), plain <title>/<meta description>, canonical URL and favicon. The same data Slack, Discord and social platforms use to build a link preview card.

### What does Open Graph & Link Preview Extractor (Bulk) do?

Bulk link-preview data: Open Graph and Twitter Card tags, title, description, favicon and canonical URL.

### What can you use it for?

- Audit whether your pages show a good preview card before sharing them on social media.
- Bulk-check competitor or partner pages for their preview title, image and description.
- Build your own link-preview / "unfurl" feature for a chat app or CMS.
- Catch pages missing Open Graph tags across a whole site.

### Why use this Actor?

- **Fast and cheap:** lightweight HTTP-based Actor with no browser, so runs finish in seconds and cost very little.
- **No API keys or accounts needed** for the data source (see notes below).
- **Clean, structured JSON** that you can export as CSV, Excel, JSON or XML, or pull through the Apify API and integrations.
- **Scheduling, webhooks and integrations:** run it daily and send results to Google Sheets, Slack, Zapier, Make, n8n or your own API.

### Input

Configure the run in the **Input** tab (all fields have sensible defaults).

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `startUrls` | array of URLs | yes | - | Pages to read link-preview metadata from (one result per URL). |
| `timeoutSecs` | integer | no | `20` | Maximum time to wait for each page. |

#### Example input

```json
{
  "startUrls": [
    {
      "url": "https://apify.com"
    },
    {
      "url": "https://github.com"
    }
  ]
}
```

### Output

Results are stored in the default dataset. Download them from the **Output** tab or via the API.

#### Example result

```json
{
  "url": "https://github.com/",
  "finalUrl": null,
  "statusCode": 200,
  "title": "GitHub · Change is constant. GitHub keeps you ahead. · GitHub",
  "description": "Join the world's most widely adopted, AI-powered developer platform where millions of developers, businesses, and the largest open source community build sof...",
  "canonicalUrl": "https://github.com/",
  "favicon": "https://github.githubassets.com/favicons/favicon.png",
  "themeColor": "#1e2327",
  "ogTitle": "GitHub · Change is constant. GitHub keeps you ahead.",
  "ogDescription": "Join the world's most widely adopted, AI-powered developer platform where millions of developers, businesses, and the largest open source community build sof...",
  "ogImage": "https://images.ctfassets.net/8aevphvgewt8/4pe4eOtUJ0ARpZRE4fNekf/f52b1f9c52f059a33170229883731ed0/GH-Homepage-Universe-img.png",
  "ogType": "object",
  "ogSiteName": "GitHub",
  "ogUrl": "https://github.com/",
  "twitterCard": "summary_large_image",
  "twitterTitle": "GitHub · Change is constant. GitHub keeps you ahead.",
  "twitterDescription": "Join the world's most widely adopted, AI-powered developer platform where millions of developers, businesses, and the largest open source community build sof...",
  "twitterImage": "https://images.ctfassets.net/8aevphvgewt8/4pe4eOtUJ0ARpZRE4fNekf/f52b1f9c52f059a33170229883731ed0/GH-Homepage-Universe-img.png",
  "hasOpenGraph": true,
  "fetchedAt": "2026-09-23T02:26:02.268Z"
}
```

#### Output fields

| Field | Type | Example |
|---|---|---|
| `url` | string | "https://github.com/" |
| `finalUrl` | null | null |
| `statusCode` | number | 200 |
| `title` | string | "GitHub · Change is constant. GitHub keeps you ahead. · G... |
| `description` | string | "Join the world's most widely adopted, AI-powered develop... |
| `canonicalUrl` | string | "https://github.com/" |
| `favicon` | string | "https://github.githubassets.com/favicons/favicon.png" |
| `themeColor` | string | "#1e2327" |
| `ogTitle` | string | "GitHub · Change is constant. GitHub keeps you ahead." |
| `ogDescription` | string | "Join the world's most widely adopted, AI-powered develop... |
| `ogImage` | string | "https://images.ctfassets.net/8aevphvgewt8/4pe4eOtUJ0ARpZ... |
| `ogType` | string | "object" |
| `ogSiteName` | string | "GitHub" |
| `ogUrl` | string | "https://github.com/" |
| `twitterCard` | string | "summary\_large\_image" |
| `twitterTitle` | string | "GitHub · Change is constant. GitHub keeps you ahead." |
| `twitterDescription` | string | "Join the world's most widely adopted, AI-powered develop... |
| `twitterImage` | string | "https://images.ctfassets.net/8aevphvgewt8/4pe4eOtUJ0ARpZ... |
| `hasOpenGraph` | boolean | true |
| `fetchedAt` | string | "2026-09-23T02:26:02.268Z" |

### How much does it cost?

The Actor is billed by Apify according to the pricing shown on the **Pricing** tab of this page. Runs are small and fast, and the Apify Free plan includes monthly platform credits so you can try it at no cost. You can set a maximum cost per run, and the Actor stops cleanly when that limit is reached.

### Notes and limitations

- Reads the same `<meta property="og:...">` and `<meta name="twitter:...">` tags that Slack, Discord, iMessage, Facebook and X read to build a preview card.
- Falls back to the plain `<title>` and `<meta name="description">` when Open Graph tags are missing, so you can always see what a bare-minimum preview would look like.
- Only the server-rendered HTML is read (no browser), so tags injected only by client-side JavaScript will be missed.

### Tips

- Start with a small test run, then scale up the input.
- Use **Schedules** to automate recurring runs and **Webhooks** or **Integrations** to deliver the data where you need it.
- Call the Actor from your code with the Apify API or the official JavaScript and Python clients.

### FAQ

**Why is ogImage empty for a page that clearly shows an image when shared?**

Some platforms (notably X/Twitter) fall back to `twitter:image` when `og:image` is absent - check that field too.

**Does it download the preview image?**

No, only the image URL is returned.

### Feedback

Found a bug or need an extra field? Open an issue from the **Issues** tab of this Actor and it will be looked at quickly.

### More tools from the same author

- [Tech Stack Detector: CMS, Frameworks, Analytics, CDN & Hosting](https://apify.com/SmileMask/tech-stack-detector) - Find out what a website is built with: CMS, e-commerce, frameworks, analytics, CDN, hosting.
- [SEO On-Page Audit: Title, Meta, Headings, Images, Schema (Bulk)](https://apify.com/SmileMask/seo-onpage-audit) - Bulk on-page SEO audit with a 0-100 score and a prioritised issue list for every URL.
- [Wayback Machine Snapshot Checker (Internet Archive)](https://apify.com/SmileMask/wayback-machine-snapshot-checker) - Check if and when a URL was archived by the Wayback Machine, with the closest snapshot link.

# Changelog

This Actor's version history is a separate document: https://apify.com/smilemask/open-graph-link-preview/changelog.md

# Actor input Schema

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

Pages to read link-preview metadata from (one result per URL).

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

Maximum time to wait for each page.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://apify.com"
    },
    {
      "url": "https://github.com"
    }
  ],
  "timeoutSecs": 20
}
```

# Actor output Schema

## `results` (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 = {
    "startUrls": [
        {
            "url": "https://apify.com"
        },
        {
            "url": "https://github.com"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("smilemask/open-graph-link-preview").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("smilemask/open-graph-link-preview").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 '{
  "startUrls": [
    {
      "url": "https://apify.com"
    },
    {
      "url": "https://github.com"
    }
  ]
}' |
apify call smilemask/open-graph-link-preview --silent --output-dataset

```

## MCP server setup

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

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/ZRA46oj3GwKPsNZlw/builds/8vlUGwuRMIxg5bOsu/openapi.json
