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

# Top products [+]

> Your best sellers ranked by revenue within a period.

Products ranked by completed-sale revenue within the period, with order counts, the "best sellers" list from the dashboard.

<Info>
  **Tier:** Premium, requires a premium key **and** an active Branding+ subscription (checked on every request).
</Info>

## Request

```bash theme={null}
curl "https://nmcrate.com/api/public/v1/studio/top-products?period=thisMonth&limit=5" \
  -H "x-api-key: nmk_studio_..."
```

### Query parameters

| Parameter | Type    | Default     | Description                                                                                                          |
| --------- | ------- | ----------- | -------------------------------------------------------------------------------------------------------------------- |
| `period`  | string  | `thisMonth` | Calendar periods (`today`, `thisWeek`, `thisMonth`, `thisYear`) or rolling windows (`last7d`, `last30d`, `last90d`). |
| `limit`   | integer | `10`        | Number of products to return, max `50`.                                                                              |

## Response

```json theme={null}
{
  "period": "thisMonth",
  "range": {
    "start": "2026-07-01T00:00:00.000Z",
    "end": "2026-07-31T23:59:59.999Z"
  },
  "currency": "USD",
  "items": [
    {
      "product": {
        "id": "prod_8f3a2c",
        "slug": "dungeon-pack",
        "name": "Dungeon Pack",
        "imageUrl": "https://cdn.example.com/dungeon.png",
        "category": "plugin",
        "price": 14.99
      },
      "revenue": 449.7,
      "orders": 30
    },
    {
      "product": null,
      "revenue": 89.94,
      "orders": 6
    }
  ]
}
```

| Field             | Description                                                                             |
| ----------------- | --------------------------------------------------------------------------------------- |
| `items[]`         | Sorted by `revenue`, highest first.                                                     |
| `items[].product` | `null` when the product was deleted after the sales happened, the revenue still counts. |
| `items[].revenue` | Net revenue in USD dollars (number).                                                    |

## Errors

| HTTP | Code                    | When                                                             |
| ---- | ----------------------- | ---------------------------------------------------------------- |
| 403  | `PREMIUM_KEY_REQUIRED`  | The key is basic-tier.                                           |
| 403  | `SUBSCRIPTION_INACTIVE` | Premium key, but the Branding+ subscription is no longer active. |
