The CRM search endpoints make getting data more efficient by allowing developers to filter, sort, and search across any CRM object type.
POST
request to the object’s search endpoint. CRM search endpoints are constructed using the following format: /crm/v3/objects/{object}/search
. In the request body, you’ll include filters to narrow your search by CRM property values. For example, the code snippet below would retrieve a list of all contacts that have a specific company email address.
createdate
, email
, firstname
, hs_object_id
, lastmodifieddate
, and lastname
. For example, the above request would return the following response:
properties
array in the request body. For example:
Search endpoint | Object | Default returned properties |
---|---|---|
/crm/v3/objects/carts/search | Carts | createdate , hs_lastmodifieddate , hs_object_id |
/crm/v3/objects/companies/search | Companies | name , domain , createdate ,hs_lastmodifieddate , hs_object_id |
/crm/v3/objects/contacts/search | Contacts | firstname ,lastname ,email ,lastmodifieddate ,hs_object_id , createdate |
/crm/v3/objects/deals/search | Deals | dealname , amount , closedate,``pipeline ,dealstage , createdate , hs_lastmodifieddate , hs_object_id |
/crm/v3/objects/deal_split/search | Deal splits | hs_createdate , hs_lastmodifieddate , hs_object_id |
/crm/v3/objects/discounts/search | Discounts | createdate , hs_lastmodifieddate , hs_object_id |
/crm/v3/objects/feedback_submissions/search | Feedback submissions | hs_createdate ,hs_lastmodifieddate ,hs_object_id |
/crm/v3/objects/fees/search | Fees | createdate , hs_lastmodifieddate , hs_object_id |
/crm/v3/objects/invoices/search | Invoices | createdate , hs_lastmodifieddate , hs_object_id |
/crm/v3/objects/leads/search | Leads | createdate , hs_lastmodifieddate , hs_object_id |
/crm/v3/objects/line_items/search | Line items | quantity , amount , price , createdate , hs_lastmodifieddate , hs_object_id |
/crm/v3/objects/orders/search | Orders | createdate , hs_lastmodifieddate , hs_object_id |
/crm/v3/objects/commerce_payments/search | Payments | createdate , hs_lastmodifieddate , hs_object_id |
/crm/v3/objects/products/search | Products | name , description ,price , createdate , hs_lastmodifieddate , hs_object_id |
/crm/v3/objects/quotes/search | Quotes | hs_expiration_date , hs_public_url_key , hs_status ,hs_title , hs_createdate , hs_lastmodifieddate ,hs_object_id |
/crm/v3/objects/subscriptions/search | Subscriptions (Commerce) | hs_createdate , hs_lastmodifieddate , hs_object_id |
/crm/v3/objects/taxes/search | Taxes | createdate , hs_lastmodifieddate , hs_object_id |
/crm/v3/objects/tickets/search | Tickets | content , hs_pipeline , hs_pipeline_stage ,hs_ticket_category , hs_ticket_priority , subject ,createdate , hs_lastmodifieddate , hs_object_id |
Search endpoint | Engagement | Default returned properties |
---|---|---|
/crm/v3/objects/calls/search | Calls | hs_createdate ,hs_lastmodifieddate ,hs_object_id |
/crm/v3/objects/emails/search | Emails | hs_createdate ,hs_lastmodifieddate ,hs_object_id |
/crm/v3/objects/meetings/search | Meetings | hs_createdate ,hs_lastmodifieddate ,hs_object_id |
/crm/v3/objects/notes/search | Notes | hs_createdate ,hs_lastmodifieddate ,hs_object_id |
/crm/v3/objects/tasks/search | Tasks | hs_createdate ,hs_lastmodifieddate ,hs_object_id |
X
.
Search endpoint | Object | Default searchable properties |
---|---|---|
/crm/v3/objects/calls/search | Calls | hs_call_title , hs_body_preview |
/crm/v3/objects/companies/search | Companies | website , phone , name , domain |
/crm/v3/objects/contacts/search | Contacts | firstname ,lastname ,email ,phone ,hs_additional_emails , fax , mobilephone , company , hs_marketable_until_renewal |
/crm/v3/objects/{objectType}/search | Custom objects | Up to 20 selected properties. |
/crm/v3/objects/deals/search | Deals | dealname ,pipeline ,dealstage , description , dealtype |
/crm/v3/objects/emails/search | Emails | hs_email_subject |
/crm/v3/objects/feedback_submissions/search | Feedback submissions | hs_submission_name , hs_content |
/crm/v3/objects/meetings/search | Meetings | hs_meeting_title , hs_meeting_body |
/crm/v3/objects/notes/search | Notes | hs_note_body |
/crm/v3/objects/products/search | Products | name , description ,price , hs_sku |
/crm/v3/objects/quotes/search | Quotes | hs_sender_firstname , hs_sender_lastname , hs_proposal_slug , hs_title , hs_sender_company_name , hs_sender_email , hs_quote_number , hs_public_url_key |
/crm/v3/objects/tasks/search | Tasks | hs_task_body , hs_task_subject |
/crm/v3/objects/tickets/search | Tickets | subject , content , hs_pipeline_stage , hs_ticket_category , hs_ticket_id |
hs_body_preview_html
is not supported. For emails, the properties hs_email_html
and hs_body_preview
are also not supported.filters
within filterGroups
:
filters
.filters
within a filterGroup
.You can include a maximum of five filterGroups
with up to 6 filters
in each group, with a maximum of 18 filters in total. If you’ve included too many groups or filters, you’ll receive a VALIDATION_ERROR
error response. For example, the request below searches for contacts with the first name Alice
AND a last name other than Smith
, OR contacts that don’t have a value for the property email
.IN
and NOT_IN
operators, the searched values must be lowercase.Below are the available filter operators:Operator | Description |
---|---|
LT | Less than the specified value. |
LTE | Less than or equal to the specified value. |
GT | Greater than the specified value. |
GTE | Greater than or equal to the specified value. |
EQ | Equal to the specified value. |
NEQ | Not equal to the specified value. |
BETWEEN | Within the specified range. In your request, use key-value pairs to set highValue and value . Refer to the example below the table. |
IN | Included within the specified list. Searches by exact match. In your request, include the list values in a values array. When searching a string property with this operator, values must be lowercase. Refer to the example below the table. |
NOT_IN | Not included within the specified list. In your request, include the list values in a values array. When searching a string property with this operator, values must be lowercase. |
HAS_PROPERTY | Has a value for the specified property. |
NOT_HAS_PROPERTY | Doesn’t have a value for the specified property. |
CONTAINS_TOKEN | Contains a token. In your request, you can use wildcards (*) to complete a partial search. For example, use the value *@hubspot.com to retrieve contacts with a HubSpot email address. |
NOT_CONTAINS_TOKEN | Doesn’t contain a token. |
BETWEEN
operator to search for all tasks that were last modified within a specific time range:
IN
operator to search for companies that have specified values selected in a dropdown property.
associations.{objectType}
. For example, the request below searches for all tickets associated with a contact that has the contact ID of 123
:
limit
parameter in the request body. The maximum number of supported objects per page is 200. For example, the request below would return pages containing 20 results each.
after
parameter provided in the paging.next.after
property of the previous response. If the paging.next.after
property isn’t provided, there are no additional results to display. You must format the value in the after
parameter as an integer. For example, the request below would return the next page of results:
filterGroups
with up to six filters
in each group, with a maximum of 18 filters in total.hs_searchable_calculated_*
. As a part of this standardization, HubSpot only uses the area code and local number. You should refrain from including the country code in your search or filter criteria.