# More than 2500 Deals API

**URL:** <https://community.hubspot.com/t/more-than-2500-deals-api/11610>\
**Category:** APIs & Integrations\
**Tags:** object\
**Created:** [November 16, 2018, 1:58pm UTC](https://community.hubspot.com/t/more-than-2500-deals-api/11610 "2018-11-16T13:58:41Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [November 16, 2018, 1:58pm UTC](https://community.hubspot.com/t/more-than-2500-deals-api/11610/1 "2018-11-16T13:58:41Z")

</div>

Dear Forum Participants,

i was trying to create an API in order to show some data in Klipfolio. For this I wrote the following API:  
[https://api.hubapi.com/deals/v1/deal/paged?&properties=closedate&properties=dealstage&properties=pipeline&properties=amount&properties=dealname&properties=num\_associated\_contacts&properties=hubspot\_owner\_id&limit=250&offset=](https://api.hubapi.com/deals/v1/deal/paged?&properties=closedate&properties=dealstage&properties=pipeline&properties=amount&properties=dealname&properties=num_associated_contacts&properties=hubspot_owner_id&limit=250&offset=)  
With that API, I get 2500 Deals, but unfortunately I have more than 2500 Deals and the number will continue increasing. Is there any posibility to get ALL the deals of my HubSpot account with an API?  
I need the future deals from the “Key Account - Sales” pipeline with their respective Deal Name, Deal Amount, Close Date, Hubspot Owner, Associated with and Deal Stage.  
I would be happy to find a solution to this.

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [November 19, 2018, 7:45pm UTC](https://community.hubspot.com/t/more-than-2500-deals-api/11610/2 "2018-11-19T19:45:45Z")

</div>

Welcome, [@j.santiago](https://community.hubspot.com/u/j.santiago)!

The [Get all deals](https://developers.hubspot.com/docs/methods/deals/get-all-deals) endpoint is able to get _all_ deals in an account, but must be called multiple times.

Can you confirm you’re calling the endpoint _10 times_ (250 deals per call \* 10 calls = 2,500 deals)? If so, which `offset` value returns the final page of deals? (At the end, you should see `"hasMore": true`.)

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [November 20, 2018, 2:12pm UTC](https://community.hubspot.com/t/more-than-2500-deals-api/11610/3 "2018-11-20T14:12:42Z")

</div>

[@Isaac\_Takushi](https://community.hubspot.com/u/isaac_takushi)  
Thank you very much for your reply  
 ![slight_smile.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/3/33fb2a14544119c2351fe774141779702299e6a6.png)

I am calling the endpoint 10 times but I do not get any “hasMore” (offset values)

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [November 28, 2018, 8:27am UTC](https://community.hubspot.com/t/more-than-2500-deals-api/11610/4 "2018-11-28T08:27:37Z")

</div>

Hi [@Isaac\_Takushi](https://community.hubspot.com/u/isaac_takushi),  
Hope you are doing great, do you happen to know what i can do here?  
Thanks!

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [November 28, 2018, 2:29pm UTC](https://community.hubspot.com/t/more-than-2500-deals-api/11610/5 "2018-11-28T14:29:22Z")

</div>

Apologies for the delayed response, [@j.santiago](https://community.hubspot.com/u/j.santiago). This topic fell through the cracks.

Can you share your Hub ID and the final `offset` value you get after 10 calls?

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [November 28, 2018, 2:45pm UTC](https://community.hubspot.com/t/more-than-2500-deals-api/11610/6 "2018-11-28T14:45:31Z")

</div>

[@Isaac\_Takushi](https://community.hubspot.com/u/isaac_takushi) No problem  
3348901  
I do not get any offset value after 10 calls of 250 deals.

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [November 28, 2018, 5:24pm UTC](https://community.hubspot.com/t/more-than-2500-deals-api/11610/7 "2018-11-28T17:24:44Z")

</div>

Hi [@j.santiago](https://community.hubspot.com/u/j.santiago),

I was able to successfully retrieve all **2,688** deals in your account with the **11** calls to the [Get all deals](https://developers.hubspot.com/docs/methods/deals/get-all-deals) endpoint.

Here are all the call `offset` values returned:

**Call 1** : No `offset` returns:

```auto
"hasMore": true,
"offset": 195105719

```

**Call 2** : `offset=195105719` returns:

```auto
"hasMore": true,
"offset": 224197680

```

**Call 3** : `offset=224197680` returns:

```auto
"hasMore": true,
"offset": 248434501

```

**Call 4** : `offset=248434501` returns:

```auto
"hasMore": true,
"offset": 258690719

```

**Call 5** : `offset=258690719` returns:

```auto
"hasMore": true,
"offset": 278003430

```

**Call 6** : `offset=278003430` returns:

```auto
"hasMore": true,
"offset": 300938263

```

**Call 7** : `offset=300938263` returns:

```auto
"hasMore": true,
"offset": 313015792

```

**Call 8** : `offset=313015792` returns:

```auto
"hasMore": true,
"offset": 337548602

```

**Call 9** : `offset=337548602` returns:

```auto
"hasMore": true,
"offset": 362022835

```

**Call 10** : `offset=362022835` returns:

```auto
"hasMore": true,
"offset": 397453054

```

**Call 11** : `offset=397453054` returns:

```auto
"hasMore": false,
"offset": 419874281

```

Call 11 to `https://api.hubapi.com/deals/v1/deal/paged?limit=250&offset=397453054` only returns **188** deals. When combined with the ten previous calls, this equals **2,688** deals.

Only

**Call 12** : `offset=419874281` returns an empty object:

```auto
{
 "deals": [],
 "hasMore": false,
 "offset": 0
}

```

But this is expected behavior, because there are no more deals to return.

Please confirm you are seeing the same behavior.

If you are not, please send me the full URL of the call which returns `"hasMore": false`.

---

<div class="post-metadata">

**Author:** ![yatishm](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/yatishm/32/84083_2.png) [@yatishm](https://community.hubspot.com/u/yatishm)\
**Post date:** [September 3, 2019, 1:29pm UTC](https://community.hubspot.com/t/more-than-2500-deals-api/11610/8 "2019-09-03T13:29:00Z")

</div>

Thanks for the insightful comment above …
