# Page Metadata Auditor: SEO, Open Graph, Twitter Cards, JSON-LD (`devsolal/page-metadata-auditor`) Actor

- **URL**: https://apify.com/devsolal/page-metadata-auditor.md
- **Developed by:** [David-Solal Chalmeau](https://apify.com/devsolal) (community)
- **Categories:** Developer tools, SEO tools
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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

## Page Metadata Auditor: SEO, Open Graph, Twitter Cards, JSON-LD

Give it a list of page URLs. For each page you get the metadata search engines and social networks read — title, meta description, canonical, meta robots and `X-Robots-Tag`, viewport, `lang`, the first `<h1>` and the `<h1>` count, Open Graph, Twitter card, JSON-LD `@type`s and hreflang alternates — plus a plain list of issues with a severity. One flat JSON row per page, ready for a spreadsheet, a CI check, or an AI agent.

It reads the pages you list. It does not crawl, and it does not run JavaScript: metadata that a page only injects client-side is not seen.

### What you get per page

| Field | Meaning |
|---|---|
| `url`, `finalUrl` | The URL you gave (normalised) and where redirects ended (max 5 redirects) |
| `statusCode`, `redirectCount`, `contentType` | Final HTTP response |
| `title`, `titleLength` | `<title>` text (whitespace collapsed, entities decoded) and its character count |
| `description`, `descriptionLength` | `<meta name="description">` and its character count |
| `canonical` | `<link rel="canonical">` href as written |
| `robots`, `xRobotsTag` | `<meta name="robots">` and the `X-Robots-Tag` response header |
| `viewport`, `lang` | `<meta name="viewport">`, `<html lang>` |
| `h1`, `h1Count` | Text of the first `<h1>` and how many there are |
| `openGraph` | `title`, `description`, `image`, `url`, `type`, `siteName`, `locale` |
| `twitter` | `card`, `site`, `creator`, `title`, `description`, `image` |
| `jsonLd` | `count` of `application/ld+json` blocks, `invalid` (not valid JSON), `types` (all `@type` values incl. `@graph`) |
| `hreflang` | `[{lang, href}]` from `<link rel="alternate" hreflang>` |
| `bodyTruncated` | `true` when the page was larger than 1 MB and only the first 1 MB was parsed |
| `status` | `OK` (no issues) or `ISSUE` |
| `issues` | List of `{severity, code, message}` |
| `checkedAt` | ISO timestamp |

Issue codes (character counts, not pixels):

- error: `TITLE_MISSING`, `JSONLD_INVALID`
- warning: `TITLE_TOO_LONG` (> 60), `TITLE_TOO_SHORT` (< 10), `DESCRIPTION_MISSING`, `DESCRIPTION_TOO_LONG` (> 160), `DESCRIPTION_TOO_SHORT` (< 50), `H1_MISSING`, `CANONICAL_MISSING`, `VIEWPORT_MISSING`, `OG_IMAGE_MISSING`, `OG_IMAGE_NOT_ABSOLUTE`, `NOINDEX` (meta robots or `X-Robots-Tag` says `noindex`/`none`)
- info: `H1_MULTIPLE`, `CANONICAL_DIFFERENT` (canonical points elsewhere; trailing slash and `#fragment` ignored), `LANG_MISSING`, `OG_TITLE_MISSING`, `OG_DESCRIPTION_MISSING`, `TWITTER_CARD_MISSING`, `JSONLD_MISSING`

Error rows (free, no metadata): `INVALID_URL`, `HTTP_ERROR` (4xx/5xx, with `statusCode`), `NOT_HTML`, `UNSUPPORTED_ENCODING` (e.g. a `zstd` body this Actor cannot decode), `PARSE_ABORTED` (page exceeded the parse time budget), `ROBOTS_DISALLOWED`, `REFUSED_PRIVATE_ADDRESS`, `TIMEOUT`, `FETCH_FAILED`, `CHECK_FAILED`.

### Example input

```json
{ "urls": ["https://www.python.org/", "example.com"], "maxUrls": 100 }
```

### Example output (real run, trimmed)

```json
{
  "url": "https://www.python.org/",
  "finalUrl": "https://www.python.org/",
  "statusCode": 200,
  "title": "Welcome to Python.org",
  "titleLength": 21,
  "description": "The official home of the Python Programming Language",
  "descriptionLength": 52,
  "canonical": null,
  "viewport": "width=device-width, initial-scale=1.0",
  "lang": "en",
  "h1Count": 5,
  "openGraph": { "title": "Welcome to Python.org", "image": "https://www.python.org/static/opengraph-icon-200x200.png", "type": "website", "siteName": "Python.org" },
  "twitter": { "card": null },
  "jsonLd": { "count": 1, "invalid": 0, "types": ["WebSite"] },
  "hreflang": [],
  "issues": [
    { "severity": "info", "code": "H1_MULTIPLE", "message": "5 <h1> elements" },
    { "severity": "warning", "code": "CANONICAL_MISSING", "message": "No <link rel=\"canonical\">" },
    { "severity": "info", "code": "TWITTER_CARD_MISSING", "message": "No twitter:card" }
  ],
  "status": "ISSUE"
}
```

### Pricing

Pay per event: a small start fee per run plus **one `page-audited` event for each HTML page fetched, parsed and delivered with its metadata**. Rows without metadata are free: invalid URLs, HTTP 4xx/5xx pages, non-HTML or undecodable-encoding responses, pages robots.txt disallows, refused private addresses, timeouts and fetch errors. If your spending limit is reached, the run stops cleanly instead of doing unpaid work. Current prices are shown on this page.

### Good to know

- **Public pages only.** IP addresses, `localhost`, internal hostnames (`.local`, `.internal`, …) and URLs with credentials are rejected. Every connection, including each redirect hop, is made to an address validated as public at connect time, and redirects to private address literals (`127.0.0.1`, `::1`, `169.254.169.254`, …) are refused.
- **robots.txt is honoured.** It is read once per origin and checked before every request, including redirect hops; a disallowed page is returned as a free `ROBOTS_DISALLOWED` row and never requested. A robots.txt answering 5xx is treated as "disallow all"; 4xx as "no restrictions".
- A bare domain (`example.com`) is audited as `https://example.com/`. Duplicate URLs are removed and `#fragments` dropped.
- Limits: `maxUrls` default 100, hard cap 1000; 5 pages in flight overall and at most 2 requests in flight to one host, with ~100 ms between request starts to the same host; 12 s per request, 30 s per page (a redirect chain cannot run 5 x 12 s); 1 MB of HTML parsed per page (gzip, deflate — zlib-wrapped or raw — and brotli are decoded; the page's charset is honoured). Parsing is linear in the page size, so no page can stall the run. Sends the `apify-actor-fleet/1.0` User-Agent.
- A response in an encoding this Actor cannot decode (for example `zstd`) is **not** parsed: you get a free `UNSUPPORTED_ENCODING` row instead of a metadata row full of false issues.
- No JavaScript rendering, no crawling, no link checking. It reports what the server sends.
- A site behind a bot-protection wall may answer `403`; that is returned as a free `HTTP_ERROR` row with the real status.

# Actor input Schema

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

Pages to audit, for example https://example.com/pricing. A bare domain (example.com) means its https:// home page. IP addresses, localhost, internal hosts and URLs with credentials are rejected.

## `maxUrls` (type: `integer`):

Upper bound on pages audited in this run (hard limit 1000). Duplicates are removed first.

## Actor input object example

```json
{
  "urls": [
    "https://www.python.org/"
  ],
  "maxUrls": 100
}
```

# Actor output Schema

## `results` (type: `string`):

Every audited page as dataset items.

# 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.python.org/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("devsolal/page-metadata-auditor").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.python.org/"] }

# Run the Actor and wait for it to finish
run = client.actor("devsolal/page-metadata-auditor").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 '{
  "urls": [
    "https://www.python.org/"
  ]
}' |
apify call devsolal/page-metadata-auditor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,devsolal/page-metadata-auditor"
        }
    }
}
```

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/EsWFLzLJB9uailamy/builds/jUO033M17r0rGhpb4/openapi.json
