# Programatically doing exports through the API

**URL:** <https://community.hubspot.com/t/programatically-doing-exports-through-the-api/118505>\
**Category:** APIs & Integrations\
**Tags:** developer-tools\
**Created:** [October 16, 2024, 2:53pm UTC](https://community.hubspot.com/t/programatically-doing-exports-through-the-api/118505 "2024-10-16T14:53:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![IIvanov7](https://avatars.discourse-cdn.com/v4/letter/i/e19adc/32.png) [@IIvanov7](https://community.hubspot.com/u/IIvanov7)\
**Post date:** [October 16, 2024, 2:53pm UTC](https://community.hubspot.com/t/programatically-doing-exports-through-the-api/118505/1 "2024-10-16T14:53:25Z")

</div>

As a developer, I am looking for a way to export some data through the API instead of manually exporting it through the UI. I went through the docs and couldn’t find a flexible way to handle it. Firstly, I am looking for a way to export form submissions from a single form located at Marketing → Forms. The only thing I found is this one: [Accounts Dashboard | HubSpot](https://legacydocs.hubspot.com/docs/methods/forms/get-submissions-for-a-form) which comes from some legacy docs and returns only 50 results max and it’s JSON. There is no option to select a file format (like CSV).

Moreover, it returns much less information about the results than doing it manually through the UI. I also couldn’t find a way to export it through the CRM API. Is there some other endpoint, some hidden one not mentioned in the docs, or some other way to export it programmatically?

I am also trying to export some reports about CTAs and URLs and the only thing I found is this: [Accounts Dashboard | HubSpot](https://developers.hubspot.com/docs/api/analytics/reporting) which is still under development as it seems. I am not sure which endpoint of the mentioned ones should I use and I tried the last one getting all analytics views giving it the reportId as filterId and it returns no results.

Can you assist me with some instructions and/or guidelines on how can I perform these exports programmatically using the API or some attached tools in order to export the data in a CSV format?

---

<div class="post-metadata">

**Author:** ![HMir](https://avatars.discourse-cdn.com/v4/letter/h/dec6dc/32.png) [@HMir](https://community.hubspot.com/u/HMir)\
**Post date:** [October 17, 2024, 11:58am UTC](https://community.hubspot.com/t/programatically-doing-exports-through-the-api/118505/2 "2024-10-17T11:58:55Z")

</div>

> * * *
> 
> [@IIvanov7](https://eharmony.pissedconsumer.com/customer-service.html)wrote:
> 
> As a developer, I am looking for a way to export some data through the API instead of manually exporting it through the UI. I went through the docs and couldn’t find a flexible way to handle it. Firstly, I am looking for a way to export form submissions from a single form located at Marketing → Forms. The only thing I found is this one: [Accounts Dashboard | HubSpot](https://legacydocs.hubspot.com/docs/methods/forms/get-submissions-for-a-form) which comes from some legacy docs and returns only 50 results max and it’s JSON. There is no option to select a file format (like CSV).
> 
> Moreover, it returns much less information about the results than doing it manually through the UI. I also couldn’t find a way to export it through the CRM API. Is there some other endpoint, some hidden one not mentioned in the docs, or some other way to export it programmatically?
> 
> I am also trying to export some reports about CTAs and URLs and the only thing I found is this: [Accounts Dashboard | HubSpot](https://developers.hubspot.com/docs/api/analytics/reporting) which is still under development as it seems. I am not sure which endpoint of the mentioned ones should I use and I tried the last one getting all analytics views giving it the reportId as filterId and it returns no results.
> 
> Can you assist me with some instructions and/or guidelines on how can I perform these exports programmatically using the API or some attached tools in order to export the data in a CSV format?
> 
> * * *

To programmatically export data from HubSpot, especially form submissions and reports, you can use specific API endpoints designed for this purpose. For form submissions, while the API returns a maximum of 50 results in JSON format, you can paginate through the data by incrementing the offset parameter in your requests to gather more results.

Once you retrieve the necessary data, you can convert the JSON response into a CSV format using programming libraries, such as Pandas in Python. For exporting CTAs and reports, you can utilize the relevant endpoints, such as the CTA API and the analytics reporting API. However, be aware that the reporting features may still be under development, so you may need to experiment with the available endpoints.

Additionally, using automation tools or HubSpot workflows can simplify and streamline the export process. Always refer to the latest HubSpot API documentation for the most current information and capabilities.

---

<div class="post-metadata">

**Author:** ![GRajput](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/grajput/32/102020_2.png) [@GRajput](https://community.hubspot.com/u/GRajput)\
**Post date:** [October 17, 2024, 2:41pm UTC](https://community.hubspot.com/t/programatically-doing-exports-through-the-api/118505/3 "2024-10-17T14:41:02Z")

</div>

Hi @IIvanov7

For your first problem statement - To get the whole data of the form submission use Pagination, there must be a after value in your API response.

You will get the data in JSON format, you can convert this data into any format using pre defined library present.  
Regarding your second question - As of now we only have these endpoints only.

I hope this will help you out. Please mark it as **Solution Accepted and upvote** to help another Community member.  
Thanks!
