SearchRequest is a JSON Structure definition published by HubSpot, describing 6 properties. It conforms to the https://json-structure.org/draft/2020-12/schema meta-schema.
{
"type": "object",
"description": "A search request for CRM objects. Filter groups are combined with OR logic; filters within a group are combined with AND logic.",
"name": "SearchRequest",
"properties": {
"filterGroups": {
"type": "array",
"description": "An array of filter groups. Records matching any filter group will be included in results (OR logic between groups). Filters within a group are all required (AND logic within groups).",
"items": {
"type": "object",
"description": "A group of filter conditions combined with AND logic. Use multiple filter groups to create OR conditions between groups.",
"properties": {
"filters": {
"type": "array",
"description": "An array of filters, all of which must match (AND logic).",
"items": {
"type": "object",
"description": "A single filter condition for a CRM object property.",
"properties": {
"propertyName": {
"type": "string",
"description": "The name of the CRM property to filter on."
},
"operator": {
"type": "string",
"description": "The comparison operator for the filter.",
"enum": [
"EQ",
"NEQ",
"LT",
"LTE",
"GT",
"GTE",
"BETWEEN",
"IN",
"NOT_IN",
"HAS_PROPERTY",
"NOT_HAS_PROPERTY",
"CONTAINS_TOKEN",
"NOT_CONTAINS_TOKEN"
]
},
"value": {
"type": "string",
"description": "The value to compare against. Not required for HAS_PROPERTY and NOT_HAS_PROPERTY operators."
},
"highValue": {
"type": "string",
"description": "The upper bound value for BETWEEN operator comparisons."
},
"values": {
"type": "array",
"description": "An array of values for IN and NOT_IN operator comparisons.",
"items": {
"type": "object"
}
}
},
"required": [
"propertyName",
"operator"
]
}
}
}
}
},
"sorts": {
"type": "array",
"description": "An array of sort criteria to order the results.",
"items": {
"type": "object",
"description": "A sort criterion for ordering search results.",
"properties": {
"propertyName": {
"type": "string",
"description": "The name of the CRM property to sort by."
},
"direction": {
"type": "string",
"description": "The sort direction.",
"enum": [
"ASCENDING",
"DESCENDING"
]
}
},
"required": [
"propertyName"
]
}
},
"query": {
"type": "string",
"description": "A full-text search query string. When provided, returns records where any searchable property contains the query term."
},
"properties": {
"type": "array",
"description": "An array of property names to include in the response for each record. If not specified, a default set of properties is returned.",
"items": {
"type": "string"
}
},
"limit": {
"type": "integer",
"description": "The maximum number of results to return. Maximum value is 200."
},
"after": {
"type": "string",
"description": "The cursor token for pagination. Use the value from the previous response's paging.next.after to get the next page of results."
}
},
"$schema": "https://json-structure.org/draft/2020-12/schema"
}