# Open Graph and Twitter Card Metadata Checker (`variable_mitts/social-preview-metadata-checker`) Actor

Check Open Graph and Twitter Card tags on public pages. Export missing fields, duplicate metadata and image URL observations with source evidence.

- **URL**: https://apify.com/variable_mitts/social-preview-metadata-checker.md
- **Developed by:** [Dhan sites](https://apify.com/variable_mitts) (community)
- **Categories:** SEO tools, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 90.9% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.28 / 1,000 html page extracteds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 and Twitter Card Metadata Checker

Inspect Open Graph, Twitter Card and page metadata from supplied public HTML pages. Review missing or duplicate tags, grouped image properties and suggested title, description and image fallbacks.

### Start with this workflow

Find social-sharing metadata gaps before sharing a page.

**After the run:** Review missing and duplicate metadata in REPORT. This exports static tags; it does not generate or certify rendered social-network previews.

**What is billed:** Successfully checked HTTP 200 HTML pages, including pages without metadata; failed fetches and non-HTML responses are free. Check the Pricing tab for the applicable subscription-tier rate. Result rows and billable input units can differ. A successful execution does not guarantee full coverage.

The example uses a small supplied fixture or the scraping-practice demonstration target. Replace it with input you are authorized to process; inspect coverage, diagnostics and limits before downstream use.

### Quick start

1. Open the Input tab or the public Example task and restore the example input.
2. Run the small example below. For website checks, replace URLs only with sites you own or have permission to inspect. For record tools, use non-sensitive sample records first.
3. Open the dataset for individual results, then read `REPORT` for coverage and diagnostics. A successful execution alone does not establish that all requested work was completed.
4. Download the relevant files from the Output tab, or retrieve the dataset through Apify's API for your next workflow step.

```json
{
  "startUrls": [
    "https://books.toscrape.com/"
  ],
  "maxPages": 3,
  "permissionConfirmed": true
}
```

### Output example

This excerpt comes from the Books to Scrape example run. The dataset contains the complete row.

```json
{
  "url": "https://books.toscrape.com/",
  "final_url": "https://books.toscrape.com/",
  "status": 200,
  "checked": true,
  "error": "",
  "title": "All products | Books to Scrape - Sandbox",
  "title_length": 40,
  "description": "",
  "description_length": 0,
  "og_title": "",
  "og_description": "",
  "og_image": "",
  "og_url": "",
  "twitter_card": "",
  "twitter_title": "",
  "twitter_image": "",
  "og_images": [],
  "image_inventory_truncated": false,
  "preview_candidates": {
    "title": {
      "value": "All products | Books to Scrape - Sandbox",
      "source": "title"
    },
    "description": {
      "value": "",
      "source": null
    },
    "image": {
      "value": "",
      "source": null
    }
  },
  "preview_candidate_notice": "Candidate fallback choices for review, not a rendered or guaranteed platform preview. No images are fetched or dimensions verified.",
  "h1s": [
    "All products"
  ],
  "issues": [
    "MISSING_DESCRIPTION",
    "MISSING_OG_TITLE",
    "MISSING_OG_DESCRIPTION",
    "MISSING_OG_IMAGE",
    "MISSING_OG_TYPE",
    "MISSING_OG_URL"
  ],
  "issue_count": 6,
  "metadata": {
    "created": [
      "24th Jun 2016 09:29"
    ],
    "description": [
      ""
    ],
    "viewport": [
      "width=device-width"
    ],
    "robots": [
      "NOARCHIVE,NOCACHE"
    ]
  }
}
```

### Input reference

| Field | Type | Required | Description |
|---|---|---|---|
| `startUrls` | array | Yes | 1–100 public HTML pages you have permission to audit. A small example is prefilled. |
| `allowedHosts` | array | No | Leave empty to infer exact hostnames and their www variants from Page URLs. Add separate language domains explicitly. |
| `maxPages` | integer | No | Maximum explicitly supplied pages to check (1–100). No discovered links are followed. The time budget can stop the run earlier. |
| `permissionConfirmed` | boolean | Yes | The prefilled demo checks books.toscrape.com, the scraping-practice demonstration site. If replacing the URLs, confirm that you own or have permission to audit those websites. Uncheck to cancel all page checks. |

### Advanced workflow

#### Structured image inventory and preview candidates

og_images groups declared Open Graph image properties with their corresponding image in document order, including secure URL, declared dimensions and alt text. Relative URLs use the first declared base href when it resolves to HTTP(S). Unsafe schemes, credentials and malformed ports are excluded from clickable resolved-image fields; raw metadata remains available for diagnosis. Up to50 image groups and2000 sequential meta tags are inspected, with explicit truncation. preview_candidates shows our title/description/image fallback choices and their source tags. These are review suggestions, not a rendered or guaranteed platform card. Images are not fetched and declared dimensions are not verified.

### Pricing

$1.6 per 1,000 successfully checked HTTP 200 HTML pages ($0.0016 each) at the entry tier. Failed fetches, robots restrictions and non-HTML responses have no page event fee. A checked page is charged even when there are no findings. No run-start event or automatic output-row event. The Pricing tab shows the applicable subscription-tier price. The spending limit can reduce the number of processed items.

For example, 100 billable items cost $0.16 in Actor event fees at the entry tier. Zero findings is different from zero processed items. Inspect the report's processed/checked counts and the run's charge events to reconcile a run.

### Limits and interpretation

At most 100 supplied pages, a 75-second processing budget and a 2 MB response cap. Static HTML only; no rendered social cards, screenshots or platform approval. Images are not fetched, and declared image dimensions are not verified. A fallback candidate is a review suggestion.

Results cover only the inspected input. Truncation and unchecked records require review; do not treat them as a complete-source guarantee. Input is not overwritten. The Actor uses limited permissions.

### Troubleshooting and support

- **Run succeeded but output is diagnostic:** inspect `REPORT` and `INPUT_ERRORS`, correct the named fields, and rerun. Handled invalid input can finish with `SUCCEEDED` and no billable items.
- **Fewer results than requested:** check coverage, truncation, spending limits and the limits above. Website checks can also be restricted by robots rules, redirects or target availability.
- **Repeat a workflow:** save a task with your input and use Apify scheduling or its API. Review each run's coverage before passing results downstream.
- **Report a problem:** open this Actor's Issues tab with the run ID, expected behavior and a minimal non-sensitive input. Never post tokens, credentials or private source data.

### Related tools

- [site regression auditor](https://apify.com/variable_mitts/site-regression-auditor)
- [internal link source checker](https://apify.com/variable_mitts/internal-link-source-checker)

### Who is this for?

Content and SEO teams checking social-sharing metadata before publishing links. Supply permitted public URLs and inspect missing and duplicate tags.

### Frequently asked questions

#### Can this generate a Facebook, LinkedIn or X preview?

It audits static Open Graph and Twitter Card metadata. It does not render social-network previews or guarantee how a network caches or displays a shared page.

#### How do I try it before using my full input?

Open the Input tab, review the prefilled example, and run a small batch with a spending limit. Inspect the dataset and report before increasing the batch. Examples can incur the documented inspection or analysis fee; an execution marked successful can still contain rejected records or incomplete coverage.

#### Can I use the Actor through an API or on a schedule?

Yes. Use Apify's [Actor API](https://docs.apify.com/api/v2/acts-run-sync-get-dataset-items-post) or [schedules](https://docs.apify.com/platform/schedules). Keep credentials private and use the documented input fields. The pricing and limits below apply to API runs too.

### Related tools for the next step

- [JSON-LD Extractor - Structured Data and Syntax Checker](https://apify.com/variable_mitts/json-ld-page-extractor)
- [Canonical and Hreflang Checker - SEO Regression Audit](https://apify.com/variable_mitts/site-regression-auditor)

# Actor input Schema

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

1–100 public HTML pages you have permission to audit. A small example is prefilled.

## `allowedHosts` (type: `array`):

Leave empty to infer exact hostnames and their www variants from Page URLs. Add separate language domains explicitly.

## `maxPages` (type: `integer`):

Maximum explicitly supplied pages to check (1–100). No discovered links are followed. The time budget can stop the run earlier.

## `permissionConfirmed` (type: `boolean`):

The example checks Books to Scrape, a public site built for scraping practice. For other URLs, confirm that you have permission before running.

## Actor input object example

```json
{
  "startUrls": [
    "https://books.toscrape.com/"
  ],
  "allowedHosts": [
    "books.toscrape.com"
  ],
  "maxPages": 3,
  "permissionConfirmed": true
}
```

# Actor output Schema

## `pages` (type: `string`):

No description

## `report` (type: `string`):

No description

## `csv` (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": [
        "https://books.toscrape.com/"
    ],
    "allowedHosts": [
        "books.toscrape.com"
    ],
    "maxPages": 3,
    "permissionConfirmed": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("variable_mitts/social-preview-metadata-checker").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": ["https://books.toscrape.com/"],
    "allowedHosts": ["books.toscrape.com"],
    "maxPages": 3,
    "permissionConfirmed": True,
}

# Run the Actor and wait for it to finish
run = client.actor("variable_mitts/social-preview-metadata-checker").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": [
    "https://books.toscrape.com/"
  ],
  "allowedHosts": [
    "books.toscrape.com"
  ],
  "maxPages": 3,
  "permissionConfirmed": true
}' |
apify call variable_mitts/social-preview-metadata-checker --silent --output-dataset

```

## MCP server setup

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

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/5GV64GfXCfnpKOQOE/builds/ShqkxDRGE0bF0ddw7/openapi.json
