Load App Store Connect data to Amazon Athena
Build a App Store Connect to Amazon Athena pipeline with your coding agent. One prompt scaffolds it with the dltHub AI harness, plus the App Store Connect API base URL, auth, endpoints, and incremental loading.
Apple App Store Connect API is a REST API for automating actions and accessing data in App Store Connect. Everything needed to build a working App Store Connect → Amazon Athena pipeline is on this page: the API's base URL, authentication, endpoints, pagination and incremental field — plus a prompt that hands the whole job to your coding agent.
Build your App Store Connect to Amazon Athena pipeline
Paste this prompt into Claude, Codex, or Cursor. The agent does the rest.
uvx dlthub-init@latest to build a pipeline from App Store Connect to Amazon Athena and run it on dltHubThat scaffolds a dltHub workspace and installs the dltHub AI harness — the project rules, the secrets-management skill, and the dlt MCP server your agent needs to work safely. From there it reads the App Store Connect API, proposes the endpoints to load, then writes, runs and validates the pipeline while you review rather than type. Credentials are inspected through MCP tools, so your agent never reads secrets.toml itself. How the LLM-native workflow works →
Prefer to write it yourself? Every fact the agent uses is below.
App Store Connect API at a glance
| Base URL | https://api.appstoreconnect.apple.com/v1 |
| Example endpoint | GET apps |
| Records found at | data |
| Authentication | all requests require an ES256-signed JWT bearer token — sent in the Authorization header, prefixed Bearer |
| Pagination | Cursor-based via cursor, next cursor at links.next, page size via limit (default 50, max 200). App Store Connect uses cursor-based pagination for list endpoints. Set the page size with the limit query parameter; the documented/open-source specification gives a default of 50 and maximum of 200, although individual endpoints can impose lower limits. The response exposes the continuation as links.next, a URL containing an opaque cursor; follow that URL or extract its cursor and send it as cursor on the next request. A date filter is an ordinary endpoint-specific filter and does not replace pagination. |
| Incremental field | updatedDate |
| Record id | id |
| API reference | https://developer.apple.com/documentation/appstoreconnectapi/generating-tokens-for-api-requests.md |
These values come from the App Store Connect API reference — the authoritative source if anything here looks out of date.
How do I authenticate with the App Store Connect API?
Generate a JWT with header alg=ES256, kid=, and typ=JWT; payload includes iss=, aud=appstoreconnect-v1, and exp. Sign it with the downloaded .p8 private key and send it on every request as Authorization: Bearer . The documented request examples do not require an additional header.
1. Get your credentials
- Sign in to App Store Connect as the Account Holder and request App Store Connect API access: Users and Access → Integrations → App Store Connect API → Request Access, accept the terms, and submit. 2. For a team-wide credential, remain in Users and Access → Integrations → App Store Connect API, open Team Keys, click Generate API Key (or +), enter a reference name, choose the required role permissions, and click Generate. Copy the Issuer ID shown on the API page and the generated Key ID. Download the private .p8 key immediately; Apple provides the private key download only at creation. 3. Alternatively, an individual user can create an individual key from the App Store Connect username menu → Edit Profile → Individual API Key → Generate Key → Download; it uses that user’s permissions. 4. Create a short-lived JWT for each request: header alg=ES256, kid=Key ID, typ=JWT; team-key payload iss=Issuer ID, iat=current Unix time, exp no more than 20 minutes after iat, and aud=appstoreconnect-v1. Sign with the downloaded .p8 private key and send Authorization: Bearer to https://api.appstoreconnect.apple.com. Store the .p8 securely and never commit it to source control.
2. Add them to .dlt/secrets.toml
[sources.app_store_connect_source] issuer_id = "your_issuer_id_uuid" key_id = "your_key_id" private_key = "-----BEGIN PRIVATE KEY-----\nYOUR_P8_KEY_CONTENT\n-----END PRIVATE KEY-----"
dlt reads this file automatically at runtime. With the harness, the setup-secrets skill prompts you for the values and never handles the raw credential in chat. For production, see setting up credentials with dlt.
What App Store Connect data can I load into Amazon Athena?
These are the App Store Connect endpoints dlt can load into Amazon Athena:
| Resource | Endpoint | Method | Data selector | Description |
|---|---|---|---|---|
| apps | apps | GET | data | List apps; supports filters, sorting, includes, and limit. |
| actors | actors | GET | data | List actors; documented maximum limit is 200. |
| app_price_points | apps/{id}/appPricePoints | GET | data | List price points for an app. |
| game_center_leaderboard_sets_v2 | gameCenterDetails/{id}/gameCenterLeaderboardSetsV2 | GET | data | List leaderboard sets for a Game Center detail. |
| game_center_leaderboards_v2 | gameCenterDetails/{id}/gameCenterLeaderboardsV2 | GET | data | List leaderboards for a Game Center detail. |
| scm_providers | scmProviders | GET | data | List source-control providers. |
| ci_products | ciProducts | GET | data | List Xcode Cloud products. |
| app_availabilities_v2 | v2/appAvailabilities | POST | data | Create/query-style v2 app-availability operations; not a GET list endpoint. |
How do I load only new App Store Connect records?
App Store Connect exposes updatedDate on apps, so dlt can request only the records that changed since the last run. Set it as the cursor_path and dlt tracks the high-water mark for you between runs.
{"name": "apps", "endpoint": { "path": "apps", "data_selector": "data", "incremental": {"cursor_path": "updatedDate", "initial_value": "2024-01-01T00:00:00Z"}, }}
On the first run dlt loads everything from initial_value; on every run after that it requests only what changed and appends with write_disposition="merge" if you set a primary key. See incremental loading.
What does the generated App Store Connect pipeline look like?
A standard dlt REST API pipeline — the same code you would write by hand, loading apps and salesReports from the App Store Connect API into Amazon Athena:
import dlt from dlt.sources.rest_api import RESTAPIConfig, rest_api_resources @dlt.source def app_store_connect_source(api_key=dlt.secrets.value): config: RESTAPIConfig = { "client": { "base_url": "https://api.appstoreconnect.apple.com/v1", "auth": {"type": "bearer", "token": api_key}, }, "resources": [ {"name": "apps", "endpoint": {"path": "apps", "data_selector": "data"}}, {"name": "actors", "endpoint": {"path": "actors", "data_selector": "data"}} ], } yield from rest_api_resources(config) def load_app_store_connect_to_athena() -> None: pipeline = dlt.pipeline( pipeline_name="app_store_connect_pipeline", destination="athena", staging="filesystem", dataset_name="app_store_connect_data", ) load_info = pipeline.run(app_store_connect_source()) print(load_info) if __name__ == "__main__": load_app_store_connect_to_athena()
Run it with uv run python app_store_connect_pipeline.py. The agent iterates on this until it loads cleanly — you review and approve, rather than write it from scratch.
How do I configure Amazon Athena as the destination?
Amazon Athena queries files in S3, so dlt first writes the data to an S3 bucket through its filesystem staging destination; that is the staging="filesystem" in the code above. Install the extra with uv add "dlt[athena]", then add the staging bucket and the Amazon Athena settings to .dlt/secrets.toml:
[destination.filesystem] bucket_url = "s3://<staging bucket>" [destination.filesystem.credentials] aws_access_key_id = "<access key id>" aws_secret_access_key = "<secret access key>" [destination.athena] query_result_bucket = "s3://<query results bucket>" [destination.athena.credentials] aws_access_key_id = "<access key id>" aws_secret_access_key = "<secret access key>" region_name = "<region>"
Set athena_work_group under [destination.athena] to run the queries in a specific workgroup. See the dlt Amazon Athena destination docs.
How do I query App Store Connect data in Amazon Athena?
After a run, pipeline.dataset() holds the loaded tables, one per resource. A Relation is a query on that dataset, either a whole table or a SQL string, and reading it gives you the data as a Pandas DataFrame, a PyArrow table or Python tuples. Nothing is read until you ask for it.
import dlt pipeline = dlt.pipeline("app_store_connect_pipeline") # Step 1: Get the dataset from the pipeline dataset = pipeline.dataset() # Step 2: Get a Relation, either a whole table... apps = dataset.table("apps") # ...or any SQL query against Amazon Athena sample = dataset("SELECT * FROM apps LIMIT 100") # Step 3: Read the data df = apps.df() # or .df(chunk_size=50) for a large table arrow_table = sample.arrow() # a PyArrow Table rows = sample.fetchall() # a list of Python tuples # Which tables were loaded, and how big are they? print(dataset.row_counts().df()) """ table_name row_count 0 apps 13 1 actors 3 """
The columns are the fields the App Store Connect API returns. Your agent can run the same queries through the MCP server's execute_sql_query tool, and uv run dlthub show opens the Pipeline Dashboard with the schema, load metrics and a query box. See access loaded data in Python and exploring it in marimo notebooks.
How do I deploy the App Store Connect to Amazon Athena pipeline in production?
The pipeline runs locally, which is ideal for prototyping and one-off analysis. When you need it on a schedule, monitored on every load, and shared with your team, deploy the same dlt code on the dltHub platform — no infrastructure to maintain. The prompt above already ends with "run it on dltHub", so your agent can take it there directly.
- Deploy & schedule — run the pipeline as a managed job with automatic retries.
- Monitor — observable job queues, alerting, and load metrics for every run.
- Transform — promote raw App Store Connect loads into governed, documented models.
- Visualize & share — explore data in notebooks and publish live dashboards instead of static screenshots.
What other destinations can I load App Store Connect data to?
dlt loads into any of these — only the destination argument changes:
| Destination | Example value |
|---|---|
| PostgreSQL | "postgres" |
| BigQuery | "bigquery" |
| Snowflake | "snowflake" |
| Redshift | "redshift" |
| Databricks | "databricks" |
| Filesystem (S3, GCS, Azure) | "filesystem" |
Set dlt.pipeline(destination="snowflake") and add credentials in .dlt/secrets.toml. On the dltHub platform the same pipeline runs against a managed Iceberg lakehouse. See the full destinations list.
Next steps
Was this page helpful?
Community Hub
Need more dlt context for App Store Connect to Amazon Athena?
Request dlt skills, commands, AGENT.md files, and AI-native context.