EV Charger API

The EV Charger API helps you find electric vehicle charging stations in nearly 100 countries around the world. Get details like connector types, pricing, availability status and more.

/v1/evcharger GET

https://api.api-ninjas.com/v1/evcharger

Get electric vehicle charging stations near a location specified by latitude and longitude coordinates. If you need to get chargers by address, use our Geocoding API to get the latitude and longitude coordinates first.


Parameters

  • lat  required

    Latitude coordinate (e.g. 37.4277).

  • lon  required

    Longitude coordinate (e.g. -122.1701).

  • distance  optional

    Search distance in kilometers. The search area is a box from specified lat - distance to lat + distance and lon - distance to lon + distance. Default is 3 kilometers. Max value is 50 kilometers.

  • level  optional

    Charging level (1, 2, or 3). By default, all levels are returned.

  • limit  optional Premium Only

    How many results to return. Must be between 1 and 30. Default is 3.

  • offset  optional Premium Only

    Number of results to skip. Used for pagination. Default is 0.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Sample Request Live Demo!

lat
lon
https://api.api-ninjas.com/v1/evcharger?lat=37.4277&lon=-122.1701

Headers

X-Api-KeyLog in or sign up to get your API Key

Sample Response

JSON
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 [ { "is_active": true, "name": "City of Palo Alto - City Hall Garage", "address": "250 Hamilton Ave", "city": "Palo Alto", "region": "CA", "country": "US", "latitude": 37.44462, "longitude": -122.16042, "connections": [ { "type_name": "Type 1 (J1772)", "type_official": "SAE J1772-2009", "level": 2, "num_connectors": 2 }, { "type_name": "SP Inductive", "type_official": "Small Paddle Inductive", "level": null, "num_connectors": 1 } ] }, ... ]

Code Examples

1 2 3 4 5 6 7 8 9 10 import requests lat = '37.4277' lon = '-122.1701' api_url = 'https://api.api-ninjas.com/v1/evcharger?lat={}&lon={}'.format(lat, lon) response = requests.get(api_url, headers={'X-Api-Key': 'YOUR_API_KEY'}) if response.status_code == requests.codes.ok: print(response.text) else: print("Error:", response.status_code, response.text)

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.