# App Store Subscription Period Report (`afkdigital/app-store-subscription-period-report`) Actor

Analyze Apple Sales & Trends Subscription, Subscription Event and Subscriber exports. Separate offers, refunds and currencies with file/line evidence. No Apple login. Period counts; no inferred cohort rates.

- **URL**: https://apify.com/afkdigital/app-store-subscription-period-report.md
- **Developed by:** [AFK Digital](https://apify.com/afkdigital) (community)
- **Categories:** Business
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$500.00 / 1,000 application and period analyses

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## App Store Subscription Period Report

Analyze your own Apple Sales & Trends exports without Apple credentials. This is a period reporting utility, not a person-level retention or cohort-rate calculator.

### Supported exports

Apple v1_3 Subscription Event, Subscription and Subscriber reports, with original English headers, UTF-8 tab-separated text or CSV, optionally gzip via key-value-store upload. Other Apple Analytics, financial, sales summary and win-back eligibility reports are not supported.

Common required fields: App Apple ID, Subscription Apple ID, Country. Event additionally requires Event Date, Event, Quantity. Subscriber additionally requires Event Date, Customer Price, Customer Currency, Units, Refund. Subscription requires Active Standard Price Subscriptions and explicit file reportDate (YYYY-MM-DD) because this snapshot export has no event date. Optional offer separation uses Subscription Offer Type, Subscription Offer Name and Promotional Offer ID; missing fields remain not_reported. Product IDs are Apple's numeric Subscription Apple IDs, not SKU strings.

### Input

reportFiles: 1–64 objects with unique id and either content or key plus optional storeId. Upload a file as a raw KVS record, then supply its key and storeId, and select that store in fileStores to grant read-only access. No arbitrary URL fetching, account connection or API key needed. reportTypeMapping maps each id to subscription_event, subscription or subscriber. analysisPeriod requires ISO start/end dates, inclusive, max 366 days. productFilter and countryFilter are optional arrays. maxRows defaults 50000, hard limit 100000 across all unique files before filtering. Max 10 MiB decompressed per file and 30 MiB total. Whole-file duplicates by SHA256 are skipped. Changed or overlapping exports are not deduplicated; upload non-overlapping official daily exports from one developer/vendor scope only. Identical rows within a file are preserved.

cohortDefinition.mode defaults period. original_start_month groups Event rows by Original Start Date only when present, labeled descriptive event groups, never person cohorts. Subscriber IDs are not linked or exposed. No claim of longitudinal retention, trial conversion rate or complete cohort observation is made. Rate and eligible_count are null because these reports do not establish a verified eligibility denominator. Missing report days remain unknown, not zero. Empty or header-only reports cannot establish completeness. Analysis dates follow Apple's Pacific reporting dates.

### Output and definitions

Dataset exports JSON/CSV. KVS OUTPUT, OUTPUT.csv and SUMMARY provide full results, formula-safe CSV and input manifest. Evidence includes file SHA256 and source record ending line, capped at 50 references per group with full evidence_row_count. Snapshot values retain snapshot_date and are never summed across days.

See docs/METRICS.md. Each source event is kept separately. Refunds and refund reversals are separate. Subscriber paid transactions cannot reliably distinguish initial paid periods, renewals or reactivation, so are explicitly unclassified. No monetary totals are computed; Customer Currency stays separate and Developer Proceeds/Proceeds Currency are never treated as customer sales or bank payouts.

### Pricing

$0.50 per successfully analyzed app and requested period, including all products/countries/offers within a run's 100000-row / 30 MiB / 64-file limits. One unit per unique App Apple ID and analysisPeriod; empty result runs have zero units. A new run is a new analysis. Platform usage included. Charged via app-period-analysis. Insufficient budget withholds the entire unpaid app group; SUMMARY reports charged and withheld units. Empty/invalid analyses do not trigger charges. Approved by the owner on 2026-11-12.

### Privacy

Report values and subscriber IDs are not logged. Results are stored in the customer's Apify run Dataset/KVS; apply your own access and retention policy. Do not upload third-party data without authorization. Apify platform input storage may retain uploaded input content; prefer private KVS records for real files.

### Verified official references (2026-11-12)

- https://developer.apple.com/help/app-store-connect/reference/reporting/subscription-report/
- https://developer.apple.com/help/app-store-connect/reference/reporting/subscription-event-report/
- https://developer.apple.com/help/app-store-connect/reference/reporting/subscriber-report/
- https://developer.apple.com/help/app-store-connect/reference/reporting/subscription-events/
- https://docs.apify.com/actors/monetize/pricing-and-costs

Run tests: python -m unittest discover -s tests -v. Empty Actor input runs a tiny synthetic demo. Not affiliated with Apple.

# Actor input Schema

## `reportFiles` (type: `array`):

Objects: id, content OR key/storeId; reportDate for subscription snapshots.

## `reportTypeMapping` (type: `object`):

Report type mapping; see README for exact structure and limits.

## `analysisPeriod` (type: `object`):

Analysis period; see README for exact structure and limits.

## `cohortDefinition` (type: `object`):

Grouping definition; see README for exact structure and limits.

## `productFilter` (type: `array`):

Product IDs; see README for exact structure and limits.

## `countryFilter` (type: `array`):

Countries; see README for exact structure and limits.

## `maxRows` (type: `integer`):

Maximum input rows; see README for exact structure and limits.

## `fileStores` (type: `array`):

Select only the KVS stores containing your uploaded files to grant read access.

## Actor input object example

```json
{
  "maxRows": 50000
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `summary` (type: `string`):

No description

## `csv` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("afkdigital/app-store-subscription-period-report").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("afkdigital/app-store-subscription-period-report").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call afkdigital/app-store-subscription-period-report --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,afkdigital/app-store-subscription-period-report"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/DiDA6ekhmgHhhs4Ur/builds/izDgiJYwu18tgfhs4/openapi.json
