Skip to content

API reference

Read an export

GET
/v1/exports/{exportId}

Returns the export owned by the key’s workspace. A successful GET is 200 for every state, failed, expired and erased included: inspect state and errorCode. A file lives for 7 days from the creation of the export, then the export reads expired. An export whose file was removed because a field it carries was switched off for output reads erased.

A CSV opened on its own carries no freshness or limitation flags. They are repeated here, and so is the source of a YouTube export (sourceAttribution). A manifest.json is written beside the file but no route serves it yet.

exportId
required
string
/^[A-Za-z0-9_-]{1,128}$/

The current export record. A succeeded export’s file is at /v1/exports/{exportId}/file.

The export row as a caller may see it. Closed, so a field not listed here is not returned.

object
exportId
required
string
/^[A-Za-z0-9_-]{1,128}$/
state
required

pending and running are in progress. succeeded has a file. failed has none and names errorCode. expired is a file removed after 7 days. erased is a file removed because a field it carries was switched off for output.

string
Allowed values: pending running succeeded failed expired erased
format
required
string
Allowed values: csv parquet
requestId
required

The X-Request-Id of the create call.

string format: uuid
createdAt
required
string format: date-time
expiresAt
required

When the file is removed. null until the export succeeds.

string | null format: date-time
rows
required

Rows written, header excluded. null until the export succeeds. Equal to the rows the pinned query returns, or the export fails.

integer | null
bytes
required
integer | null
sha256
required

Digest of the file, as written.

string | null
/^[0-9a-f]{64}$/
errorCode
required

Why a failed export failed; null in every other state.

string | null
Allowed values: export_too_large data_superseded query_unavailable export_unavailable forbidden export_integrity_failed
fields
required

The field ids of the file’s columns, in order. They are the header row.

Array<string>
freshness
required

From the extraction instants of the pinned snapshots, copied from the query result at plan time; null when the publication carries none. Over several sources one record spans them: the oldest and newest extraction of any source, stale when any source is stale by its own threshold, and the smallest of their thresholds.

object
oldestExtractedAt
required
string format: date-time
newestExtractedAt
required
string format: date-time
stale
required

True when the oldest snapshot is older than thresholdHours.

boolean
thresholdHours
required

Hours after which the oldest snapshot is stale: two effective refresh cadences plus the source finality lag.

number
> 0
flags
required

The profile’s limitations, then the pinned generation’s history limitations (Shopify commerce, sorted), then, over several sources, account_local_dates when the accounts’ time zones differ, then stale_source_snapshot when the pinned snapshot is stale (for any source). Surface them wherever the number is shown.

Array<string>
sourceAttribution

Present on an export of a YouTube profile only, copied from the query result at plan time. The CSV has no room for it (its first line is the header row), so show it with the file wherever the file is offered.

object
source
required
string
Allowed value: youtube
label
required
string
Allowed value: YouTube
notice
required
string
Allowed value: Data from YouTube. Values exactly as the YouTube Analytics API returned them.
channelId
required

The channel the values were read from (the request’s account).

string
/^UC[A-Za-z0-9_-]{22}$/
channelUrl
required

The channel’s public YouTube page.

string format: uri
/^https://www\.youtube\.com/channel/UC[A-Za-z0-9_-]{22}$/
analyticsUrl
required

The channel’s analytics page in YouTube Studio.

string format: uri
/^https://studio\.youtube\.com/channel/UC[A-Za-z0-9_-]{22}/analytics$/
csv
required

The CSV options of a CSV export; null for a Parquet export.

object
bom
required
boolean
formulaNeutralization
required

Text columns only; a value starting with =, +, -, @, a tab or a carriage return is prefixed with a single quote.

string
Allowed value: text-columns-single-quote
Example
{
"exportId": "exp_8d2c41f0a6",
"state": "succeeded",
"format": "csv",
"requestId": "7b6b8f4e-3d0b-4f64-9a43-2f8f5f1d2a10",
"createdAt": "2026-10-26T09:30:00.000Z",
"expiresAt": "2026-11-02T09:30:00.000Z",
"rows": 5,
"bytes": 103,
"sha256": "3f786850e387550fdab836ed7e6dc881de23001b3f786850e387550fdab836ed",
"errorCode": null,
"fields": [
"date",
"sessions"
],
"freshness": {
"oldestExtractedAt": "2026-09-04T01:02:03.000Z",
"newestExtractedAt": "2026-09-05T01:02:03.000Z",
"stale": true,
"thresholdHours": 26
},
"flags": [
"provider_may_revise_recent_data",
"not_independently_reconciled",
"stale_source_snapshot"
],
"csv": {
"bom": true,
"formulaNeutralization": "text-columns-single-quote"
}
}

invalid_query — the URL carried a query delimiter. This route reads no query parameters.

object
error
required
object
code
required
string
message
required
string
error
object
code
Allowed value: invalid_query

unauthorized — missing, unknown, expired or revoked key.

object
error
required
object
code
required
string
message
required
string
error
object
code
Allowed value: unauthorized
WWW-Authenticate
required
string
Allowed value: Bearer

forbidden — the key lacks the required scope, or the workspace has no plan that allows this.

object
error
required
object
code
required
string
message
required
string
error
object
code
Allowed value: forbidden

export_not_found — the workspace has no such export. An export of another workspace is indistinguishable from one that does not exist.

object
error
required
object
code
required
string
message
required
string
error
object
code
Allowed value: export_not_found

method_not_allowed — Allow names the method this route accepts.

object
error
required
object
code
required
string
message
required
string
error
object
code
Allowed value: method_not_allowed
Allow
required
string
Allowed value: GET

rate_limited — the key’s or its workspace’s per-plan request allowance for this route’s class is used up. It is answered after authentication, on every API-key operation in this document and on MCP, and never on /health. A download link is limited the same way, after its lookup, by the key that issued it and the export’s workspace. Retry-After is the window in seconds and RateLimit-Limit is the limit of the bucket that refused. No remaining count is returned. The limits themselves are not published here.

object
error
required
object
code
required
string
message
required
string
error
object
code
Allowed value: rate_limited
Retry-After
required
string
/^[1-9][0-9]*$/
RateLimit-Limit
required
string
/^[1-9][0-9]*$/

export_unavailable — the export store could not be reached. Retry with backoff.

object
error
required
object
code
required
string
message
required
string
error
object
code
Allowed value: export_unavailable