whats the best or right way to query through API an insight report? can I pass the URL or report id and that be enough to query?
Querying an Insights Report via API
Yes, you can query a saved Insights report via the Mixpanel Query API using its report ID (bookmark ID). Here's how it works:
Endpoint
GET https://mixpanel.com/api/query/insights
Required Parameter
bookmark_id (required): The ID of your Insights report. You can find it in the report URL:
https://mixpanel.com/project/<YOUR_PROJECT_ID>/view/<YOUR_WORKSPACE_ID>/app/boards#id=12345&editor-card-id=%22report-<YOUR_BOOKMARK_ID>%22
Optional Parameter
workspace_id: Required if your project uses workspaces.
Example curl
curl --request GET \
--url 'https://mixpanel.com/api/query/insights?bookmark_id=YOUR_BOOKMARK_ID' \
--header 'authorization: Basic YOUR_TOKEN'
What You Get Back
The response includes:
computed_at: when the data was computed
date_range: the from_date and to_date
headers: explanation of the nested keys
series: event data mapped by date
Important Notes
The Query API has a rate limit of 60 queries per hour and a maximum of 5 concurrent queries.
This API is available to Growth or Enterprise plan users. Free plan users can only export reports as CSV/PNG/PDF from the UI. [Export Methods]
You cannot pass a full URL directly โ you need to extract the bookmark_id from the URL manually (or use the Google Sheets integration which can parse the URL for you automatically). [Google Sheets Integration]
โน๏ธย Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.
