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

# Sales and Trends Reports

> Download sales, installs, subscription, and financial reports

The Sales and Trends API lets you download the same reports available in [App Store Connect > Sales and Trends](https://appstoreconnect.apple.com/sales/reports): sales summaries, installs, subscriptions, and more. Reports are returned as **gzip-compressed TSV** files.

<Note>
  **Requires a Team (Organization) key** — Individual Apple Developer accounts cannot access Sales Reports. You also need your **Vendor Number** from [Agreements, Tax, and Banking](https://appstoreconnect.apple.com/agreements).
</Note>

***

## Download Sales Report

```
GET /v1/connect/sales-reports
```

Download a Sales and Trends report. The response is a gzip file—save it and decompress to get the TSV.

### Required Headers

| Header            | Description            |
| ----------------- | ---------------------- |
| X-ASC-Issuer-Id   | Your Issuer ID         |
| X-ASC-Key-Id      | Your Key ID            |
| X-ASC-Private-Key | Your private key (PEM) |

### Required Query Parameters

| Name         | Type   | Description                                                 |
| ------------ | ------ | ----------------------------------------------------------- |
| vendorNumber | string | Your vendor number (from Agreements, Tax, and Banking)      |
| reportDate   | string | Date in format based on frequency (see below)               |
| reportType   | string | Report type (default: `SALES`)                              |
| frequency    | string | `DAILY`, `WEEKLY`, `MONTHLY`, `YEARLY` (default: `MONTHLY`) |

### Optional Query Parameters

| Name          | Type   | Default   | Description                     |
| ------------- | ------ | --------- | ------------------------------- |
| reportSubType | string | `SUMMARY` | Usually `SUMMARY` or `DETAILED` |
| version       | string | `1_0`     | Report version (varies by type) |

### Report Date Format

| Frequency | Format       | Example      |
| --------- | ------------ | ------------ |
| DAILY     | `YYYY-MM-DD` | `2026-03-08` |
| WEEKLY    | `YYYY-MM-DD` | `2026-03-02` |
| MONTHLY   | `YYYY-MM`    | `2026-02`    |
| YEARLY    | `YYYY`       | `2026`       |

***

## Report Types & Valid Combinations

| reportType          | reportSubType    | frequency                      | version    |
| ------------------- | ---------------- | ------------------------------ | ---------- |
| SALES               | SUMMARY          | DAILY, WEEKLY, MONTHLY, YEARLY | 1\_0       |
| INSTALLS            | SUMMARY          | MONTHLY                        | 1\_2       |
| INSTALLS            | DETAILED         | MONTHLY                        | 1\_2       |
| INSTALLS            | SUMMARY\_CHANNEL | YEARLY                         | 1\_0, 1\_1 |
| SUBSCRIPTION        | SUMMARY          | DAILY                          | 1\_3       |
| SUBSCRIBER          | DETAILED         | DAILY                          | 1\_3       |
| SUBSCRIPTION\_EVENT | SUMMARY          | DAILY                          | 1\_3       |
| PRE\_ORDER          | SUMMARY          | DAILY, WEEKLY, MONTHLY, YEARLY | 1\_0       |

See [Apple's documentation](https://developer.apple.com/documentation/AppStoreConnectAPI/GET-v1-salesReports) for the full matrix.

***

## Response

The API returns the raw gzip file. Save it with a `.tsv.gz` extension and decompress:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# Download and save
curl -o sales-2026-02.tsv.gz "https://api.appeeky.com/v1/connect/sales-reports?vendorNumber=XXXXX&reportDate=2026-02&reportType=SALES&frequency=MONTHLY" \
  -H "X-API-Key: YOUR_KEY" \
  -H "X-ASC-Issuer-Id: ..." \
  -H "X-ASC-Key-Id: ..." \
  -H "X-ASC-Private-Key: ..."

# Decompress
gunzip sales-2026-02.tsv.gz

# View (TSV format)
head sales-2026-02.tsv
```

***

## Code Example

<CodeGroup>
  ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
  # Monthly sales summary
  curl -o sales.tsv.gz "https://api.appeeky.com/v1/connect/sales-reports?vendorNumber=12345678&reportDate=2026-02&reportType=SALES&frequency=MONTHLY&reportSubType=SUMMARY&version=1_0" \
    -H "X-API-Key: YOUR_APEEKY_KEY" \
    -H "X-ASC-Issuer-Id: YOUR_ISSUER_ID" \
    -H "X-ASC-Key-Id: YOUR_KEY_ID" \
    -H "X-ASC-Private-Key: YOUR_PRIVATE_KEY"
  ```

  ```javascript JavaScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  // Download and decompress in Node.js
  import { createWriteStream } from "fs";
  import { createGunzip } from "zlib";
  import { pipeline } from "stream/promises";

  const params = new URLSearchParams({
    vendorNumber: process.env.VENDOR_NUMBER,
    reportDate: "2026-02",
    reportType: "SALES",
    frequency: "MONTHLY",
  });

  const res = await fetch(
    `https://api.appeeky.com/v1/connect/sales-reports?${params}`,
    {
      headers: {
        "X-API-Key": process.env.APEEKY_KEY,
        "X-ASC-Issuer-Id": process.env.ASC_ISSUER_ID,
        "X-ASC-Key-Id": process.env.ASC_KEY_ID,
        "X-ASC-Private-Key": process.env.ASC_PRIVATE_KEY,
      },
    }
  );

  const buffer = Buffer.from(await res.arrayBuffer());
  await pipeline(
    require("stream").Readable.from(buffer),
    createGunzip(),
    createWriteStream("sales-2026-02.tsv")
  );
  ```
</CodeGroup>

***

## Finding Your Vendor Number

1. Go to [App Store Connect](https://appstoreconnect.apple.com)
2. **Agreements, Tax, and Banking**
3. Under **Paid Apps** or **In-App Purchases**, find your **Vendor Number** (numeric, e.g. `12345678`)

***

## Credits

| Endpoint                   | Credits |
| -------------------------- | ------- |
| GET /connect/sales-reports | 3       |
