DCFC Tracker API
US DC fast-charging sites, prices and availability history as JSON, for your own dashboards, maps and research.
The API serves the same data as the site: every DC fast-charging site we track, with connectors, stall counts, power, opening dates, prices from each network’s published pricing, and availability, plus the daily price index. It’s read-only JSON over HTTPS.
Base URL: https://dcfctracker.com/api/v1. Where the data comes from and how often it refreshes is on the methodology page.
Quick start
- Subscribe to Pro.
- On your account page, create a key under API access and copy it. It’s shown once.
- Send it with each request:
curl -H "Authorization: Bearer $DCFC_API_KEY" \
"https://dcfctracker.com/api/v1/stations?states=TX&networks=Tesla,IONNA&limit=100"Authentication
Send your key in the Authorization header as a Bearer token. Keys start with dcfc_. Keys in query strings aren’t accepted.
Authorization: Bearer dcfc_…You can have up to 3 active keys and revoke any of them from your account page. Keep keys on a server or in a script’s environment. Don’t put them in a web page, a mobile app or a public repository. Keys stop working if your Pro subscription ends and start again when you resubscribe.
The API doesn’t send CORS headers: call it from a server or a script, not a browser.
Limits
Pro includes 3,000 requests per day per account, across all your keys. The count resets at 00:00 UTC. Pages hold up to 1,000 stations, so the full catalog takes about 15 requests. Each network refreshes on its own schedule, from hourly to daily, so syncing once or a few times a day is plenty.
Every request that passes authentication counts, whatever its result (200, 400, 404 for an unknown station, 500), and carries your quota. 401s, 403s, 429s, /usage and unknown endpoints don’t count.
API requests from all users run at most two at a time on each server. Others wait in a short line for up to 10 seconds. Past four waiting from your key, or 20 in all, a request gets 429 rate_limited with Retry-After: 1, which doesn’t count. Send one or two requests at a time and you’ll rarely wait.
Every counted response carries your quota:
| Header | Meaning |
|---|---|
| X-RateLimit-Limit | Requests allowed today. |
| X-RateLimit-Remaining | Requests left today. |
| X-RateLimit-Reset | When the count resets, in Unix seconds. |
Past the limit, requests get 429 with a Retry-After header. Need more? Email [email protected].
Parameters
Every endpoint reads its parameters strictly, so a typo can’t silently widen or empty a result:
- An unknown parameter, or one given twice, is a
400 invalid_parameterthat names it, e.g.Unknown parameter: network. - An empty value (
states=) counts as absent. - Booleans are
1,0,trueorfalse. Dates are real calendar dates written YYYY-MM-DD, and every date is a UTC day. pageruns from 1 to 1,000,000;limitis 1 to 1,000.- Network ids, state codes and connector types match without regard to case. Network ids come from
/networks. - Parameters that would contradict each other are 400s:
networkswithexcludeNetworks, a…Withinpreset with its date range, a bounding box missing an edge, a range that ends before it starts. - Endpoints without parameters (
/networks,/usage,/price-index) reject any.
List stations
Sites matching the filters, newest opening first by default. All parameters are optional.
| Parameter | Description |
|---|---|
| networks | Network ids, comma-separated (from /networks), e.g. Tesla,IONNA. Case doesn’t matter. |
| excludeNetworks | Network ids to leave out. Can’t be combined with networks. |
| states | Two-letter codes, comma-separated, e.g. CA,NV: the 50 states, DC, PR, VI, GU, AS and MP. |
| connectorTypes | NACS, CCS or CHAdeMO, comma-separated. Every result has CCS or NACS; CHAdeMO-only sites aren’t tracked. |
| minPowerKw | Minimum maximum power, in kW (1–1000), e.g. 150. |
| minStalls | Minimum number of DC fast stalls (1–500). |
| status | available or temporarily_unavailable. |
| access | open, tesla_only or rivian_members. |
| hasPricingOnly | 1 or true to return only sites with a published price. |
| openedFrom, openedTo | Opening-date range, YYYY-MM-DD, inclusive (UTC days). |
| openedWithin | Opened in the last N days (1–3650), e.g. 30. Can’t be combined with openedFrom/openedTo. |
| addedFrom, addedTo | Range for when DCFC Tracker first saw the site, YYYY-MM-DD, inclusive (UTC days). |
| addedWithin | First seen in the last N days (1–3650). Can’t be combined with addedFrom/addedTo. |
| q | Free-text search (up to 200 characters) over name, street, city, ZIP and network. State names or codes in the text filter by state. |
| south, west, north, east | Bounding box in decimal degrees. Give all four or none. |
| ids | Up to 100 station ids, comma-separated, combined with the other filters. In the default view a charger merged into a site answers to the site’s id; use expandSites=1 to address chargers one by one. |
| sortBy | openDate (default), firstSeenAt, maxPowerKw, dcFastCount or currentPricePerKwh. Sites without a value come last, in either direction. |
| sortDir | desc (default) or asc. |
| expandSites | 1 or true to return one row per charger instead of one per site (sites with several ChargePoint chargers are merged by default). |
| page | Page number, from 1 (up to 1,000,000). |
| limit | Results per page, 1 to 1,000. Default 100. |
{
"data": [
{
"id": "123456",
"name": "Springfield, IL Supercharger",
"network": "Tesla",
"networkName": "Tesla",
"street": "100 Example Rd",
"city": "Springfield",
"state": "IL",
"zip": "62701",
"lat": 39.7817,
"lng": -89.6501,
"connectorTypes": ["NACS"],
"dcFastCount": 16,
"nacsCount": 16,
"ccsCount": null,
"chademoCount": null,
"maxPowerKw": 250,
"status": "available",
"statusExpectedDate": null,
"access": "open",
"openDate": "2026-09-30",
"firstSeenAt": "2026-09-28T14:05:00.000Z",
"pricePerKwh": 0.48,
"priceNote": null,
"priceSource": "Tesla · Public",
"priceSourceType": "network",
"priceRate": "public",
"priceUpdatedAt": "2026-10-07T06:00:00.000Z",
"memberPricePerKwh": 0.36,
"siteStationCount": null,
"url": "https://dcfctracker.com/stations/123456"
}
],
"pagination": { "page": 1, "limit": 100, "total": 1, "hasMore": false }
}Get a station
One station with its prices, availability and hardware history. station is the row /stations returns for this id: for a site with several ChargePoint chargers, the site’s combined values. A charger merged into a site still answers to its own id, with its own values; add expandSites=1 (the only parameter) to get a site’s primary charger’s own values too. site is set when the station is one of several chargers merged into a site, and lists them. timeZone is the site’s local IANA zone.
pricing is the site’s price schedule: one track per rate (public, member for the Tesla-vehicle or Rivian member rate, or single), each with time-of-use windows in the site’s local time (24:00 is the end of the day) and a flatRate to use when there are no windows. Windows are in time order and never cross midnight: an overnight rate shows as two windows, one ending at 24:00 and one starting at 00:00. Schedules repeat every day; a few Tesla sites price by the minute, which unit says. note names the price source and when it was last updated. pricing is null when the site has no price or is free.
hardwareHistory lists the site’s stall, connector and power changes, oldest first, in the same shape as the hardware changes below. It starts when tracking began (the changes endpoint’s historyStart) and can be null if change data is briefly unavailable.
All histories are oldest first. priceHistory holds up to the last 100 price snapshots, each with connectorType (NACS, CCS or CHAdeMO where a network prices per connector; null for all connectors), rate and sourceType. statusHistory holds up to the last 100 availability changes. For a merged site, pricing, priceHistory and statusHistory describe the charger whose id you asked for (site.members lists every charger at the site); hardwareHistory covers the whole site.
{
"station": { "id": "123456", "name": "Springfield, IL Supercharger", "...": "same fields as the list" },
"timeZone": "America/Chicago",
"site": null,
"pricing": {
"unit": "kWh",
"tracks": [
{ "type": "public", "label": "public", "flatRate": 0.56,
"schedule": [ { "from": "00:00", "to": "16:00", "rate": 0.44 },
{ "from": "16:00", "to": "21:00", "rate": 0.56 },
{ "from": "21:00", "to": "24:00", "rate": 0.44 } ] },
{ "type": "member", "label": "member", "flatRate": 0.42,
"schedule": [ { "from": "00:00", "to": "16:00", "rate": 0.33 },
{ "from": "16:00", "to": "21:00", "rate": 0.42 },
{ "from": "21:00", "to": "24:00", "rate": 0.33 } ] }
],
"note": "Tesla · Public · Oct 5, 2026"
},
"priceHistory": [
{ "pricePerKwh": 0.52, "pricePerMin": null, "sessionFee": null,
"capturedAt": "2026-09-30T06:00:00.000Z", "source": "Tesla · Public",
"sourceType": "network", "rate": "public", "connectorType": null },
{ "pricePerKwh": 0.48, "pricePerMin": null, "sessionFee": null,
"capturedAt": "2026-10-05T06:00:00.000Z", "source": "Tesla · Public",
"sourceType": "network", "rate": "public", "connectorType": null }
],
"statusHistory": [
{ "status": "temporarily_unavailable", "expectedDate": "2026-10-03",
"changedAt": "2026-10-01T12:00:00.000Z" },
{ "status": "available", "expectedDate": null, "changedAt": "2026-10-02T18:30:00.000Z" }
],
"hardwareHistory": [
{ "date": "2026-09-12T06:00:00.000Z", "kind": "stalls_added", "kinds": ["stalls_added"],
"before": { "dcFastCount": 12, "nacsCount": 12, "ccsCount": 0, "chademoCount": 0 },
"after": { "dcFastCount": 16, "nacsCount": 16, "ccsCount": 0, "chademoCount": 0 },
"change": { "dcFastCount": 4, "nacsCount": 4, "ccsCount": 0, "chademoCount": 0 },
"connectorTypes": { "before": ["NACS"], "after": ["NACS"] },
"reportedBy": "DOE (AFDC)" }
]
}List changes
Changes across every tracked site: the same data as the Recent changes page, with every change listed on its own. Newest first by default; history goes back to historyStart. Changes are refreshed hourly (generatedAt).
| Parameter | Description |
|---|---|
| kinds | Kinds to include, comma-separated (table below). Default: every kind. |
| networks | Network ids, comma-separated (from /networks). Case doesn’t matter. |
| states | Two-letter codes, comma-separated: the 50 states, DC, PR, VI, GU, AS and MP. |
| siteId | One site's changes: a station id from /stations. |
| from, to | Date range, YYYY-MM-DD, inclusive (UTC). Default: the last 30 days. For everything, use the date part of the response's historyStart (its first 10 characters) as from. |
| minStallChange | Hardware changes of at least this many stalls (1–1000). |
| minPriceChange | Price changes of at least this many percent (1–1000). |
| ongoing | 1 or true for outages that haven't ended yet. |
| sort | date (default, newest first) or size (biggest first: stalls for hardware, percent for prices, days for outages and removals). |
| page | Page number, from 1 (up to 1,000,000). |
| limit | Results per page, up to 1,000. Default 100. |
Kinds:
| Kind | Meaning | Category |
|---|---|---|
| nacs_conversion | CCS → NACS conversion | hardware |
| stalls_added | Stalls added | hardware |
| power_up | Faster charging | hardware |
| stalls_removed | Stalls removed | hardware |
| nacs_added | NACS added | hardware |
| ccs_added | CCS connectors added | hardware |
| chademo_removed | CHAdeMO removed | hardware |
| connectors_changed | Other connector change | hardware |
| price_up | Price increase | price |
| price_down | Price cut | price |
| price_varies | Price varies by day | price |
| offline | Offline 24h+ | availability |
| delisted | Removed from listing (48h+) | listing |
| opened | New site | opening |
Each change has kind, kinds (every kind it qualifies for: a conversion that also added stalls is both), category, date, site, and one block for its category:
| Block | Fields |
|---|---|
| hardware | before, after and change, each { dcFastCount, nacsCount, ccsCount, chademoCount } (before or after can be null); connectorTypes { before, after }; maxPowerKw { before, after } when the change carries power; reportedBy ("DOE (AFDC)" or the network). |
| price | before, after, percentChange, rate ("public", or "member" for Tesla's vehicle rate), source (display text) and sourceType ("network" or "doe"); price_varies adds low, high, swings and since. |
| outage | since, endedAt (when the site came back; null while ongoing), ongoing, hours, reportedBy and outagesLast30Days (24h+ outages at the site in the 30 days up to this one, this one included). |
| listing | absentSince and days: the site left the DOE listing. It often comes back, so this isn't a closure. site.url is null meanwhile. |
| opening | openDate: a new site. |
What date means:
| Kind | date |
|---|---|
| Hardware kinds | When the change was recorded. While it's provisional, a correction can move it later. |
| price_up, price_down | When the new price was recorded. |
| price_varies | The latest swing; price.since is when the cycle began. |
| offline | When the outage was detected; outage.since is when it began. |
| delisted | 48 hours after the site went missing from the DOE listing; listing.absentSince is when it went missing. |
| opened | When DCFC Tracker first saw the site; opening.openDate is its opening date. |
A change’s id never changes once published, so you can store changes by id. A change can still be revised or withdrawn after it appears:
- Hardware and price changes settle within 7 days. Until then their kind, date and details can change, and a price change reversed within two days is withdrawn. A price change that turns out to be a repeating cycle becomes
price_variesunder the same id, and its date follows the latest swing. - An outage (
offline) keeps updating until it ends (ongoing,endedAt,hours), and is withdrawn if its recovery can’t be established. - A removal (
delisted) is withdrawn as soon as its site is listed again, however much later. Most are. - All of a site’s changes are left out while a site is removed from the listing, and come back with it.
To keep a copy in sync, fetch from your last poll minus 7 days every hour or so and upsert by id. Once a day, re-fetch everything from historyStart and replace your copy: that picks up ended outages and changes withdrawn at any age. A fetch that spans several pages is one consistent snapshot only if every page has the same generatedAt; if it changes partway, start that fetch again.
{
"data": [
{
"id": "hw:cm1q2x3y4z",
"kind": "nacs_conversion",
"kinds": ["nacs_conversion", "nacs_added"],
"category": "hardware",
"date": "2026-09-12T06:00:00.000Z",
"site": { "id": "123457", "name": "Spokane Valley EA", "network": "Electrify America",
"networkName": "Electrify America", "state": "WA", "city": "Spokane Valley",
"url": "https://dcfctracker.com/stations/123457" },
"hardware": {
"before": { "dcFastCount": 4, "nacsCount": 0, "ccsCount": 4, "chademoCount": 0 },
"after": { "dcFastCount": 4, "nacsCount": 2, "ccsCount": 2, "chademoCount": 0 },
"change": { "dcFastCount": 0, "nacsCount": 2, "ccsCount": -2, "chademoCount": 0 },
"connectorTypes": { "before": ["CCS"], "after": ["CCS", "NACS"] },
"reportedBy": "DOE (AFDC)"
}
},
{
"id": "px:cm1r5t6u7v",
"kind": "price_up",
"kinds": ["price_up"],
"category": "price",
"date": "2026-10-05T06:00:00.000Z",
"site": { "id": "123456", "name": "Springfield, IL Supercharger", "network": "Tesla",
"networkName": "Tesla", "state": "IL", "city": "Springfield",
"url": "https://dcfctracker.com/stations/123456" },
"price": { "before": 0.36, "after": 0.42, "percentChange": 16.7, "rate": "member", "source": "Tesla · Member",
"sourceType": "network" }
}
],
"pagination": { "page": 1, "limit": 100, "total": 2, "hasMore": false },
"window": { "from": "2026-09-07T18:30:00.000Z", "to": "2026-10-07T18:30:00.000Z" },
"historyStart": "2026-08-15T00:00:00.000Z",
"generatedAt": "2026-10-07T18:00:00.000Z"
}Price index
The daily US price index behind the charging prices page: a national average and one per state (the 50 states and DC) for every UTC day since historyStart. /price-index returns the newest day with its changes over 1, 7, 30 and 90 days, states in code order (a state with no priced stations that day is left out). /price-index/history returns one value per day, oldest first; a day with no data is skipped. Dates here, historyStart included, are UTC days written YYYY-MM-DD.
How it’s calculated: for each station, the latest positive per-kWh price on record at the end of the UTC day: the network’s own published price where we have one, otherwise the DOE (AFDC) listing’s. Where a station has several per-kWh rates (by time of day, power level or connector), it’s the highest. At Tesla Superchargers it’s the price for non-Tesla vehicles wherever Tesla has published one, otherwise the Tesla-vehicle price. Those prices are averaged across stations, not weighted by stalls. The index covers open DC fast stations with CCS or NACS; stations with only free or per-minute prices are left out. The national figure also counts priced stations outside the 50 states and DC, so the states’ counts don’t add up to it.
The index updates every morning at 07:00 UTC. The newest day (the snapshot’s date, the history’s provisionalDate) is provisional: it’s recalculated the next morning, once the whole day’s prices are in, and is final after that unless we correct an error.
The index is published under CC BY 4.0: you’re welcome to reuse and republish it, with a credit to DCFC Tracker (dcfctracker.com/ev-pricing).
History parameters:
| Parameter | Description |
|---|---|
| states | Two-letter state codes, comma-separated, or all for every state. Default: none. The national series is always included. States come back in code order, each one you asked for listed even if it has no data in the range. |
| from, to | Date range, YYYY-MM-DD, inclusive (UTC days). to defaults to today and from to 89 days before to, 90 days in all. At most 366 days per request; for everything, start at historyStart and step through a year at a time. |
Fields, for the nation and each state:
| Field | Type | Description |
|---|---|---|
| avgPricePerKwh | number | Average price in USD per kWh across priced stations, chosen as described above. |
| medianPricePerKwh | number | null | Median of the same prices. null where not recorded. |
| stations | number | Stations with a price that day. Counted like expandSites=1 on /stations: a site with several ChargePoint chargers counts once per charger. |
| stalls | number | null | DC fast stalls at those stations. null where not recorded. |
| change1d, change7d, change30d, change90d | number | null | Snapshot only. Percent change from the newest value on or before that many days earlier, to one decimal. null when there’s no earlier value. |
{
"date": "2026-10-08",
"historyStart": "2026-03-11",
"national": { "avgPricePerKwh": 0.55, "medianPricePerKwh": 0.52, "stations": 12274, "stalls": 68619,
"change1d": 0, "change7d": 0.3, "change30d": 1.1, "change90d": 1.6 },
"states": [
{ "state": "AK", "name": "Alaska", "avgPricePerKwh": 0.61, "medianPricePerKwh": 0.6, "stations": 40,
"stalls": 160, "change1d": 0, "change7d": 0, "change30d": -1.2, "change90d": 2.4 },
"…"
]
}GET /api/v1/price-index/history?states=CA&from=2026-10-01&to=2026-10-03
{
"window": { "from": "2026-10-01", "to": "2026-10-03" },
"historyStart": "2026-03-11",
"provisionalDate": "2026-10-08",
"national": [
{ "date": "2026-10-01", "avgPricePerKwh": 0.5482, "medianPricePerKwh": 0.52, "stations": 12230, "stalls": 68340 },
{ "date": "2026-10-02", "avgPricePerKwh": 0.5486, "medianPricePerKwh": 0.52, "stations": 12241, "stalls": 68412 },
{ "date": "2026-10-03", "avgPricePerKwh": 0.5491, "medianPricePerKwh": 0.52, "stations": 12250, "stalls": 68455 }
],
"states": [
{ "state": "CA", "name": "California", "points": [
{ "date": "2026-10-01", "avgPricePerKwh": 0.6012, "medianPricePerKwh": 0.58, "stations": 2410, "stalls": 15120 },
"…"
] }
]
}Networks
The network ids the networks filter accepts, with display names.
{ "data": [ { "id": "Tesla", "name": "Tesla" }, { "id": "Electrify America", "name": "Electrify America" } ] }Usage
Your quota for today. This request doesn’t count against it.
{ "plan": "pro", "limit": 3000, "used": 42, "remaining": 2958, "resetsAt": "2026-10-08T00:00:00.000Z" }Station fields
| Field | Type | Description |
|---|---|---|
| id | string | Stable station id. Use it with /stations/{id}. |
| name | string | Site name. |
| network | string | Network id, as accepted by the networks filter. |
| networkName | string | Network display name. Display text: don’t parse it. |
| street, city, state, zip | string | Address. state is a two-letter code. |
| lat, lng | number | null | Coordinates. null when unknown. |
| connectorTypes | string[] | NACS, CCS, CHAdeMO. |
| dcFastCount | number | null | DC fast stalls. |
| nacsCount, ccsCount, chademoCount | number | null | Stalls by connector, where known. |
| maxPowerKw | number | null | Highest power offered at the site. |
| status | string | available or temporarily_unavailable (see Data notes). |
| statusExpectedDate | string | null | When an unavailable site is expected back, if reported (YYYY-MM-DD). |
| access | string | null | open, tesla_only or rivian_members. null when not yet known. |
| openDate | string | null | Date the site opened (YYYY-MM-DD). |
| firstSeenAt | string | null | When DCFC Tracker first saw the site (ISO 8601). |
| pricePerKwh | number | null | The highest public price in USD per kWh (see Data notes). 0 is free; null means no per-kWh price. |
| priceNote | string | null | Qualifier for the price, e.g. a time-of-use range. Display text: don’t parse it. |
| priceSource | string | null | Where the price came from, e.g. Tesla · Public. Display text: don’t parse it. |
| priceSourceType | string | null | network (the network’s own published price) or doe (the DOE (AFDC) listing). null without a price (see Data notes for sites with several chargers). |
| priceRate | string | null | public, or member when pricePerKwh is Tesla’s vehicle rate at a Tesla site with no published non-Tesla price. null without a price (see Data notes for sites with several chargers). |
| priceUpdatedAt | string | null | When the price was last captured (ISO 8601). |
| memberPricePerKwh | number | null | Tesla-vehicle rate at Tesla sites; member rate at Rivian Adventure sites. null elsewhere. |
| siteStationCount | number | null | Chargers merged into this row (2 or more), or null. |
| url | string | The station’s page on dcfctracker.com. |
Fields and parameters may be added to v1, and new values may appear in lists such as change kinds, networks, connector types, access kinds and price source types, so ignore what you don’t recognize. Anything that would break existing code goes in a new version, announced in advance: v1 stays available for at least 12 months after a v2 is announced.
Data notes
Prices. pricePerKwh is the highest public per-kWh price: where a network charges different rates by time of day, power level or connector, it’s the highest. 0 means free; null means no per-kWh price (unknown, or priced per minute or per session). pricing is null when the site has no price or is free. Time-of-use windows exist only where a network publishes a schedule (Tesla, Rivian, ChargePoint and Walmart today); elsewhere each track has a flatRate.
For a site with several ChargePoint chargers, pricePerKwh is the highest of their prices, while priceSource, priceSourceType, priceRate, priceNote and priceUpdatedAt describe the site’s primary charger, so they can differ from the charger that sets the price, or be null.
Status. status is the network’s own live signal where we read one, while it’s under 3 days old; otherwise the DOE (AFDC) listing’s.
| Network | Live status refresh |
|---|---|
| Electrify America | Hourly |
| Tesla | Every 6 hours |
| Mercedes-Benz | Every 8 hours |
| Walmart | Each site about every 12 hours |
| Blink | Each site about daily |
| bp pulse, Shell Recharge | Daily |
| Every other network | The DOE (AFDC) listing |
First seen. A firstSeenAt before 2026-03-01 means the site predates tracking: the first import stamped about 12,400 long-open sites on February 14–17, 2026.
Station ids are stable. A station missing from the DOE listing for 48 hours stops answering (404) and keeps its id if it comes back. When a network re-keys its sites, old ids don’t redirect.
Display text. These fields may be reworded, so don’t parse them: priceSource, priceNote, networkName, pricing.note, pricing.tracks[].label, priceHistory[].source, reportedBy and the changes price.source. Use priceSourceType and priceRate in code.
Errors
Errors use standard HTTP status codes and a JSON body:
{ "error": { "code": "invalid_api_key", "message": "This API key is invalid or has been revoked." } }| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_parameter | A parameter is unknown, repeated, malformed or not one of its listed values, e.g. network=Tesla (for networks) or an inverted bounding box. The message names it. |
| 401 | missing_api_key | No Authorization header, or not a Bearer token. |
| 401 | invalid_api_key | The key doesn’t exist or was revoked. |
| 403 | plan_required | The account’s Pro subscription has ended. |
| 404 | not_found | No such station, or an unknown endpoint. |
| 429 | rate_limited | Daily request limit reached, or the API is busy. Retry after the Retry-After header’s seconds. |
| 500 | internal_error | Something failed on our side. Retrying later is safe. |
Code examples
JavaScript (Node 18+)
const API = "https://dcfctracker.com/api/v1";
const headers = { Authorization: `Bearer ${process.env.DCFC_API_KEY}` };
// Every station matching the filters, a page at a time.
async function fetchAllStations(filters = {}) {
const stations = [];
for (let page = 1; ; page++) {
const qs = new URLSearchParams({ ...filters, page: String(page), limit: "1000" });
const res = await fetch(`${API}/stations?${qs}`, { headers });
const body = await res.json();
if (!res.ok) throw new Error(body.error.message);
stations.push(...body.data);
if (!body.pagination.hasMore) return stations;
}
}
const stations = await fetchAllStations({ states: "CA", minPowerKw: "250" });Python
import os
import requests
API = "https://dcfctracker.com/api/v1"
headers = {"Authorization": f"Bearer {os.environ['DCFC_API_KEY']}"}
resp = requests.get(
f"{API}/stations",
headers=headers,
params={"networks": "IONNA", "openedWithin": 30, "limit": 100},
)
resp.raise_for_status()
for s in resp.json()["data"]:
print(s["openDate"], s["name"], s["city"], s["state"], s["pricePerKwh"])Fair use
- You may cache API results and show them to your own users in your app or site; a credit is appreciated.
- Keys are for your own use. Don’t share them or let others use your quota.
- Don’t resell station data or republish it in bulk as a dataset or competing service.
- If you publish something built on the API, a credit and link to dcfctracker.com is appreciated.
- The price index is open: it’s published under CC BY 4.0, so you’re welcome to republish it, in bulk too, with a credit to DCFC Tracker.
- We may revoke keys that break these terms.
Building something bigger, or need higher limits? Email [email protected].