I’m pulling custom report data via the Analytics API and running into a weird issue with date filtering. When I use a date range filter, the API returns completely empty results, but the same date range in the HubSpot UI shows data perfectly fine.
Here’s my API call structure:
GET /analytics/v2/reports/custom
?startDate=2025-04-01&endDate=2025-04-30
&timezone=America/Los_Angeles
The report includes deal closure data grouped by week. In the UI, I can see 47 deals closed in April, but the API returns an empty data array. I’ve tried different date formats (ISO 8601, Unix timestamp) and still getting empty results.
What’s strange is that removing the timezone parameter gives me data, but it’s in UTC which doesn’t match our business hours. We need the data in Pacific time for accurate reporting. Has anyone dealt with timezone handling differences between the Analytics API and the UI?
The Analytics API can be finicky with timezones. Try using the timezone identifier exactly as HubSpot expects it - they use IANA timezone database names. Also make sure your date format matches what the API expects. Some endpoints want YYYY-MM-DD while others need full ISO 8601 with time component.
I’ve seen this exact issue. The problem is that when you specify a timezone, HubSpot converts your date range to UTC internally, but it might be converting it in the opposite direction than you expect. So your April 1st in Pacific time might become March 31st UTC, which could be outside your actual data range. Try expanding your date range by a day on each end and see if you get results.
Expanding the date range by a day worked to get some data back, but now I’m getting data from March 31st included in my April report, which isn’t what I need. This seems like a fundamental issue with how the API handles timezone conversions versus how the UI handles them. Is there documentation that explains the exact timezone conversion behavior?
The issue is that the Analytics API and the UI use different timezone handling logic. The UI applies timezone conversion AFTER aggregation, while the API applies it BEFORE. This means you need to send your dates in UTC and then handle the timezone display in your application layer. Alternatively, include the time component in your date strings to be explicit about what you want. Try startDate=2025-04-01T00:00:00-07:00 format.