> ## Documentation Index
> Fetch the complete documentation index at: https://docs.perplexity.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Page

> Monitor known pages, establish a baseline, and inspect relevant text changes.

A Page monitor fetches the URLs in its targets and compares their text across runs. The first successful fetch of each page establishes a baseline; later runs can return relevant changes.

## Create a Page monitor

Use cURL and jq, and set `PERPLEXITY_API_KEY` to your [API key](https://docs.perplexity.ai/docs/admin/api-key-management.md). Add one target with `type: "page"` for each public URL you want to watch. Creating a monitor makes its first run due immediately and schedules later runs until you [pause or delete it](https://docs.perplexity.ai/docs/monitors/overview.md#pause-and-resume); see [Monitor API pricing](https://docs.perplexity.ai/docs/getting-started/pricing.md#monitor-api-pricing).

```bash cURL theme={null}
curl --request POST https://api.perplexity.ai/v1/monitors \
  --header "Authorization: Bearer $PERPLEXITY_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "name": "Example page changes",
    "targets": [
      {"type": "page", "url": "https://example.com/"},
      {"type": "page", "url": "https://example.org/"},
      {"type": "page", "url": "https://example.net/"}
    ],
    "goal": "Report meaningful changes to the page.",
    "schedule": {"type": "interval", "interval": "1w"}
  }' | jq
```

The `200` response is a monitor, not a completed run. Set `MONITOR_ID` to its `id` for the requests below. Use an [idempotency key](https://docs.perplexity.ai/api-reference/monitors-create-post.md#webhook-secrets-and-retries) if your application retries creation.

> [!NOTE]
>
> This example reads results through the API without configuring a webhook. Use [webhooks](https://docs.perplexity.ai/docs/monitors/overview.md#webhook-notifications) to receive change notifications without polling for results.

## Understand the first run

The first successful fetch of each page saves its baseline and reports no change for that page. Retrieve the first run to check its status and `target_errors`; do not submit another `/run` request after creation.

```bash cURL theme={null}
curl "https://api.perplexity.ai/v1/monitors/$MONITOR_ID/runs?limit=1" \
  --header "Authorization: Bearer $PERPLEXITY_API_KEY" | jq
```

If the list is empty, read it again later. For `queued`, `running`, or an unknown status, keep polling with a bounded retry policy. For `failed` or `skipped`, inspect `error`. A `succeeded` run can still contain individual `target_errors`.

Set `RUN_ID` to `data[0].id` and retrieve that run:

```bash cURL theme={null}
curl "https://api.perplexity.ai/v1/monitors/$MONITOR_ID/runs/$RUN_ID" \
  --header "Authorization: Bearer $PERPLEXITY_API_KEY" | jq
```

This response shows the baseline run for the three-URL request above. Use the monitor and run IDs returned by your own requests.

> [accordion] Baseline run response
>
> ```json theme={null}
> {
>   "changes": [],
>   "counts": {
>     "candidates": 0,
>     "changes": 0,
>     "errors": 0
>   },
>   "created_at": "2026-11-13T12:36:35Z",
>   "finished_at": "2026-11-13T12:36:38Z",
>   "id": "run_01M7AEHSDC61H1V8EWZV2N18TC",
>   "monitor_id": "mon_01M7AEHPG71Z0HW1TK1QFDFBDT",
>   "object": "monitor.run",
>   "status": "succeeded",
>   "target_errors": [],
>   "trigger": "schedule",
>   "window": {
>     "from": "2026-11-06T12:36:32Z",
>     "to": "2026-11-13T12:36:35Z"
>   }
> }
> ```

## Read page changes

Later runs compare fetched text with the saved version of each page. Detected differences are judged for meaningfulness before a kept change appears in `changes` with `type: "page_change"` and a structured `diff`. The comparison reflects the fetched versions, not every intermediate edit.

Use the same run-history request to read later checks. A monitor watching release notes can return:

> [accordion] Page change response
>
> ```json theme={null}
> {
>   "id": "run_03",
>   "object": "monitor.run",
>   "monitor_id": "mon_02",
>   "trigger": "schedule",
>   "status": "succeeded",
>   "window": {"from": "2026-11-11T09:00:00Z", "to": "2026-11-12T09:00:00Z"},
>   "counts": {"candidates": 1, "changes": 1, "errors": 0},
>   "usage": {
>     "searches": 0,
>     "fetched_urls": 1,
>     "cost": {"total_cost": 0.001, "currency": "USD"}
>   },
>   "changes": [
>     {
>       "id": "chg_abcdef0123456789abcdef0123456789ab",
>       "type": "page_change",
>       "url": "https://example.com/releases",
>       "title": "Product release notes",
>       "diff": {
>         "unified": "@@ -1 +1 @@\n-Version 2.0\n+Version 2.1: bulk export is available\n",
>         "added_lines": 1,
>         "removed_lines": 1,
>         "truncated": false
>       },
>       "confidence": 0.96,
>       "previous_fetched_at": "2026-11-11T09:00:03Z",
>       "fetched_at": "2026-11-12T09:00:04Z"
>     }
>   ],
>   "target_errors": [],
>   "created_at": "2026-11-12T09:00:00Z",
>   "finished_at": "2026-11-12T09:00:30Z"
> }
> ```

A later successful run with unchanged text has `counts: {"candidates": 0, "changes": 0, "errors": 0}`, `changes: []`, and `target_errors: []`. Changed text can also produce candidates that the relevance judge does not keep.

### Page result fields

| Field | Meaning |
| - | - |
| `type` | `page_change` for a kept change. |
| `id` | Stable `chg_` ID for deduplication across runs and webhooks. |
| `url` | The monitored page. |
| `diff.unified` | Unified diff hunks with one context line and no file headers. |
| `diff.added_lines`, `diff.removed_lines` | Line counts for the whole diff, including lines omitted from a truncated diff. |
| `diff.truncated` | Whether `unified` was cut to fit the 24 KiB byte limit. It keeps complete lines where possible; an oversized line can be shortened at a UTF-8 character boundary. |
| `previous_fetched_at`, `fetched_at` | RFC 3339 UTC timestamps with whole-second precision for the two compared snapshots. |
| `confidence` | Relevance confidence from `0` to `1`. |

Fetch and processing errors are separate from changes. Each `target_errors` entry contains `type: "page"`, `url`, `code`, and `message`; a failed fetch preserves that page's baseline. An error with the `http_status` code also includes the page's `status_code`. Other codes include `invalid_url`, `blocked`, `no_content`, `load_failed`, `timeout`, and `fetch_unavailable`. Use the code for decisions rather than parsing the message, and allow for new codes.

A run can succeed when some pages fail and others are fetched successfully. If every source fails, the run is `failed`; inspect its `error` and `target_errors`.

## Configure what to track

### Choose pages

Supply 1 to 10 Page targets, each with its own URL. A Page monitor checks those URLs.

| Parameter | Type | Constraints |
| - | - | - |
| `targets[].type` | string | `page` for every target. |
| `targets[].url` | string | A distinct absolute HTTP or HTTPS URL. It must be public, contain no embedded credentials, and be at most 2,048 bytes. |

Duplicate page URLs are rejected after normalization of the scheme, host, default port, empty path, and fragment. Query strings remain significant for that validation, and the detector can deduplicate additional normalized equivalents when fetching.

To change the watched pages, [replace the full `targets` array](https://docs.perplexity.ai/docs/monitors/overview#manage-monitors). Include every URL you want to keep. Existing baselines are preserved. A Page URL with no stored baseline establishes one on its first successful fetch.

```bash cURL theme={null}
curl --request PATCH "https://api.perplexity.ai/v1/monitors/$MONITOR_ID" \
  --header "Authorization: Bearer $PERPLEXITY_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "targets": [
      {"type": "page", "url": "https://example.com/"},
      {"type": "page", "url": "https://example.org/"},
      {"type": "page", "url": "https://docs.perplexity.ai/docs/resources/changelog"}
    ]
  }' | jq
```

### Set a relevance goal

Use the [goal](https://docs.perplexity.ai/docs/monitors/overview.md#goals-and-judging) to describe which changes you want to keep, for example "New features and breaking changes in the release notes; ignore navigation and footer edits." The goal filters detected text changes.

Page judging evaluates whether the detected text change is meaningful. With a goal, it evaluates the change against those instructions; without one, it evaluates general meaningfulness.

Successful runs advance the saved page version even when a detected change is not kept. Updating the goal therefore does not replay previously rejected changes.

## Next steps

[Pause the monitor](https://docs.perplexity.ai/docs/monitors/overview.md#pause-and-resume) when you finish trying it. You can also [change its schedule](https://docs.perplexity.ai/docs/monitors/overview.md#schedules), [add webhooks](https://docs.perplexity.ai/docs/monitors/overview.md#webhook-notifications), or check the [API reference](https://docs.perplexity.ai/api-reference/monitors-create-post.md) for the full contract.

> [card] [Track API and pricing changes](https://docs.perplexity.ai/docs/cookbook/articles/page-monitor-changelog/README.md)
>
> Watch a changelog, pricing page, and API guide for changes that matter to you.
