# What is the syntax of "search" and "where" in PHP API?

**URL:** <https://forum.mautic.org/t/what-is-the-syntax-of-search-and-where-in-php-api/19913>\
**Category:** Product Support\
**Created:** [June 20, 2021, 5:33pm UTC](https://forum.mautic.org/t/what-is-the-syntax-of-search-and-where-in-php-api/19913 "2021-06-20T17:33:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![imog](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/imog/32/3813_2.png) [@imog](https://forum.mautic.org/u/imog)\
**Post date:** [June 20, 2021, 5:33pm UTC](https://forum.mautic.org/t/what-is-the-syntax-of-search-and-where-in-php-api/19913/1 "2021-06-20T17:33:56Z")

</div>

I’ve missing deeper explanation and more examples when it comes up to filter out something using the PHP API. What is the right syntax? What is possible to do here?  
[https://developer.mautic.org/#list-contacts](https://developer.mautic.org/#list-contacts)

Could it be, “search” is simply the same as one puts into the searchbox of the WebGUI?

```auto
Search Help
Loading...
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.
% - Use the % as a wildcard to search for specific names or values in a phrase (i.e. to find all companies with the word ‘Technologies’ then type %technologies%)

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} + ...
tag:*
stage:*
email_sent:EMAIL_ID
email_read:EMAIL_ID
email_queued:EMAIL_ID
email_pending:EMAIL_ID

```

---

<div class="post-metadata">

**Author:** ![prajith](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/prajith/32/6465_2.png) [@prajith](https://forum.mautic.org/u/prajith)\
**Post date:** [September 2, 2022, 12:45pm UTC](https://forum.mautic.org/t/what-is-the-syntax-of-search-and-where-in-php-api/19913/2 "2022-09-02T12:45:02Z")

</div>

can you please suggest one example (line of code) for group expression in any language except php
