APIs & Integrations

ppat12
Member

Get all deals using API in python

SOLVE

Hi I am a beginner in  HubSpot. 

I have few doubts.
 

I currently have a google app script that fetches all deals data from HubSpot using api.

I want to recreate the same output using python. 


  # GS 
 var response = UrlFetchApp.fetch('https://api.hubapi.com/crm/v3/objects/deals/search?hapikey=my_apli_key'options);
 

 

Problems:

1. I went through API doc on Hubspot, I could only get limited help.

    I used the template to fetch some deals but these deals have only 6-7.

2 . Paging association, how to use that? I am only able to get 100 deals at a time. But I have more than 1000 deals. 

 

If anyone could help with resources for the same, that would be great.

 

# python GET code# python GET code# properties in Deals API response# properties in Deals API response

 

Thanks in advance.

0 Upvotes
2 Accepted solutions
dennisedson
Solution
HubSpot Product Team
HubSpot Product Team

Get all deals using API in python

SOLVE

@JBeatty , @Venky1 , either of you all able to help here? 😀

View solution in original post

0 Upvotes
HedgeDolph
Solution
Member

Get all deals using API in python

SOLVE

 A few things, can you not just change the limit amount in your params? also your commented out print statment should be 

print(response.json())
 
if you cant do more then 100 at a time, do a while loop and change the index each time 

View solution in original post

2 Replies 2
HedgeDolph
Solution
Member

Get all deals using API in python

SOLVE

 A few things, can you not just change the limit amount in your params? also your commented out print statment should be 

print(response.json())
 
if you cant do more then 100 at a time, do a while loop and change the index each time 
dennisedson
Solution
HubSpot Product Team
HubSpot Product Team

Get all deals using API in python

SOLVE

@JBeatty , @Venky1 , either of you all able to help here? 😀

0 Upvotes