Mixpanel Community Icon

What is the recommend way to paginate the raw export API?

·
·

What is the recommend way to paginate the raw export API?

  • Avatar of kapa.ai
    kapa.ai
    APP
    ·
    ·

    Hi Andrew S., 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

  • Avatar of kapa.ai
    kapa.ai
    APP
    ·
    ·

    Based on the knowledge sources provided, there isn't specific information about pagination for the Raw Event Export API. The Raw Event Export API documentation doesn't mention a pagination mechanism like the one described for the Engage API (which uses session_id and page parameters).The Raw Event Export API does have some parameters that can help manage large data exports: - You can use the limit parameter to control the number of events returned (up to 100,000) - You can break up your requests by date ranges using the from_date and to_date parametersFor handling large exports, there's a sample script mentioned that helps with exporting varied length date ranges: LBKSdates_to_export = [ {"start": "2024-01-01","end": "2024-03-31", "increment": 30}, {"start": "2024-04-01","end": "2024-04-30", "increment": 1} ]LBKSThis approach allows you to export larger date ranges in a single request when there's relatively low data volume, while using smaller date ranges (down to one day at a time) when data volumes are higher. The documentation suggests keeping each request under 1-2 million events as a guideline for manageability.Keep in mind that the Raw Export API has rate limits of: - 60 queries per hour - 3 queries per second - Maximum of 100 concurrent queriesMixpanel Utils Sample Scripts provides more details on this approach.

    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.