# OG / Twitter / JSON-LD Meta Tag Validator (`stellar_ballet_0bu/og-meta-validator`) Actor

Validate Open Graph, Twitter Card, and JSON-LD meta tags on a public page; emit per-field pass/warn/fail with structured fix-hints, ready for n8n/Make/Sheets alerts.

- **URL**: https://apify.com/stellar\_ballet\_0bu/og-meta-validator.md
- **Developed by:** [Nikita S](https://apify.com/stellar_ballet_0bu) (community)
- **Categories:** Developer tools, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 url validateds

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

## OG / Twitter / JSON-LD Meta Tag Validator

Validate the most common social-preview and structured-data meta tags on a public page and emit **one row per checked field** with `pass / warn / fail` plus a structured **`fixHint`** string for every issue. Built for SEO engineers, growth marketers, and content teams that want to push validation results into n8n / Make / Sheets / Slack / Supabase.

### What it checks

For every URL it fetches (HEAD-equivalent GET, capped at `maxBytes`):

- **Open Graph** (`og:*`): `title`, `description`, `image`, `url`, `type`, `site_name`, `locale`.
- **Twitter Card** (`twitter:*`): `card`, `title`, `description`, `image`, `site`, `creator`.
- **JSON-LD**: presence of at least one parseable `@type` block. Per-block `@type` collected.
- **Plain HTML basics**: `<title>`, `meta name="description"`, canonical link.

For each missing / empty / invalid field it emits `status: 'fail' | 'warn'` and a short `fixHint` string ready to drop into a Slack message or a Sheets cell.

### Who it is for

- **SEO engineers** who want a per-field pass/fail report on a list of pages, with fix-hints.
- **Growth marketers** running pre-launch QA on landing pages.
- **Content teams** that need to confirm a page's OpenGraph + Twitter card before pushing it to social.
- **Web agencies** offering pre-launch audits as a service.

### Quick start

```json
{
  "urls": ["https://example.com"],
  "strict": false
}
```

Each successful URL produces:

- one `summary` row with the URL, final URL after redirects, HTTP status, and counts of pass / warn / fail.
- one `field` row per checked field, with `status` and (if not pass) `fixHint`.

Example field row:

```json
{
  "_kind": "field",
  "url": "https://example.com",
  "field": "og:image",
  "status": "fail",
  "fixHint": "Add <meta property=\"og:image\" content=\"https://...\">. Recommended size 1200x630."
}
```

### Input

| Field | Type | Default | Notes |
|---|---|---|---|
| `urls` | string\[] (required) | — | Public HTTP(S) URLs to validate. |
| `strict` | bool | `false` | If true, recommended-but-not-required fields also fail when missing. |
| `timeoutSec` | int | `15` | Per-URL fetch timeout in seconds. |
| `maxBytes` | int | `2000000` | Truncate page body at this many bytes. |
| `followRedirects` | bool | `true` | Follow HTTP redirects. |

### Output

Dataset row kinds:

- `field` — per checked field. Carries `url`, `field`, `status` (`pass` / `warn` / `fail`), `fixHint`.
- `summary` — per URL. Carries `url`, `finalUrl`, `status`, `pass`, `warn`, `fail`, `checkedFields`, `meta`.
- `error` — failed fetch.

`SUMMARY` KV record: `{ ok, total, succeeded, failed, strict, perUrl: [{ url, ok, pass, warn, fail }, ...] }`.

### Pricing

This Actor is **Pay Per Event** on the Apify Store:

- `apify-actor-start` — flat per run.
- `url_validated` — charged once per URL successfully processed.

For local tests, `Actor.charge` is a no-op (no usage billed, no payout).

### Limits

- Designed for **public** HTML pages. Login-walled content, paywalls, and JS-rendered SPAs are out of scope.
- The Actor does not execute JavaScript — only server-rendered HTML is parsed.
- `maxBytes` truncates the body before parsing; very large pages may be missing trailing meta tags.

### FAQ

**Q: Is `strict: true` recommended for most pages?**
A: Use `strict: false` for a friendlier baseline. Switch to `strict: true` for production launch gates when you want every recommended field enforced.

**Q: My page has no JSON-LD — is that a fail?**
A: It's a `warn` in non-strict mode (recommended to add), `fail` in strict mode. The Actor does not enforce a particular JSON-LD type — it just checks for presence and parseability.

**Q: How does this differ from `html-meta-extractor`?**
A: `html-meta-extractor` is a broad pull of all meta / OG / Twitter / JSON-LD. `og-meta-validator` focuses on validating a single OpenGraph + Twitter + JSON-LD spec (required fields, type allow-list, JSON-LD presence) and is best used as a per-URL QA check.

**Q: Can I run it on a private/intranet site?**
A: Only if the Actor host can reach it without auth and over plain HTTP(S).

### Related Actors

- [`html-meta-extractor`](https://apify.com/stellar_ballet_0bu/html-meta-extractor) — broad pull of all meta / OG / Twitter / JSON-LD.
- [`jsonld-extractor-validator`](https://apify.com/stellar_ballet_0bu/jsonld-extractor-validator) — extract and validate JSON-LD blocks per URL.
- [`html-link-classifier`](https://apify.com/stellar_ballet_0bu/html-link-classifier) — classify anchor links on a page (internal / external / nofollow / sponsored / ugc).
- [`http-status-batch`](https://apify.com/stellar_ballet_0bu/http-status-batch) — confirm URLs are reachable before validating meta.

### Support

Open an issue on the Actor's Apify Store page (`Report an issue` link on the right rail) or contact the developer through the Store profile.

### License

MIT — see Apify Store page for the canonical text.

# Actor input Schema

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

Public HTTP(S) URLs to fetch and validate.

## `strict` (type: `boolean`):

If true, recommended-but-not-required fields (e.g. og:locale) also fail when missing.

## `timeoutSec` (type: `integer`):

Abort the page fetch after this many seconds.

## `maxBytes` (type: `integer`):

Truncate the page body at this many bytes.

## `followRedirects` (type: `boolean`):

Follow HTTP redirects (30x) on page fetch.

## Actor input object example

```json
{
  "urls": [],
  "strict": false,
  "timeoutSec": 15,
  "maxBytes": 2000000,
  "followRedirects": true
}
```

# Actor output Schema

## `rows` (type: `string`):

Field rows: { \_kind:'field', url, field, status, fixHint }. Summary rows: { \_kind:'summary', url, finalUrl, status, ok, pass, warn, fail, checkedFields, meta }. Error rows: { \_kind:'error', url?, message }.

## `summary` (type: `string`):

Run summary with total/succeeded/failed URL counts and per-URL pass/warn/fail breakdown.

# 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("stellar_ballet_0bu/og-meta-validator").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("stellar_ballet_0bu/og-meta-validator").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 stellar_ballet_0bu/og-meta-validator --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/I42ebOWTx1NUo4EHb/builds/1CEONU8dWpjdwFu4a/openapi.json
