# Smart Inventory Search

**URL:** <https://forum.ansible.com/t/smart-inventory-search/28266>\
**Category:** AWX Project\
**Created:** [August 6, 2018, 6:36am UTC](https://forum.ansible.com/t/smart-inventory-search/28266 "2018-08-06T06:36:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ryan\_Williams](https://avatars.discourse-cdn.com/v4/letter/r/ecc23a/32.png) [@Ryan\_Williams](https://forum.ansible.com/u/Ryan_Williams)\
**Post date:** [August 6, 2018, 6:36am UTC](https://forum.ansible.com/t/smart-inventory-search/28266/1 "2018-08-06T06:36:37Z")

</div>

Hi,

I want to create a smart inventory that produces a list of hosts that have been created in the last 24 hours, 7 days etc, so that it will continually refresh the inventory over time.  
So far all I can do is add a search key with an absolute value such as ‘created:\>=2018-08-01T01:00:00.00Z’.

Is there any existing ability to do this?

thanks

---

<div class="post-metadata">

**Author:** ![walkafwalka](https://avatars.discourse-cdn.com/v4/letter/w/2bfe46/32.png) [@walkafwalka](https://forum.ansible.com/u/walkafwalka)\
**Post date:** [August 6, 2018, 6:53am UTC](https://forum.ansible.com/t/smart-inventory-search/28266/2 "2018-08-06T06:53:48Z")

</div>

I am unsure if there is a way to reference now, but a workaround would be to create a cron job that updates the inventory via the API.
