Learn how to use the Netcore CE Audience Contact Search API V5 with multiple use cases.
Use the Audience Contact Search API to search for contacts within a specific audience, such as a list, CCG, UDT, or segment. You can filter contacts using multiple conditions, sort the results, paginate through matching contacts, or retrieve only the total count.
The API is synchronous. The response contains the search results or count directly.
Search Contacts in an Audience
- When to use: Use this when you want to retrieve contacts belonging to a specific audience and apply one or more filters.
- What changes: Set
audience_type, definefiltering_criteria, and specify the fields you want returned inoutput.fields. - Best for: Finding a targeted set of contacts within an audience.
{
"audience_type": "list",
"filtering_criteria": [
{
"condition_operator": "and",
"condition_details": [
{
"field": "contact_type",
"field_category": "config",
"operation": "equals",
"value": [
"identified"
]
}
]
}
],
"output": {
"fields": [
"EMAIL",
"MOBILE",
"CITY"
],
"pagination": {
"page": 1,
"limit": 10
}
}
}
Good to know
filtering_criteriadefines the conditions used to find matching contacts.output.paginationandoutput.fieldsare required when retrieving contact data.output.pagination.pagestarts at 1.output.pagination.limithas a minimum value of 10.
Search Contacts Using Multiple Conditions
- When to use: Use this when you want to find contacts that match multiple conditions, such as identified contacts with a specific attribute.
- What changes: Add multiple objects inside
condition_detailsand usecondition_operatorto determine how those conditions are combined. - Best for: Targeted searches, such as finding premium customers in a particular location.
{
"audience_type": "list",
"filtering_criteria": [
{
"condition_operator": "and",
"condition_details": [
{
"field": "contact_type",
"field_category": "config",
"operation": "equals",
"value": [
"identified"
]
},
{
"field": "CUSTOMER_TYPE",
"field_category": "attribute",
"operation": "equals",
"value": [
"Premium"
]
}
]
}
],
"output": {
"fields": [
"EMAIL",
"MOBILE",
"CUSTOMER_TYPE"
],
"pagination": {
"page": 1,
"limit": 10
}
}
}
Good to know
condition_operatorsupportsandandor. Useandwhen all conditions must match, andorwhen any condition can match.
Search Contacts Using or Conditions
- When to use: Use this when contacts can match any one of multiple conditions.
- What changes: Set
condition_operatortoor. - Best for: Searches where a contact can qualify based on different values, such as customers from multiple customer types.
{
"audience_type": "list",
"filtering_criteria": [
{
"condition_operator": "or",
"condition_details": [
{
"field": "CUSTOMER_TYPE",
"field_category": "attribute",
"operation": "equals",
"value": [
"Premium"
]
},
{
"field": "CUSTOMER_TYPE",
"field_category": "attribute",
"operation": "equals",
"value": [
"Enterprise"
]
}
]
}
],
"output": {
"fields": [
"EMAIL",
"CUSTOMER_TYPE"
],
"pagination": {
"page": 1,
"limit": 10
}
}
}Search Contacts with a Specific Attribute Value
- When to use: Use this when you want to find contacts based on a custom contact attribute.
- What changes: Set
field_categorytoattributeand provide the attribute name infield. - Best for: Finding contacts based on information such as customer type, location, membership status, or other configured attributes.
{
"audience_type": "list",
"filtering_criteria": [
{
"condition_operator": "and",
"condition_details": [
{
"field": "STATE",
"field_category": "attribute",
"operation": "equals",
"value": [
"Maharashtra"
]
}
]
}
],
"output": {
"fields": [
"EMAIL",
"MOBILE",
"STATE"
],
"pagination": {
"page": 1,
"limit": 10
}
}
}
Good to knowThe attribute name used in
fieldmust correspond to an attribute available for the account. Use the exact attribute name configured in your account.
Search Contacts with Pattern Matching
- When to use: Use this when you want to find contacts whose field values begin with a specific value.
- What changes: Use the
startswithoperation. - Best for: Searches such as finding contacts whose email or another supported field starts with a particular value.
{
"audience_type": "list",
"filtering_criteria": [
{
"condition_operator": "and",
"condition_details": [
{
"field": "EMAIL",
"field_category": "attribute",
"operation": "startswith",
"value": [
"john"
]
}
]
}
],
"output": {
"fields": [
"EMAIL",
"MOBILE"
],
"pagination": {
"page": 1,
"limit": 10
}
}
}Get the Count of Matching Contacts
- When to use: Use this when you only need to know how many contacts match your search criteria and do not need the contact records.
- What changes: Set the count mode to return only the total number of matching records.
- Best for: Audience size checks, validation before campaigns, reporting, or determining how many contacts meet a condition.
{
"audience_type": "list",
"filtering_criteria": [
{
"condition_operator": "and",
"condition_details": [
{
"field": "CUSTOMER_TYPE",
"field_category": "attribute",
"operation": "equals",
"value": [
"Premium"
]
}
]
}
],
"output": {
"get_count": true
}
}Search Contacts with Sorting and Pagination
- When to use: Use this when you need to retrieve contacts in a specific order and process the results page by page.
- What changes: Define
output.sortingandoutput.pagination. - Best for: Applications that display or process contacts in batches.
{
"audience_type": "list",
"filtering_criteria": [
{
"condition_operator": "and",
"condition_details": [
{
"field": "contact_type",
"field_category": "config",
"operation": "equals",
"value": [
"identified"
]
}
]
}
],
"output": {
"fields": [
"EMAIL",
"MOBILE",
"CITY"
],
"sorting": [
{
"field": "created_at",
"direction": "desc"
}
],
"pagination": {
"page": 1,
"limit": 10
}
}
}Notes for Audience Contact Search endpoint
pagehas a minimum value of 1.limithas a minimum value of 10.directionsupportsascanddesc.- Sorting is ignored when count mode is enabled.
