Skip to main content

Use the CRM search endpoints to filter, sort, and search objects, records, and engagements across your CRM. For example, use the endpoints to get a list of contacts in your account, or a list of all open deals. To use these endpoints from an app, a CRM scope is required. Refer to this list of available scopes to learn which granular CRM scopes can be used to accomplish your goal.

To search your CRM, make a 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.

Each object that you search will include a set of default properties that gets returned. For contacts, a search will return createdate, email, firstname, hs_object_id, lastmodifieddate, and lastname. For example, the above request would return the following response:

To return a specific set of properties, include a properties array in the request body. For example:

The response for the above request would look like:

The tables below contain the object search endpoints, the objects they refer to, and the properties that are returned by default.

Search endpointObjectDefault returned properties
/crm/v3/objects/carts/searchCartscreatedate, hs_lastmodifieddate, hs_object_id
/crm/v3/objects/companies/searchCompaniesname, domain, createdate,hs_lastmodifieddate, hs_object_id
/crm/v3/objects/contacts/searchContactsfirstname,lastname,email,lastmodifieddate,hs_object_id, createdate
/crm/v3/objects/deals/searchDealsdealname, amount, closedate,``pipeline,dealstage, createdate, hs_lastmodifieddate, hs_object_id
/crm/v3/objects/deal_split/searchDeal splitshs_createdate, hs_lastmodifieddate, hs_object_id
/crm/v3/objects/discounts/searchDiscountscreatedate, hs_lastmodifieddate, hs_object_id
/crm/v3/objects/feedback_submissions/searchFeedback submissionshs_createdate,hs_lastmodifieddate,hs_object_id
/crm/v3/objects/fees/searchFeescreatedate, hs_lastmodifieddate, hs_object_id
/crm/v3/objects/invoices/searchInvoicescreatedate, hs_lastmodifieddate, hs_object_id
/crm/v3/objects/leads/searchLeadscreatedate, hs_lastmodifieddate, hs_object_id
/crm/v3/objects/line_items/searchLine itemsquantity, amount, price, createdate, hs_lastmodifieddate, hs_object_id
/crm/v3/objects/orders/searchOrderscreatedate, hs_lastmodifieddate, hs_object_id
/crm/v3/objects/commerce_payments/searchPaymentscreatedate, hs_lastmodifieddate, hs_object_id
/crm/v3/objects/products/searchProductsname, description ,price, createdate, hs_lastmodifieddate, hs_object_id
/crm/v3/objects/quotes/searchQuoteshs_expiration_date, hs_public_url_key, hs_status,hs_title, hs_createdate, hs_lastmodifieddate,hs_object_id
/crm/v3/objects/subscriptions/searchSubscriptions (Commerce)hs_createdate, hs_lastmodifieddate, hs_object_id
/crm/v3/objects/taxes/searchTaxescreatedate, hs_lastmodifieddate, hs_object_id
/crm/v3/objects/tickets/searchTicketscontent, hs_pipeline, hs_pipeline_stage,hs_ticket_category, hs_ticket_priority, subject,createdate, hs_lastmodifieddate, hs_object_id

The table below contains the engagement search endpoints, the engagements they refer to, and the properties that are returned by default.

Search endpointEngagementDefault returned properties
/crm/v3/objects/calls/searchCallshs_createdate,hs_lastmodifieddate,hs_object_id
/crm/v3/objects/emails/searchEmailshs_createdate,hs_lastmodifieddate,hs_object_id
/crm/v3/objects/meetings/searchMeetingshs_createdate,hs_lastmodifieddate,hs_object_id
/crm/v3/objects/notes/searchNoteshs_createdate,hs_lastmodifieddate,hs_object_id
/crm/v3/objects/tasks/searchTaskshs_createdate,hs_lastmodifieddate,hs_object_id

Search all default text properties in records of the specified object to find all records that have a value containing the specified string. By default, the results will be returned in order of object creation (oldest first), but you can override this with sorting. For example, the request below searches for all contacts with a default text property value containing the letter X.

Below are the properties that are searched by default through the above method:

Search endpointObjectDefault searchable properties
/crm/v3/objects/calls/searchCallshs_call_title, hs_body_preview
/crm/v3/objects/companies/searchCompanieswebsite, phone, name, domain
/crm/v3/objects/contacts/searchContactsfirstname,lastname,email,phone,hs_additional_emails, fax, mobilephone, company, hs_marketable_until_renewal
/crm/v3/objects/{objectType}/searchCustom objectsUp to 20 selected properties.
/crm/v3/objects/deals/searchDealsdealname,pipeline,dealstage, description, dealtype
/crm/v3/objects/emails/searchEmailshs_email_subject
/crm/v3/objects/feedback_submissions/searchFeedback submissionshs_submission_name, hs_content
/crm/v3/objects/meetings/searchMeetingshs_meeting_title, hs_meeting_body
/crm/v3/objects/notes/searchNoteshs_note_body
/crm/v3/objects/products/searchProductsname, description ,price, hs_sku
/crm/v3/objects/quotes/searchQuoteshs_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/searchTaskshs_task_body, hs_task_subject
/crm/v3/objects/tickets/searchTicketssubject, content, hs_pipeline_stage, hs_ticket_category, hs_ticket_id

Use filters in the request body to limit the results to only records with matching property values. For example, the request below searches for all contacts with a first name of Alice.

To include multiple filter criteria, you can group filters within filterGroups:

  • To apply AND logic, include a comma-separated list of conditions within one set of filters.
  • To apply OR logic, include multiple 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.

You can use operators in filters to specify which records should be returned. Values in filters are case-insensitive, with the following two exceptions:

  • When filtering for an enumeration property, search is case-sensitive for all filter operators.
  • When filtering for a string property using IN and NOT_IN operators, the searched values must be lowercase.Below are the available filter operators:
OperatorDescription
LTLess than the specified value.
LTELess than or equal to the specified value.
GTGreater than the specified value.
GTEGreater than or equal to the specified value.
EQEqual to the specified value.
NEQNot equal to the specified value.
BETWEENWithin the specified range. In your request, use key-value pairs to set highValue and value. Refer to the example below the table.
INIncluded 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_INNot 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_PROPERTYHas a value for the specified property.
NOT_HAS_PROPERTYDoesn't have a value for the specified property.
CONTAINS_TOKENContains 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_TOKENDoesn't contain a token.

For example, you can use the BETWEEN operator to search for all tasks that were last modified within a specific time range:

For another example, you can use the IN operator to search for companies that have specified values selected in a dropdown property.

Search for records that are associated with other specific records by using the pseudo-property associations.{objectType}. For example, the request below searches for all tickets associated with a contact that has the contact ID of 123:

Use a sorting rule in the request body to list results in ascending or descending order. Only one sorting rule can be applied to any search. For example, the request below sorts returned contacts with most recently created first:

By default, the search endpoints will return pages of 10 records at a time. This can be changed by setting the 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.

To access the next page of results, you must pass an 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:

  • It may take a few moments for newly created or updated CRM objects to appear in search results.
  • Archived CRM objects won’t appear in any search results.
  • The search endpoints are rate limited to five requests per second.
  • The maximum number of supported objects per page is 200.
  • A query can contain a maximum of 3,000 characters. If the body of your request exceeds 3,000 characters, a 400 error will be returned.
  • The search endpoints are limited to 10,000 total results for any given query. Attempting to page beyond 10,000 will result in a 400 error.
  • When filtering, you can include a maximum of 5 filterGroups with up to 6 filters in each group, with a maximum of 18 filters in total.
  • When searching for phone numbers, HubSpot uses special calculated properties to standardize the format. These properties all start with 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.