Analytics API - Conversation Search

Three coffees. The conversation search endpoint - /api/v2/conversations/participants/attributes/search - is still returning incomplete results when querying across day boundaries. Specifically, if a conversation spans midnight, it sometimes only appears in the first day’s results.

Is it the interval start/end times? Probably. We’re pulling conversation data using Python and the SDK. Interval is set to 86400 seconds - a full day - but it doesn’t seem to respect that.

Here’s the payload. conversation_filters are empty to get everything. Just a straight-up date range request.

import requests
import json

url = "https://api.zoom.us/api/v2/conversations/participants/attributes/search"

headers = {
 "Authorization": "Bearer YOUR_TOKEN"
}

payload = {
 "interval_start": "2024-0229T00:00:00Z",
 "interval_end": "2024-0301T00:00:00Z",
 "conversation_filters": { }
}

response = requests.post(url, headers=headers, data=json.dumps(payload))

print(response.text)

The response doesn’t error, it just misses conversations. And it’s consistent. It feels like an offset issue. What’s the deal?

1 Like

it’s the interval, predictably. the analytics api isn’t designed for multi-day queries, and that endpoint’s interval parameter is… optimistic, to say the least. here are a few things to try:

  • option a - split the query. run separate searches for each day, then combine the results in your python script. it’s messy, but it works.
  • option b - use the conversation api directly - /api/v2/conversations. it’s slower, and you’ll need to filter by dates yourself, but it’s more reliable for cross-day spans.
  • option c - try reducing the interval to, like, 3600 seconds. it might get you closer, but don’t hold your breath. it’s just… broken.

sorry if this is kinda dumb, but are you filtering by conversation id at all? from what I’ve seen, sometimes the API needs a specific ID to pull everything.

Cause: Incomplete results when crossing day boundaries.
Solution:

AnalyticsApi analyticsApi = new AnalyticsApi(configuration);
String conversationId = "YOUR_CONVERSATION_ID";
analyticsApi.getConversation(conversationId);

if it helps, maybe try that first?

1 Like

That interval issue’s a pain- we ran into it last quarter, and the Analytics API’s behavior with date ranges is…particular. Instead of wrestling with the search endpoint, try querying the conversation events directly- it’s more verbose, but predictable. You’ll need to post-process to reconstruct the conversation, obviously, but it’s reliable.

Fun one today. Is anyone else seeing the Analytics API act strangely with intervals? We ran into almost the exact same thing a couple of months back - totally frustrating when you expect a simple day-boundary search to just work.

That conversationEvents endpoint As noted above is definitely the way to go. Less elegant, sure, but it’s predictable. We ended up building a little helper function in our Spring Boot service to stitch those events back together into a conversation object. Honestly, it’s faster than fighting with the search endpoint.

One thing - and this is important - make sure you’re handling pagination. The events API doesn’t return everything at once, so you’ll need to keep calling it with the pageNumber parameter until nextPage is null. It’s a pain, but better than missing data. From what I’ve seen, splitting the day and merging is just asking for trouble.