Find EV Charging Stations Near Me: Building It with an API

Data and APIs Team
API Usage Guides
8/31/2026
8/31/2026
APIsWeb DevelopmentFrontendTutorial
Find EV Charging Stations Near Me: Building It with an API

"Where can I charge near me?" is the first feature every EV-adjacent product gets asked for β€” trip planners, real-estate listings, fleet dashboards, hotel sites. And it's a data problem before it's a code problem: charging stations are run by more than a hundred different networks, each with its own app, its own map, and its own idea of an API.

By the end of this guide you'll have the whole feature working: a radius search over 105,000+ US and Canada charging stations, the user's location flowing from the browser to your backend, results pinned on a Leaflet map, and the filters (DC fast, connector type) that make it genuinely useful to a driver.

The 30-Second Version

One GET with a coordinate. Here's downtown Austin, 10 km radius, fast chargers only:

curl "https://api-ev-chargers.dataandapis.com/v1/stations/nearby?lat=30.2672&lon=-97.7431&radius=10&dcFast=true" \
    -H "X-Api-Key: YOUR_API_KEY"
{
    "lat": 30.2672,
    "lon": -97.7431,
    "radiusKm": 10,
    "count": 10,
    "results": [{
        "id": 152443,
        "name": "Electrify America - Austin",
        "status": "E",
        "access": "public",
        "network": "Electrify America",
        "address": { "street": "1000 E 41st St", "city": "Austin", "state": "TX" },
        "latitude": 30.3005,
        "longitude": -97.7196,
        "connectorTypes": ["J1772COMBO", "CHADEMO"],
        "ports": { "level1": null, "level2": 1, "dcFast": 8 },
        "distanceKm": 1.4
    }]
}

Sorted by distance, already filtered to open, public stations. That's the core of the feature β€” the rest of this post turns it into a product.

Where Charging-Station Data Comes From

You could integrate each charging network separately β€” ChargePoint, Tesla, Electrify America, Blink, FLO, and a hundred more β€” but that's a hundred integrations to build and babysit. The practical baseline is the US Department of Energy's Alternative Fuels Data Center (AFDC), a government-maintained, public-domain registry of every station in the US and Canada.

DIY with the AFDC feed is real work, though: pulling and storing the bulk dataset, refreshing it daily, compacting the extremely verbose per-unit hardware blocks, and building indexed geo queries so "near me" doesn't scan a hundred thousand rows per request. The EV Chargers API is that pipeline already running: 105,000+ stations from the AFDC, refreshed daily, with radius search, filters, and per-station hardware detail behind one endpoint.

EV Charging in Two Minutes

Four vocabulary items make the data make sense:

  • Levels: Level 1 is a wall outlet (overnight), Level 2 is destination charging (hours), DC fast is highway charging (minutes). The ports object gives you counts of each.
  • Connectors: J1772 (standard Level 2), J1772COMBO (CCS fast charging), CHADEMO (older fast standard), TESLA (Tesla/NACS). A station helps nobody whose car can't plug into it.
  • Status: E means open and available, P is planned (not built yet), T is temporarily unavailable.
  • Access: public vs private β€” a workplace lot behind a badge reader is a station, but not for your users.

Step 1: From Browser Location to Station List

Get the user's position with the standard Geolocation API, send it to your backend, and do the API call there (your API key never ships to the browser):

// Browser
navigator.geolocation.getCurrentPosition(async (pos) => {
    const { latitude, longitude } = pos.coords;
    const resp = await fetch(`/api/chargers?lat=${latitude}&lon=${longitude}`);
    renderStations(await resp.json());
});

// Backend (Node) β€” /api/chargers
export async function chargersNearby(req, res) {
    const { lat, lon } = req.query;
    const url = new URL("https://api-ev-chargers.dataandapis.com/v1/stations/nearby");
    url.search = new URLSearchParams({ lat, lon, radius: "25", limit: "20" });

    const resp = await fetch(url, {
        headers: { "X-Api-Key": process.env.EV_CHARGERS_API_KEY },
    });
    res.json(await resp.json());
}

Step 2: Pin Them on a Map

Leaflet with free OpenStreetMap tiles is the fastest way to a working map β€” no API key, one script tag:

const map = L.map("map").setView([30.2672, -97.7431], 12);
L.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png", {
    attribution: "© OpenStreetMap contributors",
}).addTo(map);

function renderStations(data) {
    for (const s of data.results) {
        L.marker([s.latitude, s.longitude])
            .addTo(map)
            .bindPopup(
                `<strong>${s.name}</strong><br>` +
                `${s.network} β€” ${s.distanceKm} km away<br>` +
                `DC fast: ${s.ports.dcFast ?? 0} | Level 2: ${s.ports.level2 ?? 0}`,
            );
    }
}

Step 3: Filter Like a Driver Thinks

A road-tripper doesn't want every plug in 25 km β€” they want fast chargers their car fits, along the route. Query each waypoint with dcFast=true:

import os
import requests

API = "https://api-ev-chargers.dataandapis.com/v1"
HEADERS = {"X-Api-Key": os.environ["EV_CHARGERS_API_KEY"]}

waypoints = [(30.2672, -97.7431), (31.5493, -97.1467), (32.7767, -96.7970)]

for lat, lon in waypoints:  # Austin -> Waco -> Dallas
    resp = requests.get(
        f"{API}/stations/nearby",
        headers=HEADERS,
        params={"lat": lat, "lon": lon, "radius": 15, "dcFast": "true", "limit": 3},
        timeout=15,
    )
    resp.raise_for_status()
    for s in resp.json()["results"]:
        print(f"{s['distanceKm']:>5} km  {s['name']}  ({s['ports']['dcFast']} fast ports)")

For browse-style pages, /v1/stations takes richer filters: state, city, network, connector=TESLA, workplace=true, status, and access β€” and /v1/stations/networks and /v1/stations/states give you the aggregate counts for filter dropdowns.

Gotchas That Separate a Demo from a Product

  • The radius is kilometers, not miles. Defaults to 25, caps at 500. If your audience thinks in miles, convert in the UI, not in your head at 2 a.m.
  • Directory status is not live stall availability. status: "E" means the station exists and operates β€” not that a stall is free right now. Real-time occupancy only exists inside each network's own system; a directory is for finding stations, not for queueing.
  • Filter by the user's connector. Ask which car they drive once, then apply connector= everywhere. A CHAdeMO-only result is noise to a CCS driver.
  • Distance is straight-line. Haversine kilometers, not driving kilometers β€” fine for sorting, but hand the coordinates to a routing engine before promising "8 minutes away".
  • Planned stations are a feature, not noise. /v1/stations?status=P is filtered out of driver-facing "nearby" results β€” but it's exactly what a real-estate or site-selection product wants to show.

Five Things to Build with This

  • Trip planners: fast chargers along a route, like the waypoint script above.
  • Real-estate listings: "4 public chargers within 2 km" as a property amenity β€” including planned ones.
  • Fleet operations: match depot locations and routes against DC-fast coverage before electrifying.
  • Hotel & venue sites: an "EV friendly" section that lists nearby charging with hours and networks.
  • Dealer & OEM companion apps: new-owner onboarding that shows charging around home and work for their exact connector.

Wrap-Up

A "chargers near me" feature is a geolocation call, one radius query, and a map β€” as long as someone else keeps the hundred-network dataset clean and current behind that query. You've got working code for the whole path, plus the filters and caveats that make it trustworthy for actual drivers.

Get an API key on the EV Chargers API page and run the Austin query from the top of this post β€” your first station list is one curl away.