# Social Meta & Open Graph Preview Extractor (`sootesting/social-meta-preview-extractor`) Actor

Extract and validate Open Graph and Twitter Card social-sharing meta from any URL. Flags missing og:title/og:image/og:description/og:type and twitter:card so your links look great when shared on LinkedIn, Facebook, X and Slack. Pay-per-event: $0.01 per batch of up to 200 URLs.

- **URL**: https://apify.com/sootesting/social-meta-preview-extractor.md
- **Developed by:** [soot](https://apify.com/sootesting) (community)
- **Categories:** SEO tools, Developer tools, Marketing
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.01 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## Social Meta & Open Graph Preview Extractor

Extract and validate Open Graph and Twitter Card social-sharing meta from any URL. Flags missing og:title/og:image/og:description/og:type and twitter:card so your links look great when shared on LinkedIn, Facebook, X and Slack.

### What it does

This Actor automates a task that would otherwise take hours of manual work. It is built for **batch processing** — run it once on a list of inputs and get a structured, downloadable report.

### Features

- <b>Batch processing</b> — handle one or many inputs in a single run
- <b>Structured output</b> — clean, ready for CSV/JSON export
- <b>Pay-per-event pricing</b> — you only pay for what you use
- <b>API & CLI ready</b> — integrate it into any workflow

### Input configuration

<table>
<thead><tr><th>Field</th><th>Type</th><th>Required</th><th>Description</th></tr></thead>
<tbody>
<tr><td><code>urls</code></td><td>array</td><td>Optional</td><td>List of page URLs to analyze for social-sharing meta tags.</td></tr><tr><td><code>url</code></td><td>string</td><td>Optional</td><td>Single page URL (backward compatibility).</td></tr>
</tbody>
</table>

### Usage example

#### Run via Apify API (cURL)

```bash
curl -X POST "https://api.apify.com/v2/acts/sootesting~social-meta-preview-extractor/runs?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}
'
```

#### Run via Apify CLI

```bash
apify run --actor-name sootesting~social-meta-preview-extractor --input '{}
'
```

### Output schema

The Actor produces the following structured data:

<table>
<thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead>
<tbody>
<tr><td><code>url</code></td><td>string</td><td>Analyzed URL</td></tr><tr><td><code>social_preview_healthy</code></td><td>boolean</td><td>True if all required OG + Twitter tags are present</td></tr><tr><td><code>missing_og_required</code></td><td>array</td><td>Required OG tags that are missing</td></tr><tr><td><code>missing_twitter_required</code></td><td>array</td><td>Required Twitter Card tags that are missing</td></tr><tr><td><code>open_graph</code></td><td>object</td><td>All detected Open Graph tags</td></tr><tr><td><code>twitter_card</code></td><td>object</td><td>All detected Twitter Card tags</td></tr>
</tbody>
</table>

### Pricing

Pay-per-event: $0.01 per batch of up to 200 URLs, plus a small per-start fee. You are only charged for successful events.

### Related

Part of the <b>Sootesting SEO & Data Toolkit</b> — a suite of focused actors for technical SEO, security auditing, and data extraction.

<sub>Generated with structured, semantic formatting for maximum readability in Apify Store.</sub>

# Actor input Schema

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

List of page URLs to analyze for social-sharing meta tags (Open Graph, Twitter Card).

## `url` (type: `string`):

Single page URL (backward compatibility).

## Actor input object example

```json
{}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("sootesting/social-meta-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("sootesting/social-meta-preview-extractor").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 '{}' |
apify call sootesting/social-meta-preview-extractor --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/RAHSqtXzSWB0EtPzg/builds/phG7C7AWreAipqXAh/openapi.json
