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

# Compare Two Runs

> Compare the reports of two runs

> [!NOTE]
>
> **Smart Delivery v2 (Deliverability Test) API**: the deliverability (inbox placement) test that sends your campaign email to seed inboxes and reports where it landed. Contact [support@smartlead.ai](mailto:support@smartlead.ai) for access.

## Overview

Returns both run reports and the difference between them. Each report is the body of [Get Run Report](https://api.smartlead.ai/api-reference/smart-delivery-v2/run-report.md).

## Path Parameters

**id** `string` *required*

First run ID (UUID)

**otherRunId** `string` *required*

Second run ID (UUID)

## Query Parameters

**api\_key** `string` *required*

Your SmartLead API key

```bash cURL theme={null}
curl -X GET "https://sl-sd-api.smartlead.ai/api/v1/smart-delivery/runs/3f2b8c1e-5d4a-4e7b-9a60-1c2d3e4f5a6b/compare/b7d2e6f1-4a38-4c19-9e05-6f8a1b2c3d4e?api_key=YOUR_KEY"
```

```python Python theme={null}
import requests

API_KEY = "YOUR_API_KEY"

response = requests.get(
    "https://sl-sd-api.smartlead.ai/api/v1/smart-delivery/runs/3f2b8c1e-5d4a-4e7b-9a60-1c2d3e4f5a6b/compare/b7d2e6f1-4a38-4c19-9e05-6f8a1b2c3d4e",
    params={"api_key": API_KEY}
)
print(response.status_code)
print(response.json())
```

```javascript JavaScript theme={null}
const API_KEY = 'YOUR_API_KEY';

const response = await fetch(
  `https://sl-sd-api.smartlead.ai/api/v1/smart-delivery/runs/3f2b8c1e-5d4a-4e7b-9a60-1c2d3e4f5a6b/compare/b7d2e6f1-4a38-4c19-9e05-6f8a1b2c3d4e?api_key=${API_KEY}`,
  {
    method: 'GET'
  }
);
console.log(await response.json());
```

## Response Fields

**a** `object`

Report of the run in `id`

**b** `object`

Report of the run in `otherRunId`

**delta** `object | null`

Change from `a` to `b`: `score`, `inboxRate` and `spamRate`. `null` when either report is not ready

## Response Codes

**200** `Success`

Success

**404** `Error`

Run not found (`RUN_NOT_FOUND`)

**401** `Unauthorized`

Missing, invalid or expired API key (`UNAUTHORIZED`)

**403** `Forbidden`

Client (agency) API keys are not allowed (`CLIENT_NOT_ALLOWED`), or your plan does not include API access (`API_ACCESS_RESTRICTED`)

**429** `Too Many Requests`

Too many requests for this API key. Wait the number of seconds in the `Retry-After` header (`RATE_LIMITED`)

```json 200 - Success theme={null}
{
  "a": { "ready": true, "score": 66, "band": "fair" },
  "b": { "ready": true, "score": 72, "band": "fair" },
  "delta": { "score": 6, "inboxRate": 0.125, "spamRate": -0.125 }
}
(reports shortened)
```

```json Error - Unauthorized theme={null}
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid API Key"
  }
}
```

## Related Endpoints

* [Get Run Report](https://api.smartlead.ai/api-reference/smart-delivery-v2/run-report.md)
* [Get Test History](https://api.smartlead.ai/api-reference/smart-delivery-v2/test-history.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.