Mixpanel Community Icon

Querying New Data with Engage API: A Quick Guide

·
·

How do I query for data using engage api that was not previously queried?

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

    To query for data using the Engage API that was not previously queried, you need to use the /engage endpoint without providing a session_id parameter. Here's how you can do it:1. Make a POST request to the /engage endpoint. 2. Include the necessary parameters in your request, such as project_id, where (for filtering), and any other relevant parameters. 3. Omit the session_id parameter to ensure you're not retrieving cached results from a previous query.Here's an example of how you might structure your request:LBKScurl --request POST \ --url [https://mixpanel.com/api/2.0/engage](https://mixpanel.com/api/2.0/engage) \ --header 'Authorization: Basic <your_auth_token> ' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data 'project_id=<your_project_id> ' \ --data 'where=<your_filter_expression> 'LBKSIt's important to note that:1. The Engage API has rate limits: 60 queries per hour and a maximum of 5 concurrent queries Query API - Engage.2. API responses will return at most page_size records for each request. If you need to retrieve additional records, you'll need to make subsequent requests using the session_id returned in the first response and incrementing the page parameter Query API - Engage.3. You can use the where parameter to filter users by specific criteria, and the output_properties parameter to specify which properties you want returned Query API - Engage.For more detailed information on using the Engage API, including all available parameters and response formats, you can refer to the Mixpanel Developer Reference.

    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.