# Get name past sales

`GET https://api.unique.domains/v1/names/{name}/comps`

The similar-sales aggregate of one name and how many endings its word sold on.

Aggregates only: the tier of the sales behind the figure, their count and median, and how many endings the word sold on in 12 months. Keyed may read the `sold_before` tier (this exact name sold before); free never does. A name the catalog never stored answers 200 with `tier: null` and a count of 0, never 404.

- Access: No key. Limited per address; a key adds the paid fields.
- Billing: One call.
- Formats: JSON
- API: Domain Check API

## Request

| Field | Type | Needs | Where | Description |
| --- | --- | --- | --- | --- |
| `name` | string | Required | Path | A full domain name on an ending the catalog holds, lowercased, IDN as punycode. A bare word, a subdomain, an e-mail address or an unknown ending answers 400 `validation_failed` with `reason` and `suggestion`. |
| `fields` | string | Optional | Query | Comma-separated top-level keys to keep; an unknown key answers 400 `unsupported_field`. |

## Sample request

```bash
curl -X GET "https://api.unique.domains/v1/names/get.plumbing/comps"
```

## Response

| Field | Type | Description |
| --- | --- | --- |
| `tier` | string \| null | `sold_before` (this exact name sold before) on keyed answers only. |
| `count` | integer |  |
| `medianUsd` | number \| null |  |
| `endingsSoldOn` | integer | How many endings the word sold on in 12 months. |

## Errors

| Code | Status | What it means |
| --- | --- | --- |
| [`validation_failed`](https://unique.domains/api/problems/validation_failed) | 400 | A value is not valid |
| [`rate_limited`](https://unique.domains/api/problems/rate_limited) | 429 | Too many requests |
| [`internal`](https://unique.domains/api/problems/internal) | 500 | Unexpected error |

## Example answer

200, application/json

```json
{
  "data": {
    "tier": "same_word",
    "count": 10,
    "medianUsd": 2677,
    "endingsSoldOn": 0
  },
  "meta": {
    "asOf": null,
    "cursor": null,
    "limit": null
  },
  "links": {
    "self": "https://api.unique.domains/v1/names/get.plumbing/comps",
    "next": null,
    "register": null,
    "product": null,
    "dataset": null
  }
}
```

API status: https://uniquedomains.instatus.com

Full reference: https://unique.domains/api
