# Comparisons

Compare Screpy projects and completed crawls to measure SEO changes, technical issue deltas, and performance differences.

## [Compare like with like](/content/docs/api/comparisons#compare-like-with-like/index.html)

Use comparisons to investigate a change between selected projects or completed crawl baselines. Keep the target, crawl settings, and comparison period meaningful before interpreting a delta. Select the underlying snapshots through [crawls](/content/docs/api/crawls/index.html).

A change in an issue count is evidence to investigate, not its cause. Use the related [crawl data](/content/docs/api/crawl-data/index.html) to find the affected URLs and validate the next action.

## [Compare two to five projects](/content/docs/api/comparisons#compare-two-to-five-projects/index.html)

POST `/comparisons/projects`

Uses the latest completed crawl by default, or a selected completed crawl for each supplied selection.

### [Authorization](/content/docs/api/comparisons#authorization/index.html)

`bearerApiKey`

AuthorizationBearer <token>

Create a REST API key in Settings > Connected Apps. MCP credentials do not authenticate this API.

In: `header`

### [Request Body](/content/docs/api/comparisons#request-body/index.html)

`application/json`

TypeScript Definitions

Use the request body type in TypeScript.

```typescript
project_uids*: array<ProjectUid>
```

Items `2 <= items <= 5`

```typescript
crawl_selections?: array<CrawlSelection>
```

Items `items <= 5`

### [Response Body](/content/docs/api/comparisons#response-body/index.html)

### 200  `application/json`

### 401  `application/json`

### 403  `application/json`

### 404  `application/json`

### 409  `application/json`

### 422  `application/json`

### 429  `application/json`

```bash
curl -X POST "https://api.screpy.com/v1/comparisons/projects" \
  -H "Content-Type: application/json" \
  -d '{\n    "project_uids": [\
      "string",\
      "string"\
    ]\n  }'
```

### Example Response:
```json
{
  "data": {
    "projects": [\
      {\
        "project": {\
          "uid": "string",\
          "name": "string",\
          "domain": "string"\
        },\
        "crawl": {\
          "crawl_uid": "string",\
          "status": "string",\
          "state": "string",\
          "status_label": "string",\
          "started_at": "2019-08-24T14:15:22Z",\
          "finished_at": "2019-08-24T14:15:22Z",\
          "last_synced_at": "2019-08-24T14:15:22Z",\
          "progress": {\
            "pages_crawled": 0,\
            "pages_total": 0,\
            "max_pages": 0,\
            "current_depth": 0\
          },\
          "health": {\
            "score": 0,\
            "confidence": 0,\
            "coverage": 0\
          },\
          "issues": {\
            "critical": 0,\
            "warnings": 0,\
            "notices": 0,\
            "total": 0\
          },\
          "totals": {\
            "pages": 0,\
            "indexable_pages": 0,\
            "noindex_pages": 0,\
            "links": 0,\
            "images": 0,\
            "unique_urls": 0\
          }\
        }\
      }\
    ]\
  }\
}
```

## [Compare two completed crawls](/content/docs/api/comparisons#compare-two-completed-crawls/index.html)

POST `/comparisons/crawls`

Deltas are calculated as `second - first`.

### [Authorization](/content/docs/api/comparisons#authorization/index.html)

`bearerApiKey`

AuthorizationBearer <token>

Create a REST API key in Settings > Connected Apps. MCP credentials do not authenticate this API.

In: `header`

### [Request Body](/content/docs/api/comparisons#request-body/index.html)

`application/json`

TypeScript Definitions

Use the request body type in TypeScript.

```typescript
first*: CrawlSelection
second*: object
```

`crawl_uid` must differ from `first.crawl_uid`.

### [Response Body](/content/docs/api/comparisons#response-body/index.html)

### 200  `application/json`

### 401  `application/json`

### 403  `application/json`

### 404  `application/json`

### 409  `application/json`

### 422  `application/json`

### 429  `application/json`

```bash
curl -X POST "https://api.screpy.com/v1/comparisons/crawls" \
  -H "Content-Type: application/json" \
  -d '{\n    "first": {\
      "project_uid": "string",\
      "crawl_uid": "string"\
    },\
    "second": {\
      "project_uid": "string",\
      "crawl_uid": "string"\
    }\
  }'
```

### Example Response:
```json
{
  "data": {
    "first": {
      "crawl_uid": "string",
      "status": "string",
      "state": "string",
      "status_label": "string",
      "started_at": "2019-08-24T14:15:22Z",
      "finished_at": "2019-08-24T14:15:22Z",
      "last_synced_at": "2019-08-24T14:15:22Z",
      "progress": {
        "pages_crawled": 0,
        "pages_total": 0,
        "max_pages": 0,
        "current_depth": 0
      },
      "health": {
        "score": 0,
        "confidence": 0,
        "coverage": 0
      },
      "issues": {
        "critical": 0,
        "warnings": 0,
        "notices": 0,
        "total": 0
      },
      "totals": {
        "pages": 0,
        "indexable_pages": 0,
        "noindex_pages": 0,
        "links": 0,
        "images": 0,
        "unique_urls": 0
      },
      "project_uid": "string"
    },
    "second": {
      "crawl_uid": "string",
      "status": "string",
      "state": "string",
      "status_label": "string",
      "started_at": "2019-08-24T14:15:22Z",
      "finished_at": "2019-08-24T14:15:22Z",
      "last_synced_at": "2019-08-24T14:15:22Z",
      "progress": {
        "pages_crawled": 0,
        "pages_total": 0,
        "max_pages": 0,
        "current_depth": 0
      },
      "health": {
        "score": 0,
        "confidence": 0,
        "coverage": 0
      },
      "issues": {
        "critical": 0,
        "warnings": 0,
        "notices": 0,
        "total": 0
      },
      "totals": {
        "pages": 0,
        "indexable_pages": 0,
        "noindex_pages": 0,
        "links": 0,
        "images": 0,
        "unique_urls": 0
      },
      "project_uid": "string"
    },
    "deltas": {
      "property1": 0,
      "property2": 0
    }
  }
}
```
