---
title: "Compare two sources"
method: GET
path: "/sites/{site}/source-comparison"
tags: ["Sources"]
---

# Compare two sources

`GET /sites/{site}/source-comparison`

## Request

- Base URL: `https://api.onelence.com/v1`
- URL: `https://api.onelence.com/v1/sites/{site}/source-comparison`
- Auth: one of:
  - OAuth 2 (authorization code, authorization URL `https://api.onelence.com/oauth/authorize`, token URL `https://api.onelence.com/oauth/token`, scopes: `decisions:read`)
  - HTTP bearer

Two sources side by side for one window: visitors, conversions, conversion rate, observed revenue and their Decision and signal state. It ranks nothing and is not a Decision.

## Path parameters

- `site` string, required

## Query parameters

- `a` string, required
- `b` string, required
- `start` string
- `end` string

## Response `200`

Success.

- object
  - `object` 'source_comparison', required
  - `site` object, required
    - `id` string, required
    - `domain` string, required
  - `disposition` 'comparable' | 'incomparable', required
  - `availability` 'available' | 'partial' | 'unavailable', required
  - `title` string, required
  - `summary` string, nullable, required
  - `window` object, required
    - `start` string, required
    - `end_exclusive` string, required
  - `a` object, required
    - `name` string, required
    - `visitors` number, nullable, required
    - `conversions` number, nullable, required
    - `conversion_rate` number, nullable, required
    - `observed_revenue` object, nullable, required
      - `amount` number, required
      - `currency` string, required
    - `decision` string, nullable, required
    - `signals` string, nullable, required
  - `b` object, required
    - `name` string, required
    - `visitors` number, nullable, required
    - `conversions` number, nullable, required
    - `conversion_rate` number, nullable, required
    - `observed_revenue` object, nullable, required
      - `amount` number, required
      - `currency` string, required
    - `decision` string, nullable, required
    - `signals` string, nullable, required
  - `metrics` object[], required
    - `label` string, required
    - `a` string, required
    - `b` string, required
    - `delta` string, nullable, required
  - `limitations` string[], required
  - `note` string, required

## Other responses

- `400`: Invalid input; `error.param` names the field.
- `401`: Missing, expired or revoked token. WWW-Authenticate points to the resource metadata.
- `402`: subscription_required or upgrade_required; the error carries billing_url.
- `403`: insufficient_scope or admin_required.
- `404`: Unknown endpoint, site, source or record.
- `429`: Rate limited. Retry after Retry-After seconds.
- `500`: OneLence could not complete the request.

---

[API](https://skmtc.dev/onelence/apis/onelence-api.md) · [All operations](https://skmtc.dev/onelence/apis/onelence-api/llms.txt) · [OpenAPI document](https://skmtc.dev/onelence/apis/onelence-api/revisions/971c72fe9a42?raw)
