Generation Report API

Hi all,

I have a report created and I would like to make sure I am able to access the same data I get in a excel (when “export” is clicked) through the API.

Report: https://app.hubspot.com/report-builder/2522988/report/59159835/visualization

I would need to retrieve all this information to automate a process internaly.

The chat support wasn’t able to confirm whether or not I am able to retrieve this specific data through the API.

Thanks,

Hi, @Adaptive.

Happy to clarify.

At this time, it is not possible to retrieve the data for individual reports like that via the HubSpot API — at least not in the digested form you envision.

That said, I still think I can help!

This report uses data that is freely accessible through the Contacts API. Specifically, you can use the Get all contacts endpoint to retrieve all your contacts at one time (with several requests). Create date and Lifecycle stage property data is include by default in the response. Your external integration or system could then parse through the data and count and sort contacts by Create data.

Alternatively, you could set up an integration to periodically poll the Get recently updated and created contacts endpoint so that you wouldn’t have to pull all of your contact records each time you call HubSpot’s APIs.

Hi, @IsaacTakushi.

Thank you for the answer.

I’ll try the Contacts API, then. If I can retrieve all the columns from this report that would be enough.

I would need to separate them on my backend by the filters made on this report. Would I be able to retrieve the columns used to filter on that report?

Thank you very much,

Hi, @Adaptive.

To clarify, are you referring to columns for contact name, create date, and lifecycle stage?

If so, you wouldn’t be retrieving the columns themselves, per se, but each contact record returned will have data for all three of these properties. You could then sort and count them by each property and value.

For example, I could imagine logic which counts all contacts which have "lifecyclestage":"customer".

Hi @IsaacTakushi,

No.

On this report, when I export it, I have the “columns”:

Original Source

Original Source - Drilldown 1

I need them for being able to sort and count them to specific internal reports.

If I can use this to perform the endpoint request or retrieve these information, that would work.

Thank you very much,

Hey, @Adaptive.

Thanks for clarifying.

Yes, you can retrieve those properties from this and similar Contacts API endpoints by defining these properties in the request URL with the property parameter.

If you wanted Original Source data and both of its drilldowns, you would append:

&property=hs_analytics_source&property=hs_analytics_source_data_1&property=hs_analytics_source_data_2