Electric Vehicle API
The Electric Vehicle API provides dozens of detailed datapoints on electric vehicles including range, battery capacity, charging time and performance metrics.
Available endpoints:
- /v1/electricvehicle - Get electric vehicle data by various parameters
- /v1/electricvehiclemakes - Get a list of all electric vehicle manufacturers
- /v1/electricvehiclemodels - Get all models for a specific manufacturer
For non-EV-specific data on all cars, see the Cars API.
From 3,156 users
Applications using this API
API Status
API Response Times
Average | P50 | P75 | P90 | P95 |
|---|---|---|---|---|
| 300ms | 311ms | 385ms | 703ms | 1184ms |
Similar APIs
Didn't find what you were looking for? Suggest an improvement
/v1/electricvehicle GET
https://api.api-ninjas.com/v1/electricvehicle
Get electric vehicle data from given parameters. Returns a list of electric vehicles that satisfy the parameters.
Parameters
At least one parameter (other than limit and offset) is required.
makeoptionalVehicle manufacturer (e.g.
teslaornissan).modeloptionalVehicle model. Supports partial matching (e.g.
ModelmatchesModel 3,Model Y, etc.).min_yearoptionalMinimum vehicle model year (e.g.
2020).max_yearoptionalMaximum vehicle model year (e.g.
2023).min_rangeoptionalMinimum range in kilometers (e.g.
250).max_rangeoptionalMaximum range in kilometers (e.g.
400).limitoptional premium onlyHow many results to return. Must be between
1and10. Default is1.offsetoptional premium onlyNumber of results to skip. Used for pagination. Default is
0.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
A JSON array of objects, each containing the following fields, or an error if the request is unsuccessful.
makeManufacturer name (for example
Tesla).modelModel name (for example
Model 3).year_startFirst model year this configuration is available.
battery_capacityNominal battery capacity in kWh (for example
60.0 kWh).battery_useable_capacityUsable battery capacity in kWh.
charge_powerAC charging power rating (for example
11 kW AC).charge_power_maxMaximum DC fast-charging power (for example
170 kW DC).electric_rangeRated electric range in kilometers (for example
420 km).total_powerTotal drivetrain power (for example
208 kW (283 PS)).vehicle_consumptionEnergy consumption in Wh/km (for example
112 Wh/km).length,width,heightExterior dimensions in millimeters.
seatsSeating capacity (for example
5 people).
Additional fields provide more detailed battery, charging, performance, and body specifications (see sample response).
Sample Request Live Demo!
Try our APIs in the API playground
Sign up for a free API key to get started — no credit card required.
https://api.api-ninjas.com/v1/electricvehicle?make=Tesla&model=Model%203Headers
X-Api-KeyLog in or sign up to get your API KeySample Response
Code Examples
1
2
curl -X GET "https://api.api-ninjas.com/v1/electricvehicle?make=Tesla&model=Model%203" \
-H "X-Api-Key: YOUR_API_KEY"If your programming language is not listed in the Code Example above, you can still make API calls by using a HTTP request library written in your programming language and following the above documentation.
/v1/electricvehiclemakes GET
Business, Professional, or annual subscriptions only only
https://api.api-ninjas.com/v1/electricvehiclemakes
Returns a list of all electric vehicle makes (manufacturers).
Parameters
yearoptionalFilter manufacturers by year (e.g.
2023).
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
A JSON array of strings, or an error if the request is unsuccessful.
/v1/electricvehiclemodels GET
Business, Professional, or annual subscriptions only only
https://api.api-ninjas.com/v1/electricvehiclemodels
Returns a list of all electric vehicle models for a given make (manufacturer).
Parameters
makerequiredVehicle manufacturer (e.g.
tesla).yearoptionalVehicle model year (e.g.
2023).
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
A JSON array of strings, or an error if the request is unsuccessful.
Sample Request
Try our APIs in the API playground
Sign up for a free API key to get started — no credit card required.
https://api.api-ninjas.com/v1/electricvehiclemodels?make=TeslaHeaders
X-Api-KeyLog in or sign up to get your API KeySample Response
Frequently Asked Questions
Can I use the Electric Vehicle API for commercial purposes?
Yes, but you must have a premium subscription. Commercial use of the Electric Vehicle API is not permitted on the free tier. See our pricing page to choose a plan that fits your needs.How do I get an API key and start using the Electric Vehicle API?
Sign up for a free account to instantly get your API key, then pass it in theX-Api-Keyheader on every request. The documentation above includes ready-to-run examples in cURL, Python, JavaScript, Node.js, and more.What happens if I exceed my quota for the month?
Your API requests will simply be denied once you hit your monthly quota — you will never be charged more than the plan you signed up for. To increase your quota, you can upgrade your plan any time on our pricing page.What happens if a request to the Electric Vehicle API fails?
The API responds with a standard HTTP status code and a JSON error message describing the problem. See our error codes reference for the full list of codes and how to resolve each one, or contact support if you need help.What battery and charging datapoints does the Electric Vehicle API return?
Each object from the/v1/electricvehicleendpoint includes battery fields such asbattery_capacityandbattery_useable_capacity(both in kWh), charging fields likecharge_power(AC, e.g.11 kW AC) andcharge_power_max(DC fast charging, e.g.170 kW DC), pluselectric_range,total_power,vehicle_consumption, and body specs likelength,width,height, andseats. For physical charging station locations rather than per-vehicle charging specs, see the EV Charger API.How do I query a specific electric vehicle?
Call/v1/electricvehiclewith at least one parameter other thanlimitandoffset, such asmake(e.g. tesla),model(which supports partial matching, soModelmatches Model 3 and Model Y), or range and year filters likemin_year,max_year,min_range, andmax_range. Each request needs yourX-Api-Keyheader, which you can obtain after you create an account.What are the electricvehiclemakes and electricvehiclemodels endpoints for?
/v1/electricvehiclemakesreturns a JSON array of all EV manufacturers (optionally filtered byyear), and/v1/electricvehiclemodelsreturns all models for a givenmake(also optionally filtered byyear); both require a Business, Professional, or annual subscription, which you can review on the pricing page. These help you build dropdowns and discover validmakeandmodelvalues before calling the main vehicle endpoint.Does this API cover gasoline or non-electric cars?
No, this API is limited to electric vehicles and their EV-specific datapoints likebattery_capacity,charge_power_max, andvehicle_consumption. For specs on conventional and non-EV vehicles use the Cars API, or decode a specific vehicle by its VIN with the VIN Lookup API.