Average session length

GET https://amplitude.com/api/2/sessions/average?start=&end=

Get the average session length (in seconds) for each day in the specified date range.

Returns

AttributeDescription
seriesAn array with one element which is itself an array that contains the average session length for each day.
seriesMetaAn array of labels with one for each segment.
segmentIndexThis represents the index of the segment, referring to its position in the right module of the chart control panel.
xValuesAn array of (string) dates formatted like YYYY-MM-DD with one for each in the specified date range.

Request Params

KeyDatatypeRequiredDescription
startnullRequired. First date included in data series, formatted YYYYMMDD (e.g. "20141001").
endnullRequired. Last date included in data series, formatted YYYYMMDD (e.g. "20141004").

RESPONSES

status: OK

{"withSets":true,"data":{"xValues":["2021-06-01","2021-06-02","2021-06-03","2021-06-04","2021-06-05","2021-06-06","2021-06-07","2021-06-08","2021-06-09","2021-06-10","2021-06-11","2021-06-12","2021-06-13","2021-06-14","2021-06-15","2021-06-16","2021-06-17","2021-06-18","2021-06-19","2021-06-20","2021-06-21","2021-06-22","2021-06-23","2021-06-24","2021-06-25","2021-06-26","2021-06-27","2021-06-28","2021-06-29","2021-06-30"],"series":[[0,0,0,0,0,0,0,0,1,2.2857142857142856,0,0,2,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],"seriesCollapsed":[[0]],"seriesLabels":[0],"seriesMeta":[{"segmentIndex":0}]},"timeComputed":1643750191615,"wasCached":true,"cacheFreshness":"FRESH","novaRuntime":173,"novaRequestDuration":34,"novaCost":0,"throttleTime":0,"minSampleRate":1,"transformationIds":[],"backend":"novaV2","realtimeDataMissing":false,"timedOutRealtimeData":false,"partialMergedAndNewUserInformation":false,"prunedResult":false,"hitChunkGroupByLimit":false,"subcluster":6,"millisSinceComputed":9979,"queryIds":["dp5pvE6BGH"]}