Hard limit for no. of deal records extracted using API (Ticket number: #2057435)

SOLVE
Highlighted
New Member

Hi,

I'm doing the ETL of Hubspot data to my company data warehouse. Have tried extracting all the deals as well as recently modified deals using API from the following endpoints:

https://api.hubapi.com/deals/v1/deal/paged?hapikey=
https://api.hubapi.com/deals/v1/deal/recent/modified?hapikey=

Extraction would halt after 10k records. Have checked response and its due to rate limit (see attached screenshot)

Pls note that I've set it to extract up to 250 records per query but it only extracts 100

Have lodged a ticket, but was directed to post my query here instead.

Please advise.

Thank you.

Regards,
Mingheng

Reply
0 Upvotes
1 Accepted solution

Accepted Solutions
Highlighted
HubSpot Moderator

Hi @mingheng_moka,

Thank you for the URL. You are only receiving 100 deals per call because you are using count=250 instead of limit=250.

The count parameter is used for the Get recently modified deals endpoint while the limit parameter is used for the Get all deals endpoint.

Use this request URL instead:

https://api.hubapi.com/deals/v1/deal/paged?hapikey=XXXXXXXXXXXX&properties=dealstage&properties=invoice_number&properties=createdate&properties=closed_won_reason&properties=closed_lost_reason&properties=pipeline&properties=dealtype&properties=amount&properties=hubspot_owner_id&properties=activation_email&properties=hs_lastmodifieddate&limit=250&includeAssociations=true

Isaac Takushi

HubSpot Developer Support
Reply
0 Upvotes
3 Replies 3
Highlighted
HubSpot Moderator

Hi @mingheng_moka,

As stated in this documentation, the Get recently modified deals endpoint only returns up to the 10,000 most recently modified deals. Please refer to this similar topic.

Regarding the limit value used for the Get all deals endpoint, please share your Hub ID and the full request URL you are using (not including your API key).

Isaac Takushi

HubSpot Developer Support
Reply
0 Upvotes
Highlighted
New Member

Hi Issac,

Hubspot ID : is 2528720

Full request url for all deals is:
'https://api.hubapi.com/deals/v1/deal/paged?hapikey=XXXXXXXXXXXX&properties=dealstage&properties=invo...'

Thanks!

Reply
0 Upvotes
Highlighted
HubSpot Moderator

Hi @mingheng_moka,

Thank you for the URL. You are only receiving 100 deals per call because you are using count=250 instead of limit=250.

The count parameter is used for the Get recently modified deals endpoint while the limit parameter is used for the Get all deals endpoint.

Use this request URL instead:

https://api.hubapi.com/deals/v1/deal/paged?hapikey=XXXXXXXXXXXX&properties=dealstage&properties=invoice_number&properties=createdate&properties=closed_won_reason&properties=closed_lost_reason&properties=pipeline&properties=dealtype&properties=amount&properties=hubspot_owner_id&properties=activation_email&properties=hs_lastmodifieddate&limit=250&includeAssociations=true

Isaac Takushi

HubSpot Developer Support
Reply
0 Upvotes