# Get the recently modified custom object

**URL:** <https://community.hubspot.com/t/get-the-recently-modified-custom-object/39947>\
**Category:** APIs & Integrations\
**Tags:** starter\
**Created:** [June 30, 2021, 2:19pm UTC](https://community.hubspot.com/t/get-the-recently-modified-custom-object/39947 "2021-06-30T14:19:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaleperez](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kaleperez/32/69256_2.png) [@kaleperez](https://community.hubspot.com/u/kaleperez)\
**Post date:** [June 30, 2021, 2:19pm UTC](https://community.hubspot.com/t/get-the-recently-modified-custom-object/39947/1 "2021-06-30T14:19:57Z")

</div>

Hi,

How can I get the recently modified records in my custom object through API?. I found the documentation for contact and deals, but not for the custom objects.

I used this [https://api.hubapi.com/crm/v3/objects/](https://api.hubapi.com/crm/v3/objects/), but I couldn’t find the method to order by modified date.

Thanks in advance,

Kale

---

<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:** [June 30, 2021, 9:37pm UTC](https://community.hubspot.com/t/get-the-recently-modified-custom-object/39947/2 "2021-06-30T21:37:31Z")

</div>

Hi @kaleperez

I do not believe that exists yet in the v3 endpoints as it does in the v1. You could use the [search api](https://developers.hubspot.com/docs/api/crm/search) and filter by date

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [July 1, 2021, 8:25am UTC](https://community.hubspot.com/t/get-the-recently-modified-custom-object/39947/3 "2021-07-01T08:25:42Z")

</div>

Hi @kaleperez ,

Hope this will work :  
Please check below code for get the recently modified custom object  
$data = ‘{  
“sorts”: [  
{  
“propertyName”: “\<updated\_date\_key\>”,  
“direction”: “DESCENDING”  
}  
]  
}’;  
$ch = curl\_init();  
curl\_setopt($ch, CURLOPT\_URL, ‘[https://api.hubapi.com/crm/v3/objects/\](https://api.hubapi.com/crm/v3/objects/%5C)/search?hapikey=YOUR\_HUBSPOT\_API\_KEY’);  
curl\_setopt($ch, CURLOPT\_RETURNTRANSFER, 1);  
curl\_setopt($ch, CURLOPT\_POST, 1);  
curl\_setopt($ch, CURLOPT\_POSTFIELDS, $data);  
$headers = array();  
$headers[] = ‘Content-Type: application/json’;  
curl\_setopt($ch, CURLOPT\_HTTPHEADER, $headers);  
$result = curl\_exec($ch);  
if (curl\_errno($ch)) {  
echo ‘Error:’ . curl\_error($ch);  
}  
curl\_close($ch);

Hope this helps!

If we were able to answer your query, kindly help the community by marking it as a solution.  
Thanks and Regards.

---

<div class="post-metadata">

**Author:** ![kaleperez](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kaleperez/32/69256_2.png) [@kaleperez](https://community.hubspot.com/u/kaleperez)\
**Post date:** [July 1, 2021, 3:45pm UTC](https://community.hubspot.com/t/get-the-recently-modified-custom-object/39947/4 "2021-07-01T15:45:59Z")

</div>

Thank you, I really appreciate your help. Perfect Solution.
