# Filter read contacts on custom field

**URL:** <https://community.hubspot.com/t/filter-read-contacts-on-custom-field/90380>\
**Category:** APIs & Integrations\
**Tags:** professional\
**Created:** [September 25, 2023, 10:55am UTC](https://community.hubspot.com/t/filter-read-contacts-on-custom-field/90380 "2023-09-25T10:55:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![KimS](https://avatars.discourse-cdn.com/v4/letter/k/838e76/32.png) [@KimS](https://community.hubspot.com/u/KimS)\
**Post date:** [September 25, 2023, 10:55am UTC](https://community.hubspot.com/t/filter-read-contacts-on-custom-field/90380/1 "2023-09-25T10:55:23Z")

</div>

Hello,  
I need to query contacts that have a specific custom field filled. How can I do this?

I found this in the documentation ( [Accounts Dashboard | HubSpot](https://developers.hubspot.com/docs/api/crm/contacts) ) but it’s not clear what each field is for

```lia-code-sample
curl --request POST \
 --url 'https://api.hubapi.com/crm/v3/objects/contacts/batch/read?archived=false' \
 --header 'authorization: Bearer YOUR_ACCESS_TOKEN' \
 --header 'content-type: application/json' \
 --data '{
 "properties": [
 "string"
 ],
 "propertiesWithHistory": [
 "string"
 ],
 "idProperty": "string",
 "inputs": [
 {
 "id": "string"
 }
 ]
}'

```

Thank you

---

<div class="post-metadata">

**Author:** ![bohart](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/bohart/32/74892_2.png) [@bohart](https://community.hubspot.com/u/bohart)\
**Post date:** [September 25, 2023, 12:48pm UTC](https://community.hubspot.com/t/filter-read-contacts-on-custom-field/90380/2 "2023-09-25T12:48:04Z")

</div>

Hi @KimS,  
You can use `/crm/v3/objects/contact/search` endpoint instead (to search contacts by any of their properties). It should be more understandable. Here is a callback example:

```lia-code-sample
curl 'https://api.hubapi.com/crm/v3/objects/contact/search' \
 -H 'authorization: Bearer YOUR_ACCESS_TOKEN' \
 -H 'content-type: application/json' \
 --data '{
 "filterGroups": [
 {
 "filters": [
 {
 "propertyName": "PROPERTY_NAME_TO_FILTER/SEARCH",
 "operator": "EQ",
 "value": "YOUR_VALUE_TO_SEARCH_IN_THE_PROPERTY"
 }
 ]
 }
 ],
 "properties": [
 "property_name1_to_include_in_the_results_for_all_found_contacts",
 "property_name2_to_include_in_the_results_for_all_found_contacts"
 ],
 "limit": 10
}'

```

---

<div class="post-metadata">

**Author:** ![KimS](https://avatars.discourse-cdn.com/v4/letter/k/838e76/32.png) [@KimS](https://community.hubspot.com/u/KimS)\
**Post date:** [September 25, 2023, 12:57pm UTC](https://community.hubspot.com/t/filter-read-contacts-on-custom-field/90380/3 "2023-09-25T12:57:35Z")

</div>

Thank you very much, works like a charm.

---

<div class="post-metadata">

**Author:** ![KimS](https://avatars.discourse-cdn.com/v4/letter/k/838e76/32.png) [@KimS](https://community.hubspot.com/u/KimS)\
**Post date:** [September 25, 2023, 2:24pm UTC](https://community.hubspot.com/t/filter-read-contacts-on-custom-field/90380/4 "2023-09-25T14:24:17Z")

</div>

Actually, what about paging there?  
I did a test with limit = 1 (had only 2 items with said field)  
And it returns

“paging”:{“next”:{“after”:“1”}}}  
what is the next call to make for next page then?
