Skip to main content

Hey, I am trying to find the average session length by user. I know this is possible on a chart but using the endpoint: 

GET https://amplitude.com/api/3/chart/CHART_ID_HERE/query

Only returns 1000 user ids. Another way would be to use the user activity endpoint but this would be a long process. 

I essentially want the following endpoint:

GET https://amplitude.com/api/2/sessions/peruser

But with the ability to group by cohort, property or those who have performed a particular event.

Are you looking for this data for each individual users or the average for a group of users?

If latter, you can achieve this by building and saving the chart in the Amplitude web UI and then using the first API you listed.

If you are looking for individual users, you’ll probably run into the limitations. But you could get around them by building your chart to only include max 1000 users.


Reply