# Get updated contacts in date range

**URL:** <https://community.hubspot.com/t/get-updated-contacts-in-date-range/37091>\
**Category:** APIs & Integrations\
**Tags:** developer-tools, professional, contacts\
**Created:** [May 11, 2021, 11:23am UTC](https://community.hubspot.com/t/get-updated-contacts-in-date-range/37091 "2021-05-11T11:23:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anis\_Halayem](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/anis_halayem/32/29368_2.png) [@Anis\_Halayem](https://community.hubspot.com/u/Anis_Halayem)\
**Post date:** [May 11, 2021, 11:23am UTC](https://community.hubspot.com/t/get-updated-contacts-in-date-range/37091/1 "2021-05-11T11:23:31Z")

</div>

Hello Hubspot Community,

We manage to call periodically hubspot api, via a batch, to get the updated or inserted contacts between 2 dates ( in the past ) expressed with timestamp in seconds:

call n°1 at 12:00:31 =\> GTE 12:00:00, LT: 12:00:30  
call n°2 at 12:01:01 =\> GTE 12:00:30, LT: 12:01:00  
…  
and so on

I would like to know if there is a chance that i miss an updated or inserted contact in my different calls to the web service, for example: a contact was updated at 12:00:29 but not returned in call n°1, if yes, what is the best practices and what can you advise me

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [May 12, 2021, 2:16pm UTC](https://community.hubspot.com/t/get-updated-contacts-in-date-range/37091/2 "2021-05-12T14:16:16Z")

</div>

Hi [@Anis\_Halayem](https://community.hubspot.com/t5/user/viewprofilepage/user-id/189257) ,

I don’t know of any reason why that record would be excluded/missed if it is within your search criteria. Curious to know more about your project.

[@Mike\_Eastwood](https://community.hubspot.com/t5/user/viewprofilepage/user-id/9259) , do you have any thoughts?

---

<div class="post-metadata">

**Author:** ![Mike\_Eastwood](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mike_eastwood/32/70075_2.png) [@Mike\_Eastwood](https://community.hubspot.com/u/Mike_Eastwood)\
**Post date:** [May 12, 2021, 10:10pm UTC](https://community.hubspot.com/t/get-updated-contacts-in-date-range/37091/3 "2021-05-12T22:10:58Z")

</div>

Hi [@Anis\_Halayem](https://community.hubspot.com/t5/user/viewprofilepage/user-id/189257)

As far as I know you can NOT search using the API for specific date ranges.

Could you use a [Webhook](https://legacydocs.hubspot.com/docs/methods/webhooks/webhooks-overview), triggered by a Contact Update, to call you system?

Mike

---

<div class="post-metadata">

**Author:** ![Philip\_JCD](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/philip_jcd/32/29572_2.png) [@Philip\_JCD](https://community.hubspot.com/u/Philip_JCD)\
**Post date:** [May 19, 2021, 8:35am UTC](https://community.hubspot.com/t/get-updated-contacts-in-date-range/37091/4 "2021-05-19T08:35:32Z")

</div>

Hello @dennisedson and [@Mike\_Eastwood](https://community.hubspot.com/t5/user/viewprofilepage/user-id/9259) , and thank you for your concern

As a teammate of Anis, I would like to add some context.

We are using HubSpot Company API and calling the /search endpoint with a filter on hs\_lastmodifieddate.

Like this we are able to retrieve the companies updated between a time frame.

Let imagine that a user, on the HubSpot UI update a company at 10:00:29:999 .  
I guess that the process to handle and store this change will probably take more than 1ms, so this company will be “really updated” at 10:00:30:227.  
In this case, which last modified date will be returned? 10:00:29:999 or 10:00:30:227 or something else?

---

<div class="post-metadata">

**Author:** ![Mike\_Eastwood](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mike_eastwood/32/70075_2.png) [@Mike\_Eastwood](https://community.hubspot.com/u/Mike_Eastwood)\
**Post date:** [May 23, 2021, 12:08am UTC](https://community.hubspot.com/t/get-updated-contacts-in-date-range/37091/5 "2021-05-23T00:08:15Z")

</div>

Hi [@Philip\_JCD](https://community.hubspot.com/t5/user/viewprofilepage/user-id/190672)

While I haven’t tried the API Call you are using – in my experience – [all datetime parameters within HubSpot are in UNIX Time in Microseconds](https://legacydocs.hubspot.com/docs/faq/how-should-timestamps-be-formatted-for-hubspots-apis).

So, my assupltion is that if you give a time in Microseconds it should work predictibly.

But – it’s an API so nothing ever works 100% predictably 100% of the time (UNIX or otherwise).

Have fun

Mike
