Access a vehicle’s location by its geographic coordinates.
const smartcar = require('smartcar');
// Get all vehicles associated with this access token
const {vehicles} = await smartcar.getVehicleIds("<access-token>");
// Construct a new vehicle instance using the first vehicle's id
const vehicle = new smartcar.Vehicle(vehicles[0], "<access-token>");
// Fetch the vehicle's location
const location = await vehicle.location();
console.log(location);
// Example response from Smartcar
{
"latitude": 37.4292,
"longitude": 122.1381
}
API SDKs in Node.js, Python, Java, and Go
Compatible with 15 brands
Access to live data
Batch requests
No aftermarket hardware