# Hreflang Checker & International SEO Auditor (`quanmatrix/hreflang-international-seo-auditor`) Actor

Check public URLs for hreflang tags, reciprocal links, locale coverage and cluster consistency, with optional repeat-run drift monitoring for international SEO.

- **URL**: https://apify.com/quanmatrix/hreflang-international-seo-auditor.md
- **Developed by:** [Rafael Barreto Haddad](https://apify.com/quanmatrix) (community)
- **Categories:** SEO tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.45 / 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.
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

## Hreflang Checker & International SEO Auditor

Check public URLs for hreflang tags, reciprocal links, locale coverage and cluster consistency, with optional repeat-run drift monitoring for international SEO.

### Quick start

Start with this working example and replace the target values with your own:

```json
{
  "urls": [
    "https://www.wikipedia.org"
  ],
  "validateReciprocity": true,
  "previousSnapshots": {}
}
```

The Actor writes structured results to the default Apify Dataset and can be used from the Store, API, schedules, Tasks, automations and MCP-compatible AI workflows.

### Input

- `urls` — Localized page URLs: Public pages whose hreflang locale clusters and international SEO coverage should be analyzed.
- `previousSnapshots` — Previous locale snapshots: Optional prior snapshots keyed by input or final URL to detect added or removed locales and canonical drift.
- `validateReciprocity` — Validate reciprocal hreflang: Fetch alternate locale pages and check whether they link back to the source cluster.
- `maxAlternatesPerPage` — Maximum alternate pages: Maximum alternate locale pages fetched for reciprocity evidence per source page.
- `maxUrls` — Maximum source pages: Maximum localized source pages processed in one run.
- `concurrency` — Concurrency: Maximum source pages processed in parallel.

All integration and advanced analysis fields are optional. The default example is intentionally runnable without configuring MCP or a previous-run baseline.

### Output

The Dataset exposes predictable machine-readable output. Representative fields include `dataset`.

### Pricing

This Actor uses Pay Per Event. The current factory base price is **$0.003500 per result event**. The Apify Store remains the source of truth for the price and plan/tier details shown to the buyer.

### Use cases

- Run the buyer-ready workflows exposed as Apify Tasks without preparing a custom integration first.
- Use the Actor from API or schedules for recurring collection, comparison or monitoring.
- Feed the structured Dataset output into spreadsheets, databases, automations or AI agents.
- Compare repeat runs when the product supports snapshots or previous-run inputs.

### Automation and AI

Use the same Actor through Apify API, schedules, public Tasks and the Apify MCP server. Outputs are structured for downstream workflows and AI agents rather than requiring manual copy/paste.

### Limitations

- Public websites and upstream APIs can change markup, access rules, rate limits or field availability without notice.
- Fields that are not publicly available are returned as unavailable or omitted rather than fabricated.
- Analytical outputs depend on the quality and coverage of the supplied or collected source data.
- Treat marketplace, reputation, workforce, safety or commercial signals as decision support and validate material decisions against the underlying source evidence.

### Detailed documentation

### Detailed documentation

Give public URLs. Validate hreflang alternates, reciprocity, canonicals and locale coverage, returning structured international SEO issues.

Turn hreflang validation into international SEO intelligence. This Actor maps the locale cluster around each page, checks reciprocal alternate links, evaluates canonical consistency, measures market coverage and compares the cluster with previous snapshots to detect expansion or regression.

### Why use this Actor

Global sites rarely fail because one tag is missing in isolation. They fail because locale clusters become inconsistent: one country disappears, reciprocal links break, canonicals point elsewhere, x-default is lost or a new market launches without complete technical coverage. This Actor gives SEO teams and agents one decision-ready result per source page.

### Key features

- Extract hreflang alternates and x-default.
- Validate language and language-region codes.
- Detect duplicate locales and missing self-reference.
- Check canonical consistency with the source page.
- Optionally fetch alternate locale pages and measure reciprocity.
- Calculate `clusterHealthScore`, `marketCoverageScore` and `marketOpportunityScore`.
- Compare reusable snapshots to detect added and removed locales.
- Surface international expansion or localization regressions with `agentAction`.
- HTTP-first 256 MB runtime with no Search Console or paid SEO API.

### Input

Provide localized public page URLs. Reciprocity checks can be enabled or capped for predictable runtime. Add previous snapshots for recurring market-coverage monitoring.

```json
{"urls":["https://www.wikipedia.org"],"validateReciprocity":true,"maxAlternatesPerPage":12}
```

### Output

Each page produces locale counts, locale codes, x-default evidence, reciprocity percentage, canonical evidence, coverage and opportunity scores, snapshot changes, added/removed locales and a recommended action.

### Example

If a previous cluster contained `en-us`, `de-de` and `fr-fr` and the current run loses `de-de`, the result can surface `removedLocales`, lower cluster health and recommend `REVIEW_LOCALE_COVERAGE_DRIFT`.

### Use cases

International ecommerce, global publishers, SaaS localization, market launches, country expansion, multilingual migrations, agency audits, weekly global SEO monitoring and AI-agent market coverage checks.

### Pricing

Pay per result. The base configured price is **$0.0035 USD per localized source-page result**, with tiered discounts where supported.

### Limitations

Analysis uses public HTML and optional alternate-page fetches. Very large locale clusters are capped for predictable runtime. Results describe technical international SEO evidence and do not guarantee rankings, indexing or commercial demand in a market.

# Changelog

This Actor's version history is a separate document: https://apify.com/quanmatrix/hreflang-international-seo-auditor/changelog.md

# Actor input Schema

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

Public pages whose hreflang locale clusters and international SEO coverage should be analyzed.

## `previousSnapshots` (type: `object`):

Optional prior snapshots keyed by input or final URL to detect added or removed locales and canonical drift.

## `validateReciprocity` (type: `boolean`):

Fetch alternate locale pages and check whether they link back to the source cluster.

## `maxAlternatesPerPage` (type: `integer`):

Maximum alternate locale pages fetched for reciprocity evidence per source page.

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

Maximum localized source pages processed in one run.

## `concurrency` (type: `integer`):

Maximum source pages processed in parallel.

## `failRunOnHealth` (type: `boolean`):

Fail after writing evidence when a clusterHealthScore is below the minimum.

## `minimumClusterHealth` (type: `number`):

Minimum acceptable clusterHealthScore when failRunOnHealth is enabled.

## `mcpConnectors` (type: `array`):

Optional MCP connectors authorized in your Apify account. Use them to send or write this Actor result to tools such as Slack, Notion, GitHub, Sentry, Supabase, or another compatible MCP service.

## `mcpToolName` (type: `string`):

Optional exact MCP tool name. Leave blank to let the selected MCP action preset discover a compatible tool automatically.

## `mcpToolArguments` (type: `object`):

JSON object passed to the selected MCP tool. String values may use {{actor\_title}}, {{result\_summary}}, or {{result\_json}} placeholders.

## `mcpFailOnError` (type: `boolean`):

When enabled, an MCP delivery error fails the Actor run. Disabled by default so data extraction and intelligence results remain available even if the external destination is unavailable.

## `mcpActionPreset` (type: `string`):

Choose a safe action pattern. AUTO\_SAFE\_WRITE discovers a compatible non-destructive write tool automatically; use a specific preset for Slack, GitHub, Notion, or database delivery.

## Actor input object example

```json
{
  "urls": [
    "https://www.wikipedia.org"
  ],
  "previousSnapshots": {},
  "validateReciprocity": true,
  "maxAlternatesPerPage": 12,
  "maxUrls": 50,
  "concurrency": 5,
  "failRunOnHealth": false,
  "minimumClusterHealth": 70,
  "mcpToolName": "",
  "mcpToolArguments": {},
  "mcpFailOnError": false,
  "mcpActionPreset": "AUTO_SAFE_WRITE"
}
```

# Actor output Schema

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

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

# Run the Actor and wait for it to finish
run = client.actor("quanmatrix/hreflang-international-seo-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 '{}' |
apify call quanmatrix/hreflang-international-seo-auditor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,quanmatrix/hreflang-international-seo-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/QKOKdIlvpjDGw1qGv/builds/qu4e6m7BkTgf0wD0x/openapi.json
