# Web services API filter operators
Many of the Magento web services API methods facilitate listing certain types of data - customers, products, orders, etc. However, when using these methods we rarely want to retrieve every record. Luckily there are a number of filter operators that can be used to narrow the result set that will be returned.

The following is a basic example of how to get a list of all customers in PHP:
$server = new SoapClient(&#39;http://magentohost/api/soap/?wsdl&#39;);
$sessionID = $server-&gt;login(&#39;api_user&#39;, &#39;api_key&#39;);
$server-&gt;call($sessionID, &#39;customer.list&#39;);
Now, suppose we want to retrieve only those customers updated since 10/06/2009. We can do this by adding a filter operator to the last line:
$server-&gt;call($sessionID, &#39;customer.list&#39;, array(array(&#39;updated_at&#39; =&gt; array(&#39;from&#39; =&gt; &#39;2009-06-10&#39;))));
Alternatively, we could get only those customers whose email addresses start with 'jim':
$server-&gt;call($sessionID, &#39;customer.list&#39;, array(array(&#39;email&#39; =&gt; array(&#39;like&#39; =&gt; &#39;jim%&#39;))));
There are quite a few filter operators available which directly correspond to SQL operators, since that's what they are translated to internally.

 OperatorExplanation
 fromAfter the given timestamp
 toBefore the given timestamp
 likeLike the given text (SQL syntax, using % for wildcards)
 nlikeNot like the given text (SQL syntax)
 eqEqual to the given value
 neqNot equal to the given value
 inIn the given array
 ninNot in the given array
 nullIs null
 notnullIs not null
 gtGreater than
 ltLess than
 gteqGreater than or equal to
 lteqLess than or equal to