Contacts search doesn't work correctly

I’m trying to retrieve the contact with the lowest ID in our portal and I’m seeing inconsistent results between the search and list endpoints.
Request 1 (search for lowest ID):

POST https://api.hubapi.com/crm/v3/objects/0-1/search.....{ "sorts": [ { "propertyName": "hs_object_id", "direction": "ASCENDING" } ], "limit": 1}

Response:

{ "total": 1979571, "results": [ { "id": "151963695916", "properties": { "createdate": "2025-09-01T04:43:05Z", "lastmodifieddate": "2025-09-01T12:18:02.674Z", ..... }, "createdAt": "2025-09-01T04:43:05Z", "updatedAt": "2025-09-01T12:18:02.674Z", "archived": false } ], "paging": { "next": { "after": "1" } }}

This suggests the lowest ID is 151963695916.

Request 2 (list with limit=1):

GET https://api.hubapi.com/crm/v3/objects/0-1?limit=1

Response is:

{ "results": [ { "id": "17", "properties": { "createdate": "2014-05-29T02:05:44.329Z", "hs_object_id": "17", "lastmodifieddate": "2025-08-29T11:05:49.187Z", ...... }, "createdAt": "2014-05-29T02:05:44.329Z", "updatedAt": "2025-08-29T11:05:49.187Z", "archived": false } ], "paging": { "next": { "after": "18", "link": "https://api.hubapi.com/crm/objects/v3/0-1?limit=1&after=18" } }}

This shows the lowest ID is 17.

Expected: Both endpoints should be consistent; the search sorted by hs_object_id ascending with limit: 1 should return the record with ID 17.

Actual: /crm/v3/objects/0-1/search returns 151963695916 instead.

Could you please investigate and fix this inconsistency ASAP?

Hi @Sachavskyi
Thank you for reaching out to the Community!
I’d like to invite some community members who are subject matter experts to join this conversation.
@karstenkoehler @TomM2 @Humashankar - Would you be able to share any insights on this? Your expertise would be greatly appreciated.
Best,
Victor

Hi @Sachavskyi,

I think there may be a little mix-up in how the endpoints are being compared. The two requests you tested are actually different API types, which is why the outputs don’t align:

  • The first example is using POST → this is a search endpoint, which is designed for querying indexed data with filters and sorting.
  • The second example is using GET /crm/v3/objects/0-1 → this is a List (Retrieve) endpoint, which simply returns raw records sequentially.

Since these endpoints are built for different purposes (search vs. retrieval), it’s expected that you’ll see different behavior.

For clarity, here are the official docs:

If your goal is to get oldest contacts from HubSpot records, I think the below GET API call is correct and you can see that Create date also very old, which means output is correct.

GET https://api.hubapi.com/crm/v3/objects/0-1?limit=1


Community.png