# https://api.hubapi.com/crm/v3/objects/contacts/search filter by email

**URL:** <https://community.hubspot.com/t/https-api-hubapi-com-crm-v3-objects-contacts-search-filter-by-email/43346>\
**Category:** APIs & Integrations\
**Tags:** contacts\
**Created:** [September 3, 2021, 7:45am UTC](https://community.hubspot.com/t/https-api-hubapi-com-crm-v3-objects-contacts-search-filter-by-email/43346 "2021-09-03T07:45:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![PramodJ](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/pramodj/32/9373_2.png) [@PramodJ](https://community.hubspot.com/u/PramodJ)\
**Post date:** [September 3, 2021, 7:45am UTC](https://community.hubspot.com/t/https-api-hubapi-com-crm-v3-objects-contacts-search-filter-by-email/43346/1 "2021-09-03T07:45:22Z")

</div>

Hi all,

Im trying to pass a email filter using the new v3 search like so:

```lia-code-sample
{
 "filterGroups": [
 {
 "filters": [
 {
 "value": "emailmaria@hubspot.com",
 "propertyName": "email",
 "operator": "EQ"
 }
 ]
 }
 ],
 "sorts": [
 "createdate"
 ],
 "properties": [
 "email,firstname,lastname,createdate"
 ],
 "limit": 10,
 "after": 1
}

```

and I have a contact with email **“[emailmaria@hubspot.com](mailto:emailmaria@hubspot.com)”**, but I’m not getting the data in the response.

Response:

```lia-code-sample
{
 "total": 1,
 "results": []
}

```

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [September 6, 2021, 1:28pm UTC](https://community.hubspot.com/t/https-api-hubapi-com-crm-v3-objects-contacts-search-filter-by-email/43346/2 "2021-09-06T13:28:39Z")

</div>

Hi @PramodJ ,  
Hope this will help for you.  
Please use below php code, which is working fine at our end.  
\<?php  
$data = ‘{  
“filterGroups”: [  
{  
“filters”: [  
{  
“value”: “[emailmaria@hubspot.com](mailto:emailmaria@hubspot.com)”,  
“propertyName”: “email”,  
“operator”: “EQ”  
}  
]  
}  
],  
“properties”: [  
“email,firstname,lastname,createdate”  
]  
}’;  
$ch = curl\_init();  
curl\_setopt($ch, CURLOPT\_URL, ‘[https://api.hubapi.com/crm/v3/objects/contacts/search?hapikey=YOUR\_HUBSPOT\_API\_KEY](https://api.hubapi.com/crm/v3/objects/contacts/search?hapikey=YOUR_HUBSPOT_API_KEY)’);  
curl\_setopt($ch, CURLOPT\_RETURNTRANSFER, 1);  
curl\_setopt($ch, CURLOPT\_POST, 1);  
curl\_setopt($ch, CURLOPT\_POSTFIELDS, $data);  
$headers = array();  
$headers[] = ‘Content-Type: application/json’;  
curl\_setopt($ch, CURLOPT\_HTTPHEADER, $headers);  
$result = curl\_exec($ch);  
if (curl\_errno($ch)) {  
echo ‘Error:’ . curl\_error($ch);  
}  
curl\_close($ch);

Hope this helps!

If we were able to answer your query, kindly help the community by marking it as a solution.  
Thanks and Regards.

---

<div class="post-metadata">

**Author:** ![PramodJ](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/pramodj/32/9373_2.png) [@PramodJ](https://community.hubspot.com/u/PramodJ)\
**Post date:** [September 7, 2021, 6:09am UTC](https://community.hubspot.com/t/https-api-hubapi-com-crm-v3-objects-contacts-search-filter-by-email/43346/3 "2021-09-07T06:09:39Z")

</div>

Hey [@webdew](https://community.hubspot.com/t5/user/viewprofilepage/user-id/131510),

This works, the problem with my json request body was, there is 1 entry with that email and I had a non-zero value for **after**  **field** in the request body.

Thanks for the help!
