How to Query Data Using the Web API

Get The Endpoint

You need the instance endpoint if you want to execute direct REST calls.

Go to Settings > Customizations > Developer Resources and copy the Service Root URL and use it as [Organization URI] in the examples provided by the documentation.

Source: Query data using the Web API

Basic Retrieve Multiple

Use the method Xrm.WebApi.retrieveMultipleRecords to retrieve multiple records.

Xrm.WebApi.retrieveMultipleRecords("account", "?$select=name&$top=3").then(
    function success(result) {
        for (var i = 0; i < result.entities.length; i++) {
            console.log(result.entities[i]);
        }                    
        // perform additional operations on retrieved records
    },
    function (error) {
        console.log(error.message);
        // handle error conditions
    }
);

Source: retrieveMultipleRecords (Client API reference)