For AI agents: a documentation index is available at /docs/llms.txt. Append .md to any page URL for markdown, or send Accept: text/markdown.
Query chart
Computes and returns normalized results for a saved chart. v1 supportsevent_segmentation, sessions, funnels, and retention chart types;
other chart types return 422 with error_code: unsupported_chart_type.
Results reflect the authenticated caller's project access and chart
permissions.
This POST computes a result and does not mutate state. It is therefore a
read operation and does not require an Idempotency-Key.
Omitting time_range uses the chart's saved range; if the chart has no
saved range, the server defaults to the last 30 days.
Query is synchronous with bounded defaults. Expensive queries may return504 when exceeding the server timeout; async query jobs are planned for
a follow-up slice. Retryable responses may include retry advice where
their endpoint-specific error contract provides it.
/v1/projects/{project_id}/charts/{chart_id}/queryAuthorizations
Authorizationstringrequiredhttp
Path parameters
project_idstringrequiredAmplitude project identifier, backed by the canonical app ID.
12345pattern: ^[0-9]+$chart_idstringrequiredSaved chart identifier.
min length: 1Body
application/jsontime_rangeobjectShow child attributes
startstringrequiredInclusive start date (project timezone unless timezone is set on query).
format: dateendstringrequiredInclusive end date.
format: datetimezonestringIANA timezone identifier (e.g. America/New_York).
America/New_Yorkexclude_incomplete_datapointsbooleanWhen true, excludes the current incomplete interval from results.
falsegroup_by_limitintegerMaximum number of breakdown groups returned per series.
10min: 1max: 1000time_series_limitintegerMaximum number of time buckets per series. 0 collapses each series to
a single scalar aggregate.
100min: 0max: 1000Response
application/jsondataobjectrequiredShow child attributes
idstringrequiredIdentifier for this query execution.
objectstringrequiredResource-type discriminator. Always analytics_result.
source_typestringrequiredSource artifact type. v1 supports chart only. dashboard and query
are reserved for future slices.
chartsource_idstringrequiredIdentifier of the source chart.
project_idstringrequiredpattern: ^[0-9]+$computed_atstringrequiredformat: date-timetimezonestringrequiredIANA timezone used for computation.
result_kindstringrequiredHigh-level shape of the normalized result payload. Adapters set this
explicitly per supported chart type; unknown means the server could not
classify the result shape safely.
timeseriesscalarfunnelretentiontableunknownmetric_semanticsobjectrequiredadditivebooleanrequiredWhen false, values must not be summed across time intervals or groups without understanding deduplication semantics.
recommended_aggregatestringrequiredRecommended aggregation method for downstream consumers. Non-additive metrics
(e.g. unique users) must not be summed across intervals. unknown is used
when the adapter cannot determine a safe aggregate; treat values as
non-additive in that case.
sumlastmeandeduped_totalnoneunknownnotesstringHuman-readable guidance for interpreting values.
nullabledataobjectrequiredNormalized result payload. Populated fields depend on result_kind.
Timeseries and funnel results use dimensions and series. Table results
use columns and rows.
dimensionsobject[]idstringrequiredlabelstringrequiredrolestringrequiredRole of this dimension in the result.
timesegmentbreakdownstepseriesobject[]idstringrequiredlabelstringrequiredpointsobject[]requiredxoneOfrequiredDimension value (typically an ISO date or category label).
stringnumberynumberrequiredMetric value at this point.
nullablecompletebooleanWhen false, the interval is incomplete (current bucket). Only present
when exclude_incomplete_datapoints is false.
aggregateobjectOptional pre-computed aggregate for the series.
valuenumberrequirednullablemethodstringrequiredcolumnsstring[]Column headers for table-shaped results.
rowsoneOf[][]metadataobjectrequiredEcho of effective query parameters and chart context.
chart_typestringPublic chart type discriminator (snake_case). All values may appear on
list/get; query returns 422 (unsupported_chart_type) for types outside
the v1 supported matrix.Unsupported or unrecognized chart types are surfaced as unknown.New chart types may be added over time. Clients should treat unknown as
"a chart type this API version does not model yet".
event_segmentationsessionsfunnelsretentioncompositionrevenue_ltvstickinessdata_tableengagement_matrixmetric_explorergrowth_accountingimpactusersunknownchart_namestringtime_rangeobjectstartstringrequiredInclusive start date (project timezone unless timezone is set on query).
format: dateendstringrequiredInclusive end date.
format: dateexclude_incomplete_datapointsbooleangroup_by_limitintegertime_series_limitintegerwarningsstring[]requiredNon-fatal issues encountered during query execution.
truncatedoneOfobjectnullgroup_by_limitintegerApplied group-by limit when breakdown was truncated.
time_series_limitintegerApplied time-series limit when buckets were truncated.
reasonstringHuman-readable explanation of truncation.
error_code: unsupported_chart_type; detail names the chart type
and the currently supported set.
typestringrequiredformat: urititlestringrequiredstatusintegerrequiredmin: 400max: 599detailstringnullableinstancestringformat: urinullableerror_codestringrequiredretryablebooleanrequiredretry_after_secondsintegernullablemin: 0validation_errorsobject[]nullabletypestringrequiredformat: urititlestringrequiredstatusintegerrequiredmin: 400max: 599detailstringnullableinstancestringformat: urinullableerror_codestringrequiredretryablebooleanrequiredretry_after_secondsintegernullablemin: 0validation_errorsobject[]nullableWas this helpful?