Fixing the API Request for Mixpanel Profile Retrieval Issues
I am attempting to request profiles from the api and unfortunately are not able to get the where filter to work. I am doing the following:
last_seen_after = "2025-03-01"
params = {
"project_id": self.project_id,
"page_size": page_size,
"page": page
}
if last_seen_after:
params["where"] = f'properties["$last_seen"] > "{last_seen_after}"'
response = requests.get(
"https://mixpanel.com/api/2.0/engage",
params=params,
auth=(self.api_secret, ''),
timeout=120,
)
It is always returning 0 records. I have verified that there are users that would qualify for this request. I have also tried passing the last_seen_after as a unix timestamp and it does not work. What am I missing? How can I fix my request to work properly?