# Website Monitor -> Markdown Report (`sam0x5/website-monitor-actor`) Actor

Audits a list of URLs for HTTP status and SEO metadata, diffs each run against the previous one, and produces JSON and Markdown reports. Optionally POSTs a webhook when changes are detected.

- **URL**: https://apify.com/sam0x5/website-monitor-actor.md
- **Developed by:** [SAM 0X5](https://apify.com/sam0x5) (community)
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 page auditeds

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

## Website Monitor Actor

This Apify actor monitors website URLs and provides audits including HTTP status and SEO attributes (title, meta description, canonical tag, robots tag, H1 count), diffed against the previous run. It outputs JSON and Markdown format reports.

### Usage

1. Open this Actor on the Apify Store and click **Try for free**.
2. In the **Input** tab, enter the list of URLs you want to monitor (and, optionally, a webhook URL — see below).
3. Click **Start** / **Run**.
4. When the run finishes, open the **Output** tab (or the Dataset/Key-value store) to view the JSON and Markdown reports.

Re-run the Actor with the same URLs on a schedule (Apify's built-in Schedules feature) to get a diff against the previous run each time.

### Features

- Input accepts a list of URLs.
- Audits HTTP status and SEO attributes.
- Compares new results with stored data in Apify Key-Value Store for change detection.
- Outputs JSON and Markdown reports summarizing the audit and detected changes.
- Optional webhook notification on detected changes.

### Input

The input JSON should have the following structure:

```json
{
  "urls": ["https://example.com", "https://another-site.com"],
  "webhookUrl": "https://your-webhook-endpoint.example.com/notify"  // Optional
}
```

- `urls`: Array of URLs to audit.
- `webhookUrl`: (Optional) A URL to receive POST notifications of detected changes.

### Output

The actor produces:

- `report.json` — JSON array of audit results for each URL.
- `summary.md` — Markdown summary of changes detected since the previous run.

### Webhook Notification

If `webhookUrl` is provided, the actor sends a POST request with a JSON payload summarizing the detected changes.

#### Payload format example:

```json
{
  "timestamp": "2024-06-12T15:00:00.000Z",
  "changedPagesCount": 2,
  "notifications": [
    {
      "url": "https://example.com/page1",
      "changes": [
        {"field": "title", "oldValue": "Old Title", "newValue": "New Title"},
        {"field": "h1Count", "oldValue": 1, "newValue": 2}
      ]
    },
    {
      "url": "https://example.com/page2",
      "changes": [
        {"field": "metaDescription", "oldValue": "Old desc", "newValue": "New desc"}
      ]
    }
  ],
  "markdownSummaryLink": "summary.md (available in output folder)"
}
```

Ensure your webhook server accepts POST requests with `application/json` Content-Type.

***

For support or feature requests, please open an issue on the repository or contact the author.

### For Developers

To run this Actor locally instead of on the Apify platform:

```bash
npm install
npm start
```

Local runs read input from `input.json` in the project root and write `apify_storage/` (dataset/key-value store) plus `output/report.json` and `output/summary.md`, same as a platform run.

Before pushing a change, validate the Actor's manifest locally:

```bash
npx apify-cli validate-schema
```

# Actor input Schema

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

List of URLs that will be checked for HTTP and SEO metadata changes.

## `webhookUrl` (type: `string`):

Optional webhook URL to POST summary diffs to when changes are detected since the previous run.

## Actor input object example

```json
{}
```

# Actor output Schema

## `auditResults` (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("sam0x5/website-monitor-actor").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("sam0x5/website-monitor-actor").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 sam0x5/website-monitor-actor --silent --output-dataset

```

## MCP server setup

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

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/PAS3aDSQotiXKcaWK/builds/Z8wtw8T1EpBbLIoF6/openapi.json
