Read a stored GA4 report or query the connected property live
/sites/{site_id}/ga4/reports/{report_type}analytics:readRequires analytics:read and a granted site. Satellite chooses the connected property and mandatory hostname/business-unit path scope. Property IDs and arbitrary metrics, dimensions, or filters are not accepted. Stored mode matches the exact current property, scope, report, and window in the canonical store; it never reads the retired snapshot cache or falls back to live. Stored results include coverage, publication provenance, all collected metric/dimension columns, and the total stored row count. Missing data returns 202 with state pending; partial daily coverage returns 200 with state partial and missing_days. POST this path with the same parameters as JSON to prepare missing data on the regular async worker; poll returned job IDs and repeat GET. Live uses the saved Google connection and one upstream request per page. OAuth refresh may persist credentials; dashboard caches and monthly rollups are not updated. Live is aggregate reporting, not realtime events. Existing keys do not gain analytics:read automatically.
| Request | GET https://satelliteai.io/api/v1/sites/{site_id}/ga4/reports/{report_type} |
| Permission | analytics:read |
| Response | A single object: data is Ga4Report, or null when nothing is stored. |
| Operation ID | getGa4Report |
Upstream reference: Underlying Google Analytics Data API runReport.
More context and worked examples are in the developer guide.
Example request
curl --fail-with-body \
'https://satelliteai.io/api/v1/sites/123/ga4/reports/sessions_over_time' \
-H "Authorization: Bearer $SATELLITE_API_KEY"Replace the example IDs with values returned by the discovery endpoints. Example values are placeholders, not real records.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
site_idrequired | path | integer | ID from GET /sites. min 1 |
report_typerequired | path | string | one of: summary_kpis, sessions_over_time, channel_summary, page_traffic, landing_page, device_split, geo, new_vs_returning, audience_funnel, audience_by_source, audience_by_channel, campaign_summary, audience_by_campaign, events_by_page, utm_breakdown, file_downloads |
source | query | string | Stored reads published GA4 facts without calling Google. Live queries Google once per page. one of: stored, live · default stored |
days | query | integer | Instead of explicit start_date/end_date, select this many completed property-local days for stored reports (days=28 spans 28 dates). For live reports the interval remains today minus this many days through today inclusive. Cannot be combined with explicit dates. default 28 · min 1 · max 365 |
start_date | query | string (date) | Strict YYYY-MM-DD. Stored reports accept only completed days in the property timezone. Supply with end_date instead of days; maximum 366 inclusive dates. pattern ^\d{4}-\d{2}-\d{2}$ |
end_date | query | string (date) | Strict YYYY-MM-DD, on or after start_date. Stored reports exclude today in the property timezone; live allows today. Both dates are required together. pattern ^\d{4}-\d{2}-\d{2}$ |
snapshot_date | query | string (date) | Retired cache selector. Returns 400; use explicit dates and report_set_id instead. pattern ^\d{4}-\d{2}-\d{2}$ |
report_set_id | query | integer (int64) | Pin an exact-range stored report for pagination. Not used for daily sessions_over_time or audience_funnel, or for live reports. min 1 |
limit | query | integer | Maximum rows per page. default 50 · min 1 · max 100 |
offset | query | integer | Zero-based row offset. Use meta.next_offset with unchanged filters; no cursor is accepted. default 0 · min 0 · max 100000 |
Unknown or repeated query parameters return 400.
Data dictionary
Matching GA4 report, including an available report with zero rows or partial daily coverage. Stored reports come from the canonical GA4 store. Missing intervals return a pending object; available reports can have an empty rows array. Use report_set_id to pin exact-range pages. Daily history and live Google results can change during pagination.
202: Requested stored interval is pending. POST the same parameters to prepare it, poll collection jobs if present, and repeat GET.
[] marks an array element. nullable means the value can be null; treat it as unknown, not zero. always present means the key is always included in the object.
| Field | Type | Description |
|---|---|---|
data.site_id | integeralways present | Satellite site ID (from GET /sites). min 1 |
data.report_type | stringalways present | |
data.source | stringalways present | one of: stored, live |
data.date_range | objectalways present | |
data.date_range.start_date | string (date)nullablealways present | |
data.date_range.end_date | string (date)nullablealways present | |
data.snapshot_date | string (date)nullablealways present | Null; canonical reports use explicit intervals and optional report_set_id. |
data.fetched_at | string (date-time)nullablealways present | UTC publication or live fetch timestamp; null when no rows have been published. |
data.stale | booleanalways present | True when the store identifies a pinned report as stale. False for live requests. |
data.rows | array of map of stringalways present | |
data.row_count | integeralways present | Total matching published rows for stored; Google's matching rowCount for live. Consult coverage for missing dates. min 0 |
data.row_count_is_total | booleanalways present | True for the stored matching row count and live Google rowCount. Incomplete daily coverage does not imply complete interval data; consult state and missing_days. |
data.report_metadata | objectnullablealways present | Allowlisted stored provenance/coverage or Google quality fields. Unrecorded metadata is unknown. |
data.report_metadata.state | string | one of: ready, pending, partial, unsupported, empty_period |
data.report_metadata.source | string | |
data.report_metadata.dataset | string | |
data.report_metadata.definition_version | integer | |
data.report_metadata.binding_id | integer | |
data.report_metadata.connection_revision | integer | |
data.report_metadata.timezone | string | |
data.report_metadata.start | string (date) | |
data.report_metadata.end | string (date) | |
data.report_metadata.currency_code | stringnullable | |
data.report_metadata.report_set_id | integernullable | |
data.report_metadata.report_state | stringnullable | |
data.report_metadata.publication_watermark | stringnullable | |
data.report_metadata.aggregation | string | |
data.report_metadata.missing_days | integer | |
data.report_metadata.reason | string | |
data.report_metadata.quality | array of object | |
data.report_metadata.collection | object | |
data.report_metadata.collection.state | string | |
data.report_metadata.collection.jobs | array of object | |
data.report_metadata.collection.jobs[].job_id | string | |
data.report_metadata.collection.jobs[].status | string | |
data.report_metadata.collection.jobs[].status_url | string | |
data.report_metadata.dataLossFromOtherRow | boolean | |
data.report_metadata.subjectToThresholding | boolean | |
data.report_metadata.emptyReason | string | |
data.report_metadata.currencyCode | string | |
data.report_metadata.timeZone | string | |
data.report_metadata.samplingMetadatas | array of object | |
data.report_metadata.samplingMetadatas[].samplesReadCount | string | |
data.report_metadata.samplingMetadatas[].samplingSpaceSize | string |
Response metadata
| Field | Type | Description |
|---|---|---|
meta.request_id | string | Request identifier; also returned in X-Request-ID. Include it in support requests. |
meta.api_version | string | API version that produced the response. one of: v1 |
meta.limit | integeralways present | Maximum records per page applied to this request. min 1 · max 100 |
meta.has_more | booleanalways present | Another page is available within the API offset bound. |
meta.next_cursor | stringnullable | Opaque cursor for the next page; send as cursor. Null on the last page. |
meta.availability | stringalways present | available when stored data exists; not_available when it does not. one of: available, not_available |
meta.billing | object | Present for paid live SERP requests; replayed receipts describe the original debit, not an additional charge. |
meta.billing.operation | stringalways present | one of: client_api_serp_refresh |
meta.billing.credits_charged | integeralways present | min 0 |
meta.billing.transaction_id | integeralways present | |
meta.billing.replayed | booleanalways present | |
meta.state | string | one of: ready, pending, partial, unsupported, empty_period |
meta.offset | integeralways present | min 0 · max 100000 |
meta.next_offset | integernullablealways present | Next allowed row offset, or null when traversal stops. min 0 · max 100000 |
meta.offset_limit_reached | booleanalways present | More rows remain beyond the API offset cap; narrow the date range. |
Error responses
Errors return {"error": {"code", "message", "request_id"}}. See error handling for retry guidance.
| HTTP | When |
|---|---|
400 | Invalid query, unsupported report type, dates, limit, or offset. |
401 | Missing, invalid, expired, or revoked API credential. |
403 | Missing analytics:read, disabled integration, or disabled company API access. |
404 | Missing or inaccessible site, or the feature is globally disabled. |
409 | GA4 connection needs attention. Codes are ga4_not_connected, ga4_property_required, ga4_reconnect_required, ga4_connection_changed, or ga4_scope_unavailable. |
413 | Report or response exceeds the configured retrieval size limit. |
429 | Satellite request or shared GA4 property quota exceeded, including Google's quota. Honor Retry-After. Codes include rate_limit_exceeded and ga4_quota_exceeded. |
502 | ga4_upstream_error or ga4_invalid_report; Google failed or a report was unusable. |
503 | A required dependency is unavailable. |
504 | ga4_timeout; the Google request exceeded its deadline. |