# Deal Search API - filtering last modified date

**URL:** <https://community.hubspot.com/t/deal-search-api-filtering-last-modified-date/47925>\
**Category:** APIs & Integrations\
**Tags:** developer-tools, object\
**Created:** [December 3, 2021, 3:11am UTC](https://community.hubspot.com/t/deal-search-api-filtering-last-modified-date/47925 "2021-12-03T03:11:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stanza](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stanza/32/5125_2.png) [@Stanza](https://community.hubspot.com/u/Stanza)\
**Post date:** [December 3, 2021, 3:11am UTC](https://community.hubspot.com/t/deal-search-api-filtering-last-modified-date/47925/1 "2021-12-03T03:11:23Z")

</div>

Hi,

I have the search API:

`https://api.hubapi.com/crm/v3/objects/deals/search?hapikey=[API_KEY]`

```lia-code-sample
{

 "filterGroups": [
 {
 "filters": [
 {
 "value": "7695775",
 "operator": "EQ",
 "propertyName": "dealstage"
 },
 {
 "value": "hs_lastmodifieddate",
 "operator": "GTE",
 "propertyName": "1638316800"
 }
 ]
 }
 ],
 "properties": [
 "dealname"
 ]
}

```

I get the following error:

```lia-code-sample
{
 "status": "error",
 "message": "There was a problem with the request.",
 "correlationId": "24709551-9717-4d21-b969-f4a2442ac88e"
}

```

I have tried seconds and milliseconds but get the same error.

Any ideas ?

I have tried using the epoch time converter but no luck.

---

<div class="post-metadata">

**Author:** ![RMones](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/rmones/32/82797_2.png) [@RMones](https://community.hubspot.com/u/RMones)\
**Post date:** [December 3, 2021, 11:44am UTC](https://community.hubspot.com/t/deal-search-api-filtering-last-modified-date/47925/2 "2021-12-03T11:44:06Z")

</div>

Hi @Stanza ,

You have to swap the value and propertyName. You mixed the value and propertyName aths\_lastmodifieddate:  
{  
“ **value** ”: “hs\_lastmodifieddate”,  
“operator”: “GTE”,  
“ **propertyName** ”: “1638316800”  
}

to  
{  
“ **propertyName** ”: “hs\_lastmodifieddate”,  
“operator”: “GTE”,  
“ **value** ”: “1638316800”  
}

Regards, Ronald

---

<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:** [December 3, 2021, 3:40pm UTC](https://community.hubspot.com/t/deal-search-api-filtering-last-modified-date/47925/3 "2021-12-03T15:40:00Z")

</div>

Spot on @RMones !

Also, make sure you are working with a unix timestamp in milliseconds!

---

<div class="post-metadata">

**Author:** ![Stanza](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stanza/32/5125_2.png) [@Stanza](https://community.hubspot.com/u/Stanza)\
**Post date:** [December 6, 2021, 2:49am UTC](https://community.hubspot.com/t/deal-search-api-filtering-last-modified-date/47925/4 "2021-12-06T02:49:52Z")

</div>

yes - have sorted this oiut - there were multiple tickets from me about this - I have to created another one since the first got tagged as spam - dunno why.
