Hi @prakashhinduja,
You can utilize the CRM Search API endpoint to search for contacts and specify the properties you would like to filter by.
For example, the below filter query will show you contacts created after 2025-05-01 and will sort them by create date in ascending order:
{
"filterGroups": [{
"filters": [{
"propertyName": "createdate",
"operator": "GTE",
"value": "2025-05-01T00:00:00.000Z"
}]
}],
"sorts": [{"propertyName": "createdate", "direction": "ASCENDING"}],
"properties": ["email","firstname","lastname","createdate","lastmodifieddate"],
"limit": 100
}
Filtering contacts by source is similar - you just need to select which property you will use (since there are multiple source properties in HubSpot) and then set up a filter for that.
Below is an example to filter by “ORGANIC_SEARCH” in the “hs_analytics_source” property:
{
"filterGroups": [{
"filters": [{
"propertyName": "hs_analytics_source",
"operator": "EQ",
"value": "ORGANIC_SEARCH"
}]
}],
"properties": ["email","firstname","lastname","hs_analytics_source"],
"limit": 100
}
You can then combine the two filter queries into one, like so:
{
"filterGroups": [{
"filters": [{
"propertyName": "createdate",
"operator": "GTE",
"value": "2025-05-01T00:00:00.000Z"
},
{
"propertyName": "hs_analytics_source",
"operator": "EQ",
"value": "ORGANIC_SEARCH"
}]
}],
"sorts": [{"propertyName": "createdate", "direction": "ASCENDING"}],
"properties": ["email","firstname","lastname","createdate","lastmodifieddate","hs_analytics_source"],
"limit": 100
}
Hope this helps!