Smartcar API

Vehicle / OAuth Advanced HTTPS CORS
Varies by plan (check documentation)

Overview

Smartcar is a connected car API that lets you read vehicle data (odometer, fuel level, location) and send commands (lock/unlock) to real cars with owner permission. It uses OAuth 2.0 so vehicle owners securely authorize your app — similar to how apps request Google account access. It works across most modern cars from major brands without needing brand-specific integrations.

💡

Beginner Tip

Use Smartcar's test mode during development — it provides a simulated vehicle so you can build and test your app without needing a real car. When you're ready to go live, vehicle owners will connect their cars through Smartcar Connect, an OAuth flow you embed in your app.

Available Data

book title and author
ISBN and publisher
cover image URL
page count
publication date
vehicle make and model

Example Response

JSON Response
{
  "title": "The Great Gatsby",
  "authors": [
    "F. Scott Fitzgerald"
  ],
  "publishedDate": "1925-04-10",
  "pageCount": 218,
  "categories": [
    "Fiction"
  ],
  "imageLinks": {
    "thumbnail": "https://books.google.com/..."
  },
  "averageRating": 4
}

Field Reference

vehicles List of vehicle IDs that the user has authorized your application to access.
distance Odometer reading with value in kilometers and the unit field.
percentRemaining Fuel or battery level as a decimal (e.g., 0.75 means 75% remaining).
latitude Current GPS latitude of the vehicle.
longitude Current GPS longitude of the vehicle.
isPluggedIn For electric vehicles, indicates whether the car is currently plugged in.

Implementation Example

// ⚠️ Note: This URL may be a documentation page. Check official docs for actual API endpoint.
const url = "https://smartcar.com/docs/";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "Authorization": "Bearer YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

401 Unauthorized The OAuth access token is missing, expired, or invalid.
Use your refresh token to obtain a new access token via the Smartcar token endpoint before retrying the request.
403 Forbidden The access token does not have the required permission scope for this endpoint.
Re-run the OAuth authorization flow and request the specific scopes you need (e.g., "read_odometer", "control_security").
409 Vehicle state error The vehicle is in a state that prevents the command (e.g., car is moving).
Check the error message for details and ensure the vehicle is in an appropriate state (e.g., parked and stopped) before sending commands.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 10/20
🔒 Security 15/15
🛠 Developer XP 8/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth OAuth
HTTPS REQUIRED
CORS YES
Category Vehicle
Difficulty Advanced
Verified: 2026-04-07

Similar APIs

View All →