# API - Search for items containing text

**URL:** <https://discourse.getcockpit.com/t/api-search-for-items-containing-text/2065>\
**Category:** Uncategorized\
**Created:** [September 6, 2021, 8:09pm UTC](https://discourse.getcockpit.com/t/api-search-for-items-containing-text/2065 "2021-09-06T20:09:13Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![abernh](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/abernh/32/859_2.png) [@abernh](https://discourse.getcockpit.com/u/abernh)\
**Post date:** [September 7, 2021, 8:07am UTC](https://discourse.getcockpit.com/t/api-search-for-items-containing-text/2065/2 "2021-09-07T08:07:55Z")

</div>

Yes, there is such a thing, the `$regex` filter.

POST:  
`api/collections/get/articles`  
Body:

```auto
{     
  "limit": 10,     
  "filter": {   
    "content": {      
      "$regex" : "(phone|tablet)" // a valid PHP regular expression without slashes
    }
  },     
  "sort": { 
    "_created" : -1
  } 
}

```

rel [Search itens by term - #4 by artur](https://discourse.getcockpit.com/t/search-itens-by-term/70/4)

---

_[View the full topic](https://discourse.getcockpit.com/t/api-search-for-items-containing-text/2065)._
