Please can you refine this questions and answer, it's client facing email . I did some offline digging to clarify the 2 questions raised on the call centred around the Mixpanel (Raw Export Data API)
Why does the Raw Event Export API ignore the from_date and to_date filters when the API is called? The behaviour observed is that it returns the first 100,000 events regardless from the start date until it hits the 100,000 limit per query?
ANSWER: The Raw Event Export API returns events in chronological order starting at from_date and stops when it hits either to_date or the limit whichever comes first. If your date window (even a single day) contains more than 100,000 events, the API will stop at the 100k cap before reaching to_date. This can make it appear as though the API is ignoring the date range, but it's truncating the response due to volume.
Options worth exploring:
i. Option 1: Paginate your exports using smaller windows (e.g., hour-by-hour or multi-day slices) to ensure full coverage. ii. Option 2: Raise or explicitly set limit to 100,000 if not already done some clients apply their own default caps.
Can we use the “where” clause to control the date range?
ANSWER: No, the “where” query parameter is not a substitute for from_date/to_date. Narrow the from_date/to_date window further (e.g., multiple calls per day). Refer to documentation for guide: https://github.com/mixpanel/mixpanel-utils/blob/master/sample_scripts/exporting_varied_length_date_ranges/README.md
The “where” query parameter filters events based on event properties using Mixpanel’s selector expressions. It can be used to filter by:
i. String or numeric properties (eg where='properties["$browser"] == "Chrome"') ii. A custom timestamp property (if you send one)
But it does not control the canonical event time window that’s strictly handled by from_date and to_date.
Ensure to fact-check my assumptions and responses to the questions answered. Use bullet points to call out points, easy to read along
Hi event, Please stand by as I search the Mixpanel knowledge base for an AI-powered answer. I normally take about 15 seconds or so. In case AI cannot answer your question, feel free to reach out to Mixpanel support at mixpanel.com/get-support. If you have follow-up questions for this thread, please tag me again with your question: @kapa.ai <follow-up question> 👋
Feel free to ask a follow-up question once I've answered by mentioning me with @kapa.ai
Subject: Follow-up on Raw Event Export API behaviorHi [Name],Following up on the call, I verified how Mixpanel’s Raw Event Export API behaves and how to reliably export large volumes.Key points- Date range and limit behavior - The Export API returns events from from_date to to_date, but will stop early if the limit is reached (max 100,000 per request). If your window contains > 100k events, the response truncates at the limit, which can appear as if the date range was ignored (it wasn’t) (Export API). - Tip: If you don’t set limit, you may still hit the default/system constraints; explicitly set limit up to 100000 as needed (Export API). - Rate limits: 60 requests/hour, 3 requests/second, up to 100 concurrent queries (Rate limits, Export API).- Recommended extraction strategies - Use smaller time windows (e.g., hourly or multi-day slices) to avoid truncation and ensure full coverage. A sample script for varied window sizes is available here (Varied date ranges script). - Ensure correct timezone interpretation for from_date/to_date: UTC for projects created after Jan 1, 2023; current project timezone if created before that date (Export Methods, Manage Timezones).- Clarifying the “where” parameter - The where parameter cannot replace from_date/to_date for setting the export window; it filters events within the specified date range using selector expressions (Export API). - You can use where to filter by event properties (e.g., browser, custom properties) or a custom timestamp property you send, but it won’t change the canonical time window used by from_date/to_date (Export API).- Alternative options - For ongoing, large-scale exports, consider Data Pipelines to automatically sync to cloud storage or a warehouse (daily/hourly) (Exporting Data FAQ).Please let me know if you’d like example requests for an hourly export loop or help validating project timezone settings.
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.
Let me check the knowledge base for you again. One moment! 📚
- Why does the Raw Event Export API appear to ignore from_date and to_date and return only the first 100,000 events? (It returns events chronologically starting at from_date and stops at to_date or when the limit—max 100,000—is reached) (Export API). - Can the where parameter be used to control the export date range instead of from_date/to_date? (No—where filters events within the specified date window; use smaller time slices if you need tighter control) (Export API, Varied date ranges script).
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.
Let me check the knowledge base for you again. One moment! 📚
- “Canonical time window” refers to the export window defined only by from_date and to_date. The Raw Event Export API uses these two params to decide which events are eligible to return; it does not use other fields to set that window (Export API).- A custom timestamp property can be used in where to filter events, but it cannot replace from_date/to_date for controlling the export window or batching. To do multi-day or hourly slices (i.e., export in batches), you must make multiple calls with narrower from_date/to_date windows. The sample script shows how to slice ranges into smaller requests (Varied date ranges script). The API itself enforces the window via from_date/to_date and may truncate results at the limit (max 100,000 per request) (Export API).
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.
Let me check the knowledge base for you again. One moment! 📚
True.- The where parameter filters events by properties but does not define or paginate the export window. Batching into multi-day or hourly slices requires multiple calls with narrower from_date/to_date values; each call is still subject to the 100,000 event limit (Export API, Varied date ranges script).
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.
