Location API
With Smartcar, tracking a car’s location is as easy as a single API request.
Retrieve a vehicle’s last known location by geographic coordinates.
const smartcar = require('smartcar');
// Get all vehicles associated with this access token
const {vehicles} = await smartcar.getVehicles("<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();
// Example http response from Smartcar
{
"latitude": 37.4292,
"longitude": 122.1381
}
Build simple, affordable fleet tracking software for businesses of all sizes.
Learn more about fleet managementDisplay nearby EV charging stations and let your customers plan trips directly in your app.
Learn more about EV chargingSmartcar is the easiest way to integrate mobility apps and services with cars.