kapa.ai I am working with the export API. I want to export only certain events (basically all except for the auto page views). What is the proper syntax, assuming there are 5 events other than the auto page view, assume named event_a, event_b, event_c, event_d and event_e.
To export specific events using Mixpanel's Raw Event Export API, you can use the event
query parameter which allows you to specify the events you want to export as a JSON array. Here's how you would structure your request to export the five events you mentioned: LBKScurl --request GET \ --url '[https://data.mixpanel.com/api/2.0/export?from_date=YOUR_START_DATE&to_date=YOUR_END_DATE&event=["event_a","event_b","event_c","event_d","event_e"]](https://data.mixpanel.com/api/2.0/export?from_date=YOUR_START_DATE&to_date=YOUR_END_DATE&event=[%22event_a%22,%22event_b%22,%22event_c%22,%22event_d%22,%22event_e%22])' \ --header 'accept: text/plain' \ --header 'authorization: Basic YOUR_TOKEN'LBKS
The key part is the event
parameter which should be formatted as a JSON array containing the names of all events you want to export. In your case, it would be: LBKSevent=["event_a","event_b","event_c","event_d","event_e"]LBKS
This will ensure that only these five specific events are exported, excluding the auto page views and any other events not specified in the array.If you're using the MixpanelUtils Python library, the syntax would be: LBKSmputils.export_events('event_export.txt',{ 'from_date':'YOUR_START_DATE', 'to_date':'YOUR_END_DATE', 'event':'["event_a","event_b","event_c","event_d","event_e"]' })LBKS
Note that the Raw Event Export API has rate limits of 60 queries per hour, 3 queries per second, and a maximum of 100 concurrent queries. If you exceed these limits, you'll receive a 429 error.Raw Event Export API
Mixpanel Utils
kapa.ai is still learning and improving, please let me know how I did by reacting below.
ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.