Get all deals using API in python

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

# properties in Deals API response

Thanks in advance.

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

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