Query Contacts Using REST API

REST API provides a simple method for executing basic queries. Queries in REST API are executed synchronously. If the complexity of the query or the quantity of results causes your queries to time out, consider running them asynchronously using Bulk API 2.0.

Before you issue a query request, create a SOQL statement that defines the data that you want to retrieve. For more information, see Understand SOQL Queries.

After you create a SOQL statement, remove all of the line breaks, and replace every space in the query with %20.

Issue a GET request to the /services/data/v60.0/query endpoint, with your SOQL query included as a query string.

The response includes a list of contacts that match your query.