---
title: "Get URL Content Diff"
method: POST
path: "/sources/urls/content/diff"
tags: ["Reports"]
---

# Get URL Content Diff

`POST /sources/urls/content/diff`

## Request

- Base URL: `https://api.peec.ai/customer/v1`
- URL: `https://api.peec.ai/customer/v1/sources/urls/content/diff`
- Auth: one of:
  - API key in header `X-API-Key`
  - API key in query parameter `api_key`
  - HTTP bearer

Compare two stored content versions of a source URL. Without version numbers, compares the newest version with the one before it. Use List URL Content Versions to see which versions exist. Returns 404 when the URL has only one version.

## Query parameters

- `project_id` string: Required if using a company api key

## Request body

- object
  - `project_id` string: Required if using a company api key
  - `url` string, uri, required: Full URL of a source, as returned by the URLs report or Get URL Content.
  - `from_version` integer: Older version to compare from. Defaults to the version before to_version.
  - `to_version` integer: Newer version to compare to. Defaults to the newest version.

## Response `200`

Success

- object: Success
  - `data` object, required
    - `from_version` integer, required: The older version compared.
    - `to_version` integer, required: The newer version compared.
    - `diff` string, required: Unified diff of the page's markdown, from_version to to_version.
    - `from_content` string, required: Markdown content of from_version.
    - `to_content` string, required: Markdown content of to_version.

## Other responses

- `404`: Response for status 404

## Changes

- **2026-11-03** `9fdffdff48a5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/peec/apis/peec-ai-customer-api/changes/sources/urls/content/diff/post.md)

---

[API](https://skmtc.dev/peec/apis/peec-ai-customer-api.md) - [All operations](https://skmtc.dev/peec/apis/peec-ai-customer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/peec/apis/peec-ai-customer-api/revisions/9d774600c8eb?raw)
