# Website Migration QA — Source vs Target Diff (`moonweil/website-migration-qa`) Actor

Before you switch DNS, compare every page on your old and new site: HTTP status, redirects, title, meta description, canonical, robots, H1, word count and structured data. Get a per-field diff with severity, configurable tolerances, and a summary of what regressed.

- **URL**: https://apify.com/moonweil/website-migration-qa.md
- **Developed by:** [Aleksandr Jelohhin](https://apify.com/moonweil) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 path compareds

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?

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

## Website Migration QA — Source vs Target Diff

Replatforming, moving domains, or pushing a big redesign? Before you switch DNS,
run this Actor to **compare every page on the old site and the new site side by
side** and catch what changed before your users — and Google — do.

For each path it fetches both the source and the target, then diffs the things
that matter for SEO and content parity, and flags every difference with a
severity.

### What it compares

- **HTTP status** and **redirects** (does the new page 200, or 404, or add an unexpected redirect?)
- **Title** and **meta description**
- **Canonical URL** and **robots / indexability** — catches the classic "staging `noindex` shipped to production"
- **H1** and heading structure
- **Word count** (with a configurable tolerance so tiny changes are ignored)
- **Structured data** — the schema types present on the page
- **Broken links** *(optional)* — did the new page introduce dead links?
- **Response time**

### Input

```json
{
  "sourceBaseUrl": "https://www.example.com",
  "targetBaseUrl": "https://staging.example.com",
  "paths": ["/", "/pricing", "/about"],
  "wordCountTolerancePercent": 10
}
```

Or turn on sitemap discovery to compare every URL in the source site's
`sitemap.xml` automatically.

### Output

One dataset row per path:

```json
{
  "path": "/pricing",
  "score": 82,
  "worstSeverity": "warning",
  "source": { "statusCode": 200, "title": "Pricing | Example" },
  "target": { "statusCode": 200, "title": "Example" },
  "differences": [
    { "type": "title_changed", "field": "title", "severity": "warning",
      "sourceValue": "Pricing | Example", "targetValue": "Example" }
  ]
}
```

Plus a run `SUMMARY`: paths compared, how many differ, how many have errors,
counts by difference type, average score, and the worst-affected paths.

### Use it for

- A go/no-go check the day before a migration launch
- Post-launch verification that nothing regressed
- Ongoing parity checks between production and a staging environment
- Vendor QA — proving a migration project delivered what was scoped

### Pricing

Pay per path compared (one fetch on each side plus the diff).

# Actor input Schema

## `sourceBaseUrl` (type: `string`):

The current / live site, e.g. https://www.example.com

## `targetBaseUrl` (type: `string`):

The migrated site to verify, e.g. https://staging.example.com

## `paths` (type: `array`):

Paths appended to both base URLs, e.g. \["/", "/pricing", "/about"]. Required unless "Discover paths from the source sitemap" is on.

## `discoverPathsFromSitemap` (type: `boolean`):

Add every path found in the source site's sitemap.xml to the comparison.

## `maxPaths` (type: `integer`):

Hard limit on the number of paths compared.

## `checkBrokenLinks` (type: `boolean`):

Runs the broken-link analyzer on both sides (more HTTP requests).

## `wordCountTolerancePercent` (type: `integer`):

Word-count changes within this percentage are not reported.

## `responseTimeTolerancePercent` (type: `integer`):

Report the target as slower only when it exceeds the source response time by more than this percentage.

## `ignoreFields` (type: `array`):

Field names to skip, e.g. \["responseTime", "canonical"].

## `onlyReportPathsWithDifferences` (type: `boolean`):

Skip dataset rows for paths that are identical on both sides.

## `maxConcurrency` (type: `integer`):

How many pages to process in parallel.

## `requestTimeoutSecs` (type: `integer`):

Per-request timeout in seconds for fetching a page.

## `respectRobotsTxt` (type: `boolean`):

Skip URLs disallowed by the target site's robots.txt.

## `outputDetail` (type: `string`):

summary keeps the dataset compact; detailed includes the full analyzer evidence per page.

## `debug` (type: `boolean`):

Verbose logging. Also allows stack traces into the dataset.

## Actor input object example

```json
{
  "sourceBaseUrl": "https://www.example.com",
  "targetBaseUrl": "https://staging.example.com",
  "paths": [
    "/",
    "/pricing",
    "/about",
    "/contact"
  ],
  "discoverPathsFromSitemap": false,
  "maxPaths": 500,
  "checkBrokenLinks": false,
  "wordCountTolerancePercent": 10,
  "responseTimeTolerancePercent": 50,
  "ignoreFields": [],
  "onlyReportPathsWithDifferences": false,
  "maxConcurrency": 5,
  "requestTimeoutSecs": 30,
  "respectRobotsTxt": true,
  "outputDetail": "detailed",
  "debug": false
}
```

# Actor output Schema

## `diffs` (type: `string`):

One row per path: parity score, worst severity, the per-field differences (status, redirects, title, meta, canonical, robots, headings, word count, structured data) and the full source vs target snapshot.

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

Paths compared, how many differ or contain errors, counts by difference type, average score and the worst-affected paths.

# 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 = {
    "sourceBaseUrl": "https://www.example.com",
    "targetBaseUrl": "https://staging.example.com",
    "paths": [
        "/",
        "/pricing",
        "/about",
        "/contact"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("moonweil/website-migration-qa").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 = {
    "sourceBaseUrl": "https://www.example.com",
    "targetBaseUrl": "https://staging.example.com",
    "paths": [
        "/",
        "/pricing",
        "/about",
        "/contact",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("moonweil/website-migration-qa").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 '{
  "sourceBaseUrl": "https://www.example.com",
  "targetBaseUrl": "https://staging.example.com",
  "paths": [
    "/",
    "/pricing",
    "/about",
    "/contact"
  ]
}' |
apify call moonweil/website-migration-qa --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,moonweil/website-migration-qa"
        }
    }
}

```

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/9r7t3Z31rgrfPZxbF/builds/0iGlujZclpZvVeoaH/openapi.json
