# Contact search filter

**URL:** https://forum.mautic.org/t/contact-search-filter/7582
**Category:** Product Support
**Created:** [February 17, 2017, 8:06pm UTC](https://forum.mautic.org/t/contact-search-filter/7582 "2017-02-17T20:06:37Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![ferriol](https://avatars.discourse-cdn.com/v4/letter/f/34f0e0/32.png) [@ferriol](https://forum.mautic.org/u/ferriol)
#### Post date: [February 17, 2017, 8:06pm UTC](https://forum.mautic.org/t/contact-search-filter/7582/1 "2017-02-17T20:06:37Z")

</div>

I use the method countLeads() of LeadModel to count contacts with certain values in custom fields. I discovered that this method uses the same filter of Contact list page search tool.  
  
In the Contact list page there is some help (below), but is not enough for me.  
  
Is there any place where is more explained its syntax ?  
  
I specifically want to know: How can I filter for a datetime field. For now I specifically what to be all contacts that has its date field of a month. For example: Filter all contacts with the custom field date of February  
  
  
  
Thanks !  
  
  
  
Search Operators:

- (plus sign) - Search for the exact string (i.e. if admin, then administrator will not match)  
  
! (exclamation mark) - Not equals string  
  
" " (double quotes) - Search by phrase  
  
( ) (parentheses) - Group expressions together.  
  
OR - By default the expressions will be joined as AND statements. Use the OR operator to change that.  
  
  
  
Search commands  
  
is:anonymous  
  
is:unowned  
  
is:mine  
  
email:  
  
_segment:{segment\_alias}_  
  
_name:_  
  
company:  
  
_owner:_  
  
ip:\*  
  
ids:ID1,ID2 (comma separated IDs, no spaces)  
  
common:{segment\_alias} + {segment\_alias} + …

---

<div class="post-metadata">

### Author: ![ferriol](https://avatars.discourse-cdn.com/v4/letter/f/34f0e0/32.png) [@ferriol](https://forum.mautic.org/u/ferriol)
#### Post date: [February 17, 2017, 8:06pm UTC](https://forum.mautic.org/t/contact-search-filter/7582/2 "2017-02-17T20:06:37Z")

</div>

I use the method countLeads() of LeadModel to count contacts with certain values in custom fields. I discovered that this method uses the same filter of Contact list page search tool.  
In the Contact list page there is some help (below), but is not enough for me.  
Is there any place where is more explained its syntax ?  
I specifically want to know: How can I filter for a datetime field. For now I specifically what to be all contacts that has its date field of a month. For example: Filter all contacts with the custom field date of February

Thanks !

Search Operators:

- (plus sign) - Search for the exact string (i.e. if admin, then administrator will not match)  
! (exclamation mark) - Not equals string  
" " (double quotes) - Search by phrase  
( ) (parentheses) - Group expressions together.  
OR - By default the expressions will be joined as AND statements. Use the OR operator to change that.

Search commands  
is:anonymous  
is:unowned  
is:mine  
email:\*  
segment:{segment\_alias}  
name:\*  
company:\*  
owner:\*  
ip:\*  
ids:ID1,ID2 (comma separated IDs, no spaces)  
common:{segment\_alias} + {segment\_alias} + …
