Bulk exports are the Data plan's answer to pagination. Instead of walking a season match by match, queue one job and receive a file: sixteen datasets, in gzipped NDJSON or Parquet, filtered by league, season or date.
A job is asynchronous. POST /v1/exports returns an ID, the job moves from queued to running to finished, and GET /v1/exports/{id} returns a signed URL valid for 15 minutes. The API never streams the file itself; the 30-second write timeout is why.
Files carry the internal integer IDs, and the reference datasets also carry the opaque m_, t_ and p_ tokens, so a downloaded row can be turned back into a request. One file is capped at 2 GiB, jobs are retained for seven days, and the daily allowance is 25 jobs.
Bulk exports
Part of the Data plan. Instead of paging through the API, queue one job and download one file. A job is a dataset plus optional filters; twenty-five jobs a day, and a finished file is downloadable for seven days.
Datasets
| Name | Contains |
|---|---|
matches | One row per match: competition, season, teams, date, score, status. |
teams | Every team with its opaque t_ id. Join team_id to id. |
players | Every player with its opaque p_ id. Join player_id to id. |
shots | Every shot with pitch coordinates, xG and xGOT. |
events | Goals, cards and substitutions with minute and score. |
lineups | Team sheets; starters and substitutes as JSON. |
player_stats | Per player, per match statistics as JSON. |
match_stats | Team statistics in long form, one row per key. |
advanced_teams | The full per-team analytics rollup: xT, PV, PPDA, territory, tempo. |
advanced_players | The same rollup per player, goalkeeper figures included. |
player_halves | Each player's stat line per half, as JSON. |
momentum | Momentum per match, one row per minute. |
heatmaps | Action heatmaps per team and per player, cells as JSON. |
pass_networks | One row per team per match: the window and its centralisation. |
pass_network_nodes | Pass volume, average passing position and graph measures per player. |
pass_network_edges | One row per passing pair, directed. |
The last eight are the derived tables: the advanced rollup, the per-half player lines, momentum, heatmaps and the pass networks. They are built by the same pipeline that serves /matches/{id}/advanced, so a warehouse gets the same numbers as the API — the metrics were the one thing a bulk export could not carry.
Formats
ndjson is line-delimited JSON, gzipped — readable with jq, streamable into a queue, no parser needed. parquet is typed and columnar, read directly by DuckDB, pandas, Spark and BigQuery. Rates are null when undefined, never zero.
Queue, poll, download
# 1. queue — 202 with the job curl -X POST https://api.pitchapi.dev/v1/exports \ -H "X-API-KEY: pk_live_..." -H "Content-Type: application/json" \ -d '{"dataset":"shots","format":"parquet","season":"2025/2026"}' # 2. poll until status is "ready" curl https://api.pitchapi.dev/v1/exports/ex_T4nV8s -H "X-API-KEY: pk_live_..." # 3. download_url is a signed link, valid for 15 minutes curl -o shots.parquet "https://<bucket>.r2.cloudflarestorage.com/exports/...?X-Amz-..."
Filters combine freely and each is optional: league (an l_ id), season (2025/2026 or 2026), and from/to as YYYY-MM-DD. Omit them all for the whole archive. teams and players are not match-scoped, so they take no filters and a request that sends one is refused. Ask for a fresh link with another GET rather than storing one — it expires.
One file is capped at 2 GiB. A job that would pass the cap fails with export exceeds the size limit and no partial file is kept, so the fix is a narrower filter — a season, or a date range — not a retry.
Joining to the API
Files use the internal integer ids, because that is what joins one dataset to another without a lookup: shots.match_id is matches.id. Every id-bearing dataset also carries the opaque token the API serves — id_token on matches (m_), teams (t_) and players (p_). Join to those three to turn any integer in any file into an API call.
-- one match, with the token the API understands SELECT m.id_token, m.home_team_id, m.score_home, m.score_away FROM 'matches.parquet' m WHERE m.match_date >= DATE '2026-11-01'; -- xG per match, straight from the shot file SELECT match_id, sum(expected_goals) AS xg, count(*) AS shots FROM 'shots.parquet' GROUP BY match_id ORDER BY xg DESC LIMIT 10;
Endpoints
Every request takes an X-API-KEY header and returns the JSON envelope described on the overview.
List export datasets
The sixteen exportable datasets and the columns each one contains. Files use the internal integer ids so the datasets join to each other, and the three reference datasets — matches, teams and players — also carry id_token, the opaque ID the API serves, which is what a stored id needs to become an API call. The derived datasets carry the analytics that the REST API serves under /advanced, per half and per network: the same numbers, in one file.
curl https://api.pitchapi.dev/v1/exports/datasets \
-H "X-API-KEY: $PITCH_KEY"Create an export
Queues a job and answers 202 with the job. The file is built in the background; poll the job until its status is ready.
curl -X POST https://api.pitchapi.dev/v1/exports \
-H "X-API-KEY: $PITCH_KEY"List exports
The twenty most recent jobs on the account, newest first.
curl https://api.pitchapi.dev/v1/exports \
-H "X-API-KEY: $PITCH_KEY"Retrieve an export
The job's status, and once it is ready, a signed download URL valid for fifteen minutes.
curl https://api.pitchapi.dev/v1/exports/{id} \
-H "X-API-KEY: $PITCH_KEY"Delete an export
Removes the job and the stored file. Answers 204.
curl https://api.pitchapi.dev/v1/exports/{id} \
-H "X-API-KEY: $PITCH_KEY"Common questions
- How long is the download link valid?
- Fifteen minutes. The job record is kept after that, so you can request a fresh link with
GET /v1/exports/{id}without rebuilding the file. - What happens if an export is larger than 2 GiB?
- The job fails rather than filling the disk. Narrow the range, split by season or league, and export in more than one file.