Search API Delay

Currently I have one integration system which integrates HubSpot entities from one system to other system.
Now, when the various HubSpot entities are created using the API, and when this entities are being fetched using the search API using a filter based on the field - “hs_lastmodifiieddate”, so in this case the latest created entity, even if it is meeting the required filter criteria added in the search API is not getting fetched.
In the documentation of the search API, it is mentioned that there can be a delay while fetching the entities using this API. So to handle this I have added a delay of 15 seconds before creating the entity and making the search entities API call.
But this issue still persists. So is there any way to handle this. Also is this the required behaviour of this API and what is the expected delay.
Also, why this delay is taking place, if it is due to the indexing of the entities done by the HubSpot servers, then is there any way to avoid it.
Currently using the free tier HubSpot. API call made is as follows:

{

“filterGroups”: [

{

“filters”: [

{

“propertyName”: “hs_lastmodifieddate”,

“operator”: “GTE”,

“value”: “1753921075000”,

“values”: null

}

]

}

],

“sorts”: [],

“limit”: null,

“after”: null,

“properties”: null

}

Expecting a speedy reply from the HubSpot community. As I’m currently facing a lots of failures and issues due to this.
Thanks,
Aniket

That delay is just part of how HubSpot works right now, especially on the free tier. HubSpot’s Search API uses backend indexing, and sometimes the new or updated records aren’t immediately available for search, even if you add a delay. I’ve seen this happen with both Contacts and Deals, sometimes for a few seconds, sometimes for a minute or two.

There’s no official way to force immediate indexing, and unfortunately, adding longer delays (20-30 seconds or more) is about the only workaround if you really need to find the entity by search right after creation. Even then, it’s not always 100% reliable, sometimes you have to retry a couple of times.

Why does it happen - HubSpot prioritizes API stability over instant searchability, and that’s just how it goes right now, especially for non-enterprise plans.

If you absolutely need to work with that entity immediately, try to grab the record ID from the create response and use the Get by ID endpoint instead of search. Otherwise, build in some retry logic and a longer timeout. Not ideal, but it’s the reality for now.

@PNofer’s reponse makes a lot of sense. Have you also tested a synchronous solution?