# One listing over time, and which price sold best

> Eto API reference for `GET /api/v1/performance/{shop_id}/listings/{listing_id}`. Base URL `https://eto.tools/api/v1/`. Authenticate with the `X-Eto-API-Key` header.

Part of the [Eto API reference](https://eto.tools/dev/docs/). The full reference in one file is at [llms-full.txt](https://eto.tools/dev/docs/llms-full.txt); the machine-readable schema is at [openapi.json](https://eto.tools/dev/docs/openapi.json).

## GET /api/v1/performance/{shop_id}/listings/{listing_id}

One listing over time, and which price sold best

- Operation ID: `listing_performance`
- Slug: `listing-performance`
- Category: Performance
- Authentication: API key only. Reads or writes data Eto holds for your own account.
- HTML: https://eto.tools/dev/docs/#ep-listing-performance
- Markdown: https://eto.tools/dev/docs/performance/listing-performance.md

Everything about one listing for a window: daily (or weekly) views, favourites, units sold, revenue and list price; totals against the window before; every price, photo, title, tag and state change; and sales by price point, price period and variation.

To answer "which price sells best": read listing.sales.periods (each run of one list price with units_per_day and conversion) and listing.sales.best_period_price. Periods from before readings existed are inferred from the prices buyers paid (source="sales").

━━━ HOW THE NUMBERS ARE MADE ━━━

Every listing on every connected store is read every six hours (00:05, 06:05, 12:05, 18:05 UTC). Views and favourites are GAINS per day in your timezone (Etsy reports lifetime counters and tallies views once a day, so today's views are null until tomorrow). Units and revenue come from your synced orders at the price buyers actually paid; cancelled and fully refunded orders do not count. Conversion = units sold / views gained, only over days whose views are known. Money is integer cents in the listing's currency.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `shop_id` | path | `integer` | yes | Your Etsy shop id. |
| `listing_id` | path | `integer` | yes | The Etsy listing id. |
| `period` | query | `string` | no | The window. Or pass start_date and end_date instead. Default: `30d`. One of: `24h`, `7d`, `30d`, `90d`, `1y`, `ytd`, `all`. |
| `start_date` | query | `string` | no | YYYY-MM-DD, inclusive. With end_date. |
| `end_date` | query | `string` | no | YYYY-MM-DD, inclusive. With start_date. |
| `grain` | query | `string` | no | Bucket size. auto = daily up to 120 days, then weekly. Default: `auto`. One of: `auto`, `day`, `week`. |

### Request

```bash
curl -H "X-Eto-API-Key: eto_your_key" "https://eto.tools/api/v1/performance/53081804/listings/4100000016?period=90d"
```

```python
import requests

url = "https://eto.tools/api/v1/performance/53081804/listings/4100000016?period=90d"
headers = {"X-Eto-API-Key": "eto_your_key"}

response = requests.get(url, headers=headers, timeout=120)
response.raise_for_status()
print(response.json())
```

```javascript
const url = "https://eto.tools/api/v1/performance/53081804/listings/4100000016?period=90d";

const response = await fetch(url, {
  method: "GET",
  headers: {
    "X-Eto-API-Key": "eto_your_key",
  },
});
if (!response.ok) throw new Error(`Eto API ${response.status}`);
const data = await response.json();
```

### Response

`application/json`. This endpoint has no worked response example in the registry yet; the [HTML reference](https://eto.tools/dev/docs/#ep-listing-performance) shows the fields it returns.

### Errors

Failures answer with the shared error body described in the Errors section: `{"error": {"code", "status", "message", "hint", "docs"}}`. Branch on `code`, not on the message.
