# Analytics API Specifications

**URL:** <https://community.hubspot.com/t/analytics-api-specifications/11528>\
**Category:** APIs & Integrations\
**Created:** [September 7, 2018, 6:04pm UTC](https://community.hubspot.com/t/analytics-api-specifications/11528 "2018-09-07T18:04:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wes4](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/wes4/32/48852_2.png) [@Wes4](https://community.hubspot.com/u/Wes4)\
**Post date:** [September 7, 2018, 6:04pm UTC](https://community.hubspot.com/t/analytics-api-specifications/11528/1 "2018-09-07T18:04:18Z")

</div>

Hi, I had a couple questions about the new Analytics API.

1. Is there a way to make sure I don’t hit a `RESULT_POINT_LIMIT_EXCEEDED` error when querying the analytics API using the `daily` time period? I found this in the documentation: “When using a `:time_period` of daily, weekly, or monthly, the results are limited to 500 time points.” Does that mean if I make sure my days are a maximum of 500 days apart (if I’m using daily) or my months are a maximum of 500 months apart (if I’m using monthly) then I should never hit that error?
2. When I use some of the breakdowns, they do not return the actual breakdown with the response. For instance, when I use `sessions` as the `:breakdown_by` parameter, it returns results that look like they are broken down but have no breakdown field with them.  
**Edit:** I figured out if I use `daily` instead of `summarize/daily` for these endpoints then it DOES return the breakdowns (I’m not sure why, but maybe you want to make note of that in the documentation?). However, when I use `geolocation` or any of the `utm-type`s as the `:breakdown_by` parameter, then I get an error that says a filter is required but I cannot find the filter options anywhere. How am I supposed to know what I can filter by?

I have clients waiting for this integration so quick replies would be much appreciated.

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [September 19, 2018, 7:29pm UTC](https://community.hubspot.com/t/analytics-api-specifications/11528/2 "2018-09-19T19:29:19Z")

</div>

Hi again [@Wes\_Thompson](https://community.hubspot.com/u/wes_thompson),

Happy to clarify:

1. That’s correct. With the `daily` time period, for example, your start date and end date cannot exceed a span of 500 days. Keep in mind that the start and end dates are inclusive and will be treated as being in the time zone of the portal.
2. I’ll share your feedback on our documentation. Per your remaining questions:

- The `geolocation` breakdown uses [ISO 3166 Alpha-2 country codes](https://www.iso.org/obp/ui/#search/code/). If you send a request to `https://api.hubapi.com/analytics/v2/reports/geolocation/total?hapikey=demo&start=20180101&end=20180901`, you’ll see a number of countries returned.
- Appropriate filters for `utm-campaigns`, `utm-contents`, `utm-mediums`, `utm-sources`, and `utm-terms` will depend on how your organization formats tracking URLs. To pull analytics data for all Facebook traffic, for example, you might use `https://api.hubapi.com/analytics/v2/reports/utm-sources/total?hapikey=demo&start=20180101&end=20180901&f=facebook`.

---

<div class="post-metadata">

**Author:** ![Wes4](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/wes4/32/48852_2.png) [@Wes4](https://community.hubspot.com/u/Wes4)\
**Post date:** [September 19, 2018, 7:48pm UTC](https://community.hubspot.com/t/analytics-api-specifications/11528/3 "2018-09-19T19:48:10Z")

</div>

Thanks again. This information is very helpful.
