# asc: analytics and finance

> asc commands for sales, analytics and finance reports, vendor numbers, weekly and daily insights, performance metrics and keyword plans.

Source: https://air.build/docs/cli/asc-analytics/

These [asc](https://air.build/docs/cli/asc/) families read reports and metrics. Picking an Apple team (`--auth`), output, pagination and exit codes work as described on the [asc](https://air.build/docs/cli/asc/) page.

In the tables below, **Main flags** leaves out the flags almost every command has: `--output` and `--pretty` (see [Output](https://air.build/docs/cli/asc/#output)), `--limit`, `--next` and `--paginate` on list commands (see [Pagination](https://air.build/docs/cli/asc/#pagination)), and the `--…-fields` flags that pick which attributes Apple returns. Run `asc <family> <subcommand> --help` for every flag, its values and examples. Where a subcommand has subcommands of its own, they are listed instead.

## Vendor numbers

Sales and finance reports need the Apple team's vendor number (`--vendor`), and Apple's public API has no way to read it. AirBuild reads it from the Team owner's App Store Connect account and keeps it with the Apple team:

| Command | What it does |
| --- | --- |
| `asc vendor-number list [--auth NAME]` | Prints the stored vendor numbers, one row each, with the legal entity and the units Apple last reported sold. Without `--auth`, every connected Apple team. |
| `asc vendor-number refresh [--auth NAME]` | Reads them from Apple again, then prints them. `--auth` is required when several teams are connected. |

`none` is a normal answer: Apple issues a vendor number only after the team completes the Paid Applications agreement. `--vendor` also reads `ASC_VENDOR_NUMBER`.

## Report files

`analytics sales`, `analytics download`, `finance reports` and `performance download` save report files. On these commands `--output` is the **file path** (by default a name like `sales_report_<date>_<type>.tsv.gz` in the current folder) and `--output-format` picks the format of the summary printed (`json`, `table` or `markdown`). `--decompress` saves a `.tsv` instead of `.tsv.gz`.

- `analytics sales --vendor N --type SALES --subtype SUMMARY --frequency DAILY --date 2026-01-20`. `--date` is `YYYY-MM-DD` for daily and weekly, `YYYY-MM` for monthly, `YYYY` for yearly. `--allow-missing` returns `available=false` instead of failing when there is no report for that date.
- `finance reports --vendor N --report-type FINANCIAL --region ZZ --date 2025-12`. Finance reports are monthly, by Apple fiscal month. `FINANCIAL` with `ZZ` is all regions in one file, with a region code (`US`, `EU`, …) one file per region; `FINANCE_DETAIL` needs `--region Z1`. `asc finance regions` lists the codes. Apple requires the Account Holder, Admin or Finance role.
- Analytics reports work by request: `analytics request --app APP_ID --access-type ONGOING` (add `--reuse-existing` to reuse one), then `analytics view --request-id ID` and `analytics download --request-id ID --instance-id ID`.

## analytics

Request and download analytics and sales reports.

Each subcommand has its own section below, after [optimize](https://air.build/docs/cli/asc-analytics/#optimize), with every flag; so do the `finance`, `vendor-number` and `insights` subcommands. Those flag tables leave out the same common flags as the tables here.

| Subcommand | What it does | Main flags |
| --- | --- | --- |
| [`sales`](https://air.build/docs/cli/asc-analytics/#analytics-sales) | Download sales and trends reports. | `--allow-missing`, `--date`, `--decompress`, `--frequency`, `--output-format`, `--subtype`, `--type`, `--vendor`, `--version` |
| [`request`](https://air.build/docs/cli/asc-analytics/#analytics-request) | Create an analytics report request. | `--access-type`, `--app`, `--reuse-existing` |
| [`requests`](https://air.build/docs/cli/asc-analytics/#analytics-requests) | List and manage analytics report requests. | `--access-type`, `--app`, `--request-id`; subcommands: `delete` |
| [`view`](https://air.build/docs/cli/asc-analytics/#analytics-view) | View analytics reports for a request. | `--granularity`, `--include-segments`, `--instance-id`, `--processing-date`, `--request-id` |
| [`reports`](https://air.build/docs/cli/asc-analytics/#analytics-reports) | Get analytics reports by ID or relationships. | subcommands: `view`, `links` |
| [`instances`](https://air.build/docs/cli/asc-analytics/#analytics-instances) | View analytics report instances or relationships. | subcommands: `view`, `links` |
| [`segments`](https://air.build/docs/cli/asc-analytics/#analytics-segments) | Get analytics report segments by ID. | subcommands: `view` |
| [`download`](https://air.build/docs/cli/asc-analytics/#analytics-download) | Download analytics report data. | `--decompress`, `--instance-id`, `--output-format`, `--request-id`, `--segment-id` |
| [`compare`](https://air.build/docs/cli/asc-analytics/#analytics-compare) | Compare sales metrics between two date ranges. | `--app`, `--frequency`, `--from`, `--from-end`, `--source`, `--subtype`, `--to`, `--to-end`, `--type`, `--vendor` |

## finance

Download payments and financial reports.

| Subcommand | What it does | Main flags |
| --- | --- | --- |
| [`reports`](https://air.build/docs/cli/asc-analytics/#finance-reports) | Download financial reports from App Store Connect. | `--date`, `--decompress`, `--output-format`, `--region`, `--report-type`, `--vendor` |
| [`regions`](https://air.build/docs/cli/asc-analytics/#finance-regions) | List finance report region codes and currencies. |  |

## vendor-number

Show the team's vendor numbers for sales and finance reports (served by AirBuild).

| Subcommand | What it does | Main flags |
| --- | --- | --- |
| [`list`](https://air.build/docs/cli/asc-analytics/#vendor-number-list) | Print the stored vendor numbers of every connected team (or the `--auth` one). | `--auth` |
| [`refresh`](https://air.build/docs/cli/asc-analytics/#vendor-number-refresh) | Re-read the vendor numbers from Apple, then print them. | `--auth` |

## insights

Generate weekly and daily insights from App Store data sources.

| Subcommand | What it does | Main flags |
| --- | --- | --- |
| [`weekly`](https://air.build/docs/cli/asc-analytics/#insights-weekly) | Summarize this week vs last week metrics. | `--app`, `--source`, `--vendor`, `--week` |
| [`daily`](https://air.build/docs/cli/asc-analytics/#insights-daily) | Summarize daily subscription renewal signals from sales exports. | `--app`, `--date`, `--vendor` |

## performance

Access performance metrics and diagnostic logs. Every subcommand and flag: [asc performance](https://air.build/docs/cli/asc-performance/).

## optimize

Build cross-API optimization plans. Every subcommand and flag: [asc optimize](https://air.build/docs/cli/asc-optimize/).

## analytics sales

Downloads a Sales and Trends report and saves it to a file. Needs the vendor number (see [Vendor numbers](https://air.build/docs/cli/asc-analytics/#vendor-numbers)). On this command `--output` is the **file path** and `--output-format` picks the format of the summary printed on stdout (see [Report files](https://air.build/docs/cli/asc-analytics/#report-files)).

| Flag | What it does | Default |
| --- | --- | --- |
| `--vendor` | Vendor number. Or set `ASC_VENDOR_NUMBER` or `ASC_ANALYTICS_VENDOR_NUMBER`. | — |
| `--type` | Report type: `SALES`, `PRE_ORDER`, `NEWSSTAND`, `SUBSCRIPTION`, `SUBSCRIPTION_EVENT`, `SUBSCRIBER`, `SUBSCRIPTION_OFFER_CODE_REDEMPTION`, `FIRST_ANNUAL`, `WIN_BACK_ELIGIBILITY`; `INSTALLS` is deprecated. | — |
| `--subtype` | Report subtype: `SUMMARY`, `DETAILED`, `SUMMARY_INSTALL_TYPE`, `SUMMARY_TERRITORY`, `SUMMARY_CHANNEL`. | — |
| `--frequency` | `DAILY`, `WEEKLY`, `MONTHLY`, `YEARLY`. | — |
| `--date` | Report date: `YYYY-MM-DD` for daily and weekly (a week may be given by its Monday), `YYYY-MM` or `YYYY-MM-DD` for monthly, `YYYY` or `YYYY-MM-DD` for yearly. Optional for `DAILY`. | the latest report |
| `--version` | Report format version, where Apple offers more than one for the type, subtype and frequency. | — |
| `--allow-missing` | Print `available=false` instead of failing when there is no report for that date. | off |
| `--decompress` | Save a `.tsv` instead of `.tsv.gz`. | off |
| `--output` | File path to write. | `sales_report_DATE_TYPE.tsv.gz` (`latest` in place of the date when `--date` is left out) |
| `--output-format` | Format of the summary: `json`, `table`, `markdown`. | `json` |

```sh
asc analytics sales --vendor "12345678" --type SALES --subtype SUMMARY --frequency DAILY --date "2024-01-20" --output "reports/daily_sales.tsv.gz"
```

## analytics request

Creates an analytics report request for an app. Apple then produces the reports for it: `ONGOING` keeps producing them, `ONE_TIME_SNAPSHOT` produces them once.

| Flag | What it does | Default |
| --- | --- | --- |
| `--app` | App ID. Or set `ASC_APP_ID`. | — |
| `--access-type` | `ONGOING` or `ONE_TIME_SNAPSHOT`. | — |
| `--reuse-existing` | Return the existing active request with the same access type instead of creating a duplicate. | off |

```sh
asc analytics request --app "1234567890" --access-type ONGOING --reuse-existing
```

## analytics requests

Lists an app's analytics report requests. Its subcommand deletes one.

| Flag | What it does | Default |
| --- | --- | --- |
| `--app` | App ID. Or set `ASC_APP_ID`. | — |
| `--access-type` | Filter: `ONGOING`, `ONE_TIME_SNAPSHOT`. | all |
| `--request-id` | Filter by request ID. | — |

```sh
asc analytics requests --app "1234567890" --access-type ONGOING
```

### analytics requests delete

Deletes an analytics report request.

| Flag | What it does | Default |
| --- | --- | --- |
| `--request-id` | Analytics report request ID. Required. | — |
| `--confirm` | Confirm the deletion. Required. | off |

```sh
asc analytics requests delete --request-id "REQUEST_ID" --confirm
```

## analytics view

Shows the reports of a request and their instances (one per processing date and granularity). `--processing-date` and `--granularity` filter the instances on Apple's side. `--next` with a report page's `links.next` URL resumes from that page; add `--paginate` to fetch every remaining page as well.

| Flag | What it does | Default |
| --- | --- | --- |
| `--request-id` | Analytics report request ID. Required unless `--next` is given. | — |
| `--instance-id` | Show only this instance. | — |
| `--processing-date` | Instances processed on this date, `YYYY-MM-DD`. | all |
| `--granularity` | Comma-separated: `DAILY`, `WEEKLY`, `MONTHLY`. | all |
| `--include-segments` | Include each instance's segments with their download URLs. | off |

```sh
asc analytics view --request-id "REQUEST_ID" --processing-date "2024-01-20" --granularity "DAILY,WEEKLY" --paginate
```

## analytics reports

Reads one analytics report.

### analytics reports view

Shows an analytics report by ID.

| Flag | What it does | Default |
| --- | --- | --- |
| `--report-id` | Analytics report ID. Required. | — |

```sh
asc analytics reports view --report-id "REPORT_ID"
```

### analytics reports links

Lists the IDs of a report's instances.

| Flag | What it does | Default |
| --- | --- | --- |
| `--report-id` | Analytics report ID. Required. | — |

```sh
asc analytics reports links --report-id "REPORT_ID" --paginate
```

## analytics instances

Reads one report instance.

### analytics instances view

Shows an analytics report instance by ID.

| Flag | What it does | Default |
| --- | --- | --- |
| `--instance-id` | Analytics report instance ID. Required. | — |

```sh
asc analytics instances view --instance-id "INSTANCE_ID"
```

### analytics instances links

Lists the IDs of an instance's segments.

| Flag | What it does | Default |
| --- | --- | --- |
| `--instance-id` | Analytics report instance ID. Required. | — |

```sh
asc analytics instances links --instance-id "INSTANCE_ID" --paginate
```

## analytics segments

Reads one report segment, the part of an instance that holds a downloadable file.

### analytics segments view

Shows an analytics report segment by ID.

| Flag | What it does | Default |
| --- | --- | --- |
| `--segment-id` | Analytics report segment ID. Required. | — |

```sh
asc analytics segments view --segment-id "SEGMENT_ID"
```

## analytics download

Downloads the data of a report instance and saves it to a file. On this command `--output` is the **file path** and `--output-format` picks the format of the summary printed on stdout.

| Flag | What it does | Default |
| --- | --- | --- |
| `--request-id` | Analytics report request ID. | — |
| `--instance-id` | Analytics report instance ID. | — |
| `--segment-id` | Segment ID. Required when the instance has more than one segment. | — |
| `--decompress` | Save a `.csv` instead of `.csv.gz`. | off |
| `--output` | File path to write. | `analytics_report_REQUESTID_INSTANCEID.csv.gz` |
| `--output-format` | Format of the summary: `json`, `table`, `markdown`. | `json` |

```sh
asc analytics download --request-id "REQUEST_ID" --instance-id "INSTANCE_ID" --decompress
```

## analytics compare

Compares sales metrics of an app between two periods. It fetches the report for every date in both periods, adds them up and prints each metric's change and percentage change. Every report date in both periods must be available, or nothing is compared. For `WEEKLY`, each start and end must be a Monday (week start) or a Sunday (week end).

| Flag | What it does | Default |
| --- | --- | --- |
| `--source` | Data source: `sales`. | — |
| `--vendor` | Vendor number. Or set `ASC_VENDOR_NUMBER`. | — |
| `--app` | App ID the metrics are scoped to. Or set `ASC_APP_ID`. | — |
| `--frequency` | `DAILY`, `WEEKLY`, `MONTHLY`, `YEARLY`. | — |
| `--from` | Start of the baseline period: `YYYY-MM-DD`, `YYYY-MM` or `YYYY`. | — |
| `--from-end` | End of the baseline period. | `--from` |
| `--to` | Start of the period compared with it. | — |
| `--to-end` | End of that period. | `--to` |
| `--type` | Report type: `SALES`, `PRE_ORDER`, `NEWSSTAND`, `SUBSCRIPTION`, `SUBSCRIPTION_EVENT`. | `SALES` |
| `--subtype` | `SUMMARY` or `DETAILED`. | `SUMMARY` |

```sh
asc analytics compare --source sales --vendor "12345678" --app "1234567890" --from "2026-01-01" --from-end "2026-01-31" --to "2026-02-01" --to-end "2026-02-28" --frequency DAILY
```

## finance reports

Downloads a monthly payments and financial report and saves it to a file. Needs the vendor number (see [Vendor numbers](https://air.build/docs/cli/asc-analytics/#vendor-numbers)) and, on Apple's side, the Account Holder, Admin or Finance role. On this command `--output` is the **file path** and `--output-format` picks the format of the summary printed on stdout (see [Report files](https://air.build/docs/cli/asc-analytics/#report-files)).

| Flag | What it does | Default |
| --- | --- | --- |
| `--vendor` | Vendor number. Or set `ASC_VENDOR_NUMBER`. Required. | — |
| `--report-type` | `FINANCIAL` (monthly totals) or `FINANCE_DETAIL` (with transaction and settlement dates). Required. | — |
| `--region` | Region code: a country (`US`, `JP`, …), an aggregate (`EU`, `LL`, `AP`, `WW`), `ZZ` for all regions in one file (with `FINANCIAL`) or `Z1` (the only region `FINANCE_DETAIL` accepts). See [finance regions](https://air.build/docs/cli/asc-analytics/#finance-regions). Required. | — |
| `--date` | Apple fiscal month, `YYYY-MM`. Required. | — |
| `--decompress` | Save a `.tsv` instead of `.tsv.gz`. | off |
| `--output` | File path to write. | `finance_report_DATE_TYPE_REGION.tsv.gz` |
| `--output-format` | Format of the summary: `json`, `table`, `markdown`. | `json` |

Transaction Tax reports are not available this way; download them in App Store Connect under Payments and Financial Reports.

```sh
asc finance reports --vendor "12345678" --report-type FINANCIAL --region "ZZ" --date "2025-12"
```

## finance regions

Lists the region codes `finance reports --region` accepts, with their currencies. It needs no flags of its own.

```sh
asc finance regions --output table
```

## vendor-number list

Prints the stored vendor numbers, one row each, with the legal entity they belong to and the units Apple last reported sold against them. It reads what AirBuild already stores, without asking Apple.

| Flag | What it does | Default |
| --- | --- | --- |
| `--auth` | Only this Apple team. | every connected team |

```sh
asc vendor-number list
```

## vendor-number refresh

Reads the vendor numbers from Apple again through the Team owner's App Store Connect account, one Apple team at a time, then prints them as `list` does.

| Flag | What it does | Default |
| --- | --- | --- |
| `--auth` | The Apple team. Required when several teams are connected. | the only connected team |

```sh
asc vendor-number refresh --auth NAME
```

## insights weekly

Compares an app's metrics for one week with the week before and prints the summary (JSON by default; `--output table` or `markdown` to render it). With `--source sales`, totals are scoped to the app and include its in-app purchases and subscriptions, matched by Parent Identifier against the app's SKU.

| Flag | What it does | Default |
| --- | --- | --- |
| `--app` | The app ID (or `ASC_APP_ID`). Required. | — |
| `--source` | `analytics` or `sales`. Required. | — |
| `--week` | First day of the week, `YYYY-MM-DD`. Required. | — |
| `--vendor` | Vendor number. Or set `ASC_VENDOR_NUMBER`. Required with `--source sales`. | — |

```sh
asc insights weekly --app "1234567890" --source sales --week "2026-02-16" --vendor "12345678"
```

## insights daily

Compares one day's subscription renewals for an app with the day before, from sales reports. Renewals are the rows whose Subscription column is `Renewal`, for products linked to the app.

| Flag | What it does | Default |
| --- | --- | --- |
| `--app` | The app ID (or `ASC_APP_ID`). Required. | — |
| `--vendor` | Vendor number. Or set `ASC_VENDOR_NUMBER`. Required. | — |
| `--date` | The day, `YYYY-MM-DD`. Required. | — |

```sh
asc insights daily --app "1234567890" --vendor "12345678" --date "2026-02-20"
```

## Examples

Find the vendor number, then download yesterday's sales summary as TSV:

```bash
asc vendor-number list
asc analytics sales --vendor "VENDOR_NUMBER" --type SALES --subtype SUMMARY --frequency DAILY --date 2026-11-17 --decompress
```

This week against last week, from sales data:

```bash
asc insights weekly --app "APP_ID" --source sales --week "2026-11-16" --vendor "VENDOR_NUMBER"
```

Diagnostics for a build:

```bash
asc performance diagnostics list --build-id "BUILD_ID"
```
