# Exporting Data via API

**URL:** <https://community.hubspot.com/t/exporting-data-via-api/25091>\
**Category:** APIs & Integrations\
**Tags:** developer-tools\
**Created:** [September 4, 2020, 5:38pm UTC](https://community.hubspot.com/t/exporting-data-via-api/25091 "2020-09-04T17:38:56Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![taran42](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/taran42/32/105524_2.png) [@taran42](https://community.hubspot.com/u/taran42)\
**Post date:** [September 4, 2020, 5:38pm UTC](https://community.hubspot.com/t/exporting-data-via-api/25091/1 "2020-09-04T17:38:56Z")

</div>

I am looking to have an automated script that I will export some of my data from Hubspot (Companies, Contacts and Deals) via the API and save that data in a separate Excel file for each. I looked into the API tutorials that Hubspot had to offer and it looks like using the API will export the data I want into a JSON format. How then can I take that data and transfer it into an Excel document?

I have seen a similar extract performed in PowerShell and Python, but I am not versed enough in either of those to write the script for myself.

---

<div class="post-metadata">

**Author:** ![Mike\_Eastwood](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mike_eastwood/32/70075_2.png) [@Mike\_Eastwood](https://community.hubspot.com/u/Mike_Eastwood)\
**Post date:** [September 5, 2020, 1:14am UTC](https://community.hubspot.com/t/exporting-data-via-api/25091/2 "2020-09-05T01:14:57Z")

</div>

Hi @taran42

You’d need a script to convert the JSON data to CSV or Excel – it’s not rocket surgery but it would require custom code.

Our team builds [Custom HubSpot Integrations](https://www.webalite.com/custom-hubspot-integrations), please contact me if you’d like to know more.

Cheers

Mike

---

<div class="post-metadata">

**Author:** ![taran42](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/taran42/32/105524_2.png) [@taran42](https://community.hubspot.com/u/taran42)\
**Post date:** [September 8, 2020, 1:52pm UTC](https://community.hubspot.com/t/exporting-data-via-api/25091/3 "2020-09-08T13:52:12Z")

</div>

Mike, thanks for the reply. Do you know if there is a way to pull Hubspot data directly into a CSV? Or is the only output from Hubspot JSON (and then converting that)?

---

<div class="post-metadata">

**Author:** ![Mike\_Eastwood](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mike_eastwood/32/70075_2.png) [@Mike\_Eastwood](https://community.hubspot.com/u/Mike_Eastwood)\
**Post date:** [September 8, 2020, 11:44pm UTC](https://community.hubspot.com/t/exporting-data-via-api/25091/4 "2020-09-08T23:44:12Z")

</div>

Hi @taran42

You can manually export a spreadsheet from HubSpot.

Or use the APIs to get JSON.

Working with CSVs programatically is flakey so JSON is a much better format.

Have fun

Mike

---

<div class="post-metadata">

**Author:** ![taran42](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/taran42/32/105524_2.png) [@taran42](https://community.hubspot.com/u/taran42)\
**Post date:** [September 9, 2020, 7:21pm UTC](https://community.hubspot.com/t/exporting-data-via-api/25091/5 "2020-09-09T19:21:21Z")

</div>

Mike, thank you for your help. I was able to pull the JSON from Hubspit via the API in Python and then converted it to a CSV with the Pandas module.

---

<div class="post-metadata">

**Author:** ![GKasireddy](https://avatars.discourse-cdn.com/v4/letter/g/c0e974/32.png) [@GKasireddy](https://community.hubspot.com/u/GKasireddy)\
**Post date:** [February 17, 2022, 7:38am UTC](https://community.hubspot.com/t/exporting-data-via-api/25091/6 "2022-02-17T07:38:08Z")

</div>

Hi taran42,

How to pull contacts list data from HubSpot into Excel file via API. Please provide any API you are using?

I am using the below API for fetching contacts list.

[https://api.hubapi.com/crm/v3/objects/contacts](https://api.hubapi.com/crm/v3/objects/contacts)

Thank you.

---

<div class="post-metadata">

**Author:** ![taran42](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/taran42/32/105524_2.png) [@taran42](https://community.hubspot.com/u/taran42)\
**Post date:** [February 17, 2022, 8:40pm UTC](https://community.hubspot.com/t/exporting-data-via-api/25091/7 "2022-02-17T20:40:12Z")

</div>

@GKasireddy The API you linked should work for getting the data out of Hubspot (I used v2). Once you get the JSON file file, you can use Python to convert that into an Excel file or another tool. Ultimately I brought the JSON data into Alteryx as a BLOB and converted it there.

---

<div class="post-metadata">

**Author:** ![GKasireddy](https://avatars.discourse-cdn.com/v4/letter/g/c0e974/32.png) [@GKasireddy](https://community.hubspot.com/u/GKasireddy)\
**Post date:** [February 18, 2022, 6:58am UTC](https://community.hubspot.com/t/exporting-data-via-api/25091/8 "2022-02-18T06:58:55Z")

</div>

Thanks taran42. It is working.

---

<div class="post-metadata">

**Author:** ![DduPlessis](https://avatars.discourse-cdn.com/v4/letter/d/a87d85/32.png) [@DduPlessis](https://community.hubspot.com/u/DduPlessis)\
**Post date:** [July 13, 2022, 4:12pm UTC](https://community.hubspot.com/t/exporting-data-via-api/25091/9 "2022-07-13T16:12:48Z")

</div>

Hi [@Mike\_Eastwood](https://community.hubspot.com/t5/user/viewprofilepage/user-id/9259)

Is there a way to pull relevant data from HubSpot to an Adobe integration to fill in a Certificate template? Like for example your First and Last name

---

<div class="post-metadata">

**Author:** ![johnelmer](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/johnelmer/32/55984_2.png) [@johnelmer](https://community.hubspot.com/u/johnelmer)\
**Post date:** [October 6, 2020, 12:33am UTC](https://community.hubspot.com/t/exporting-data-via-api/25091/10 "2020-10-06T00:33:32Z")

</div>

There is now an app in the HubSpot App Marketplace called [Ultimate Data Export for HubSpot.](https://ecosystem.hubspot.com/marketplace/apps/marketing/analytics-data/ultimate-data-export-224046) You can export the following data tables and their associations directly to Microsoft Excel:

- Contacts
- Web Analytics
- Companies
- Deals
- Deal History
- Owners
- Campaigns
- Engagements
- Emails
- Products
- Tickets
- Forms
- and more related subdata such as Pipelines and Associations.

Please mark this as a solution if it helps address your needs.

John

---

<div class="post-metadata">

**Author:** ![shoes2334](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/shoes2334/32/29368_2.png) [@shoes2334](https://community.hubspot.com/u/shoes2334)\
**Post date:** [May 27, 2021, 7:06pm UTC](https://community.hubspot.com/t/exporting-data-via-api/25091/11 "2021-05-27T19:06:03Z")

</div>

Hi John.

Thanks so much for this awesome product.

Is there a way to use your product directly through an API for automation?

Thanks!

---

<div class="post-metadata">

**Author:** ![johnelmer](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/johnelmer/32/55984_2.png) [@johnelmer](https://community.hubspot.com/u/johnelmer)\
**Post date:** [May 28, 2021, 12:43pm UTC](https://community.hubspot.com/t/exporting-data-via-api/25091/12 "2021-05-28T12:43:23Z")

</div>

@shoes2334 There are a couple of options in the HubSpot App Marketplace that can meet your needs. One option is the [Excel Integration for HubSpot](https://app.hubspot.com/ecosystem/2756921/marketplace/apps/marketing/analytics-data/excel-integration-216220). Using this app, your HubSpot data can be set up to refresh in Excel on a regularly scheduled basis.

---

<div class="post-metadata">

**Author:** ![dreamerdad](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dreamerdad/32/30191_2.png) [@dreamerdad](https://community.hubspot.com/u/dreamerdad)\
**Post date:** [December 9, 2022, 6:56pm UTC](https://community.hubspot.com/t/exporting-data-via-api/25091/13 "2022-12-09T18:56:21Z")

</div>

Can someone clarify the API query parameters I should use to pull utm source data as shown below? Alternatively, I’d like to schedule weekly reports to my email address with the report being sent in the form of a CSV attachment and then auto-pull that csv attachment into a google sheet (via google apps script) and then use that google sheet as a data source in our Looker data studio report. Is there any way to do the former? Any way to do the latter using Ultimate Data Export for HubSpot? I would prefer to use the Hubspot API directly rather than via Ultimate Data Export for HubSpot

 ![1670611871106.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/2X/f/fc46ed6a2a6d804bc80921794019b70a078d95ae.jpeg)

---

<div class="post-metadata">

**Author:** ![JasonTisdall](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jasontisdall/32/9140_2.png) [@JasonTisdall](https://community.hubspot.com/u/JasonTisdall)\
**Post date:** [February 17, 2025, 3:24pm UTC](https://community.hubspot.com/t/exporting-data-via-api/25091/14 "2025-02-17T15:24:25Z")

</div>

Hi John

We would like to be able to triggere regular exports of Deal dat from various pipelines. Other spreadsheets within our systems can then pick this data up automatically.

Is that something you can help with?

cheers Jason

---

<div class="post-metadata">

**Author:** ![johnelmer](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/johnelmer/32/55984_2.png) [@johnelmer](https://community.hubspot.com/u/johnelmer)\
**Post date:** [February 17, 2025, 4:20pm UTC](https://community.hubspot.com/t/exporting-data-via-api/25091/15 "2025-02-17T16:20:40Z")

</div>

@JasonTisdall Ultimate Data Export was developed to be a one-time manually triggered export of virtually all HubSpot data available via the APIs. It comes to you as an Excel file via email. It’s not the right long-terms solution regular data exports.

I suggest looking at our app in the HubSpot App Marketplace called [MS SQL Server Integration for HubSpot](https://ecosystem.hubspot.com/marketplace/listing/mssql-replicator). Rather than exporting your data to Excel like UDE, this integration automatically extracts, transfers and loads your HubSpot data into your own secure SQL Server database. (The SQL Server data warehouse in Azure is included in the subscription cost and is automatically configured when you purchase a subscription. Subscriptions allow for unlimited users at a flat rate.)  
Once your HubSpot data is synchronized with the SQL Server data warehouse, the SQL database automatically refreshes from HubSpot on a scheduled basis (several refresh rates are available). You can connect this SQL database to any other application that has a SQL connector (such as Microsoft Excel).

---

<div class="post-metadata">

**Author:** ![JasonTisdall](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jasontisdall/32/9140_2.png) [@JasonTisdall](https://community.hubspot.com/u/JasonTisdall)\
**Post date:** [February 17, 2025, 5:24pm UTC](https://community.hubspot.com/t/exporting-data-via-api/25091/16 "2025-02-17T17:24:01Z")

</div>

John  
Thanks. I’ll look into it  
Jason

---

<div class="post-metadata">

**Author:** ![DduPlessis](https://avatars.discourse-cdn.com/v4/letter/d/a87d85/32.png) [@DduPlessis](https://community.hubspot.com/u/DduPlessis)\
**Post date:** [July 15, 2022, 9:28am UTC](https://community.hubspot.com/t/exporting-data-via-api/25091/17 "2022-07-15T09:28:44Z")

</div>

Hi [@Mike\_Eastwood](https://community.hubspot.com/t5/user/viewprofilepage/user-id/9259)

Is there a way to pull relevant data from HubSpot to an Adobe integration to fill in a Certificate template? Like for example your First and Last name

---

<div class="post-metadata">

**Author:** ![ytulsi](https://avatars.discourse-cdn.com/v4/letter/y/43a26b/32.png) [@ytulsi](https://community.hubspot.com/u/ytulsi)\
**Post date:** [January 23, 2023, 4:28pm UTC](https://community.hubspot.com/t/exporting-data-via-api/25091/18 "2023-01-23T16:28:04Z")

</div>

Certain types of exports can now be done via API. This feature is in public beta. More information here: [Accounts Dashboard | HubSpot](https://developers.hubspot.com/docs/api/crm/exports)

---

<div class="post-metadata">

**Author:** ![RobertYoung](https://avatars.discourse-cdn.com/v4/letter/r/6f9a4e/32.png) [@RobertYoung](https://community.hubspot.com/u/RobertYoung)\
**Post date:** [April 2, 2025, 9:18am UTC](https://community.hubspot.com/t/exporting-data-via-api/25091/19 "2025-04-02T09:18:47Z")

</div>

If you’re aiming to export a lot of data regularly, building your own custom script can definitely work, but you’ll need to manage pagination and error handling carefully.  
Alternatively, using a third-party tool like [Skyvia](https://skyvia.com/connectors/hubspot) might save you some headaches—it handles those API quirks behind the scenes and lets you automate the exports easily.

---

<div class="post-metadata">

**Author:** ![zafarkahn](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/zafarkahn/32/64128_2.png) [@zafarkahn](https://community.hubspot.com/u/zafarkahn)\
**Post date:** [April 5, 2025, 4:42pm UTC](https://community.hubspot.com/t/exporting-data-via-api/25091/20 "2025-04-05T16:42:57Z")

</div>

Nice
