APIs & Integrations

MadhuManne
Membro

Contact Search API 400 Bad Request when fetching records after 10000

resolver

 

POST /crm/v3/objects/contacts/search

 

{"filterGroups":[{"filters":[{"propertyName":"lastmodifieddate","operator":"GTE","value":1622505600000}]}],"properties":["email","firstname","phone","lastname","jobtitle","city","state","country","hs_lead_status","company","hubspot_owner_id","linkedin_url","lead_type","hs_additional_emails","mobilephone"],"limit":100,"after":10000}

 

Status Code - 400 Bad Request

{"status":"error","message":"There was a problem with the request.","correlationId":"2d347b55-f890-449d-a7af-bf56dd11983a"}

 

2 Solução aceitas
Tobiwan
Solução
Participante

Contact Search API 400 Bad Request when fetching records after 10000

resolver

The answer is in the documentation: "The search endpoints are limited to 10,000 total results for any given query. Attempting to page beyond 10,000 will generate a 400 error."

 

Source: https://developers.hubspot.com/docs/api/crm/search

 

Unfortunately the response did not say anything about it.

Exibir solução no post original

RBotha-sp
Solução
Participante

Contact Search API 400 Bad Request when fetching records after 10000

resolver

Hi Tobiwan,

 

Yes, indeed the documentation mentions this limitation. Would have liked to see the actual error in the response.

However, we've got some 20,000+ records to retrieve via the Search facility and now hit this limitation. I've scoured the forum and found that not only has the removal of the limitation already been submitted to HubSpot, but also that other forum members have opted to do a "get all" and filter locally.. 

Exibir solução no post original

5 Respostas 5
Tobiwan
Solução
Participante

Contact Search API 400 Bad Request when fetching records after 10000

resolver

The answer is in the documentation: "The search endpoints are limited to 10,000 total results for any given query. Attempting to page beyond 10,000 will generate a 400 error."

 

Source: https://developers.hubspot.com/docs/api/crm/search

 

Unfortunately the response did not say anything about it.

RBotha-sp
Solução
Participante

Contact Search API 400 Bad Request when fetching records after 10000

resolver

Hi Tobiwan,

 

Yes, indeed the documentation mentions this limitation. Would have liked to see the actual error in the response.

However, we've got some 20,000+ records to retrieve via the Search facility and now hit this limitation. I've scoured the forum and found that not only has the removal of the limitation already been submitted to HubSpot, but also that other forum members have opted to do a "get all" and filter locally.. 

MadhuManne
Membro

Contact Search API 400 Bad Request when fetching records after 10000

resolver

Hi Team,

 

Can someone please help me with this issue. I was trying to fetch modified records after a particular date. I was able to fetch the records till the "after" value is 9900. Once I move on to the next page with "after" value 10000. It is throwing 400 Bad Request.

 

webdew
Orientador(a) | Parceiro Diamante
Orientador(a) | Parceiro Diamante

Contact Search API 400 Bad Request when fetching records after 10000

resolver

Hi @MadhuManne ,

Hope it will work for you, please use below json for search api :

{
"filterGroups":[
{
"filters":[
{
"propertyName": "lastmodifieddate",
"operator": "GTE",
"value": 1622505600000
}
]
}
],
"limit": 100
}


Hope this helps!


If we were able to answer your query, kindly help the community by marking it as a solution.

Thanks and Regards. 



MadhuManne
Membro

Contact Search API 400 Bad Request when fetching records after 10000

resolver

Hi,

We have started with this as the first API call and when I have to navigate to the next pages I'm adding the "after" parameter. After reaching 10000 records the API is giving 400 Bad Request.