# Retrieve object directly after creation not working

**URL:** <https://community.hubspot.com/t/retrieve-object-directly-after-creation-not-working/72097>\
**Category:** APIs & Integrations\
**Tags:** developer-tools, sdk, professional\
**Created:** [January 3, 2023, 9:21am UTC](https://community.hubspot.com/t/retrieve-object-directly-after-creation-not-working/72097 "2023-01-03T09:21:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![paulem](https://avatars.discourse-cdn.com/v4/letter/p/dec6dc/32.png) [@paulem](https://community.hubspot.com/u/paulem)\
**Post date:** [January 3, 2023, 9:21am UTC](https://community.hubspot.com/t/retrieve-object-directly-after-creation-not-working/72097/1 "2023-01-03T09:21:11Z")

</div>

I integrated HubSpot into our application via the nodejs library. In order to test the integration, i had the following simple setup:

**1. Create a new object**

const { id } = await hubspotClient.crm.objects.basicApi.create(objectTypeId, {

properties: {

name,

customid,

}});

**2. Retrieve object**

const subscriptions = await hubspotClient.crm.objects.searchApi.doSearch(objectTypeId, {

filterGroups: [{

filters: [{

propertyName: ‘customid’,

operator: ‘EQ’,

value: customid,

}],

}],

limit: 1,

after: 0,

sorts: [],

properties: [‘name’, ‘customid’],

});

But the resulting page is empty. Only if I run add a 3sec delay on the second request I get a result.

Is this a generall limitation of the API or could this be related to our instance still being in trial? Or is there some other fix for this?

---

<div class="post-metadata">

**Author:** ![vbrech](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/vbrech/32/52876_2.png) [@vbrech](https://community.hubspot.com/u/vbrech)\
**Post date:** [January 3, 2023, 10:03am UTC](https://community.hubspot.com/t/retrieve-object-directly-after-creation-not-working/72097/2 "2023-01-03T10:03:06Z")

</div>

A documented limitation of the CRM Search APIs is that “It may take a few moments for newly created or updated CRM objects to appear in search results.” ([doc](https://developers.hubspot.com/docs/api/crm/search)). Your initial request should return an HubSpot object ID, however, which you should then be able to use to directly fetch the object by ID (“basicApi” rather than “searchApi” in the second request).
