# US EV Charging Station & Fleet Network Intelligence (`afkdigital/us-doe-ev-charging-station-fleet-network-intelligence`) Actor

Official US AFDC EV stations with Level 2/DC Fast port counts, network, facility, access and status filters. JSON/CSV for Clay/n8n. NLR API key required.

- **URL**: https://apify.com/afkdigital/us-doe-ev-charging-station-fleet-network-intelligence.md
- **Developed by:** [AFK Digital](https://apify.com/afkdigital) (community)
- **Categories:** Business, Automation
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 62.5% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00 / 1,000 unique station returneds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## US EV Charging Station & Fleet Network Intelligence

Get normalized US electric vehicle charging station records from the official US Department of Energy Alternative Fuels Data Center (AFDC), delivered as an Apify Dataset for JSON/CSV export, Clay enrichment and n8n workflows.

**Access requirement:** an NLR Developer Network API key is required. Enter your own free key in the encrypted `apiKey` input, or configure a secret `NLR_API_KEY` environment variable for a private deployment. Get a key at https://developer.nlr.gov/signup/. The default example explicitly uses the official `DEMO_KEY` for initial exploration only. It has a shared, low quota and is unsuitable for reliable scheduled production; replace it with your own key. There is no managed production NLR key included in the price. A supplied key that fails is never silently replaced. Keys are sent in the `X-Api-Key` header and are not logged.

**Price: $0.005 per successful unique station returned ($5 per 1,000 stations).** A station with 1 port or 50 ports is one result at the same price. No start event, port event or additional standard-run platform usage charge. Zero returned records incur no station events. Each new run is a new query and may charge for stations returned by an earlier run; deduplication applies within a run, including its restarted Dataset.

### What you can do

- Compare charging networks and facility categories across US states.
- Build station inventories with separate Level 1, Level 2 and DC Fast port counts.
- Examine fleet-only and private station records by explicitly selecting private access.
- Keep planned and temporarily unavailable records distinct from available stations.
- Feed a stable station-ID table into Clay, n8n, spreadsheets or your own database.

AFDC includes multiple facility types, not an exclusively commercial fleet inventory. Facility type, owner code or network alone does not prove fleet use or a sales opportunity. Public stations can still have restricted access, pay lots or operating-hour limitations. Consult `access_detail_code`, `access_days_time` and `restricted_access`. AFDC Available (`E`) is a directory status, not live charger occupancy, operational telemetry or a guarantee of availability.

### Quick start

Run this explicit demo example, then replace `apiKey` with your own NLR key for recurring work:

```json
{
  "state": "CO",
  "chargingLevel": "LEVEL_2",
  "facilityType": "ALL",
  "network": "",
  "accessType": "public",
  "stationStatus": "E",
  "maxResults": 20,
  "maxCostUsd": 0.10,
  "apiKey": "DEMO_KEY"
}
```

The quick-start example requests 20 Colorado stations and caps station events at $0.10. The Store prefilled example uses the public DEMO_KEY with one Colorado Level 2 station and a $0.005 event cap, so Apify can run a small quality check; this shared demonstration key may be throttled and is not reliable for production. After the run, choose the Dataset JSON/CSV output or open the Run summary. A zero-result query succeeds without inventing a record.

### Inputs

| Input | Meaning |
| --- | --- |
| `state` | One US postal code, e.g. CO or CA. Empty allows a nationwide query of up to 200 records. |
| `chargingLevel` | ALL, LEVEL_1, LEVEL_2 or DC_FAST. Requires a positive reported count for that level. |
| `facilityType` | ALL or an exact official code from the dropdown, e.g. HOTEL, PARKING_LOT, FLEET_GARAGE or WORKPLACE. |
| `network` | Empty for all, or one exact official code, e.g. `Tesla`, `ChargePoint Network`, `Non-Networked`. Network codes are case-sensitive. |
| `accessType` | `public` (default), `private` or `all`. |
| `stationStatus` | E (Available, default), P (Planned), T (Temporarily Unavailable) or all. |
| `maxResults` | 1–10,000 unique stations. For more than 200, specify one state. |
| `maxCostUsd` | Additional station-event spending limit, 0–50 USD, default 1 USD. The Apify run spending limit also applies. |
| `apiKey` | Secret NLR API key, or explicitly DEMO_KEY for limited exploration. Alternative: secret NLR_API_KEY environment variable. |

The upstream API supports a numeric limit up to 200 or `all`, without documented offset pagination. For >200 this Actor requests the chosen state's matching records with `limit=all`, then applies its output and spending limits. The download is capped at 64 MiB. Narrow your filters if that bound is reached. `maxResults` limits output, not upstream bytes. There is no guarantee of source ordering or exhaustive retrieval when the requested output cap is lower than the matching station count.

### Output and field definitions

One row represents one official station `id`. Port counts never create additional rows or events. Missing fields remain null; JSON preserves null and CSV exports empty cells.

| Output | Official source / interpretation |
| --- | --- |
| `station_id` | `id`, station identifier; not a port or charger-unit ID. |
| `station_name`, `street_address`, `station_phone` | Direct AFDC station fields. No invented contacts. |
| `city_state_zip` | Readable composition of source city, state and ZIP; individual fields are also retained. |
| `ev_network` | Official network code; not an inferred parent company. |
| `ev_dc_fast_num` | Number of DC Fast EVSE ports at the station. |
| `ev_level2_num` | Source `ev_level2_evse_num`, number of Level 2 EVSE ports. |
| `ev_level1_num` | Source `ev_level1_evse_num`, number of Level 1 EVSE ports. |
| `facility_type` | Source facility category or null. |
| `open_date` | Date station began offering the fuel. May be approximate; network feeds may use first appearance in AFDC. Not a verified construction, opening-event or sales-opportunity date. |
| `owner_type_code` | FG=federal, J=joint, LG=local government, P=private, SG=state government, T=utility; null when unreported. |
| `access_code`, `status_code` | Source public/private access and E/P/T directory status. |
| `date_last_confirmed` | Source date station details were last confirmed. |
| `source_updated_at` | Source `updated_at`; distinct from last confirmation and retrieval time. |
| `source_url` | Official AFDC locator link for the station. |
| `fetched_at` | UTC retrieval timestamp generated by this Actor. |
| `access_detail_code`, `access_days_time`, `restricted_access`, `expected_date` | Additional source access restrictions and expected open/reopen context, preserved without reinterpretation. |

### Clay, n8n and API use

Start the Actor using Apify's API or the n8n Apify integration, wait for SUCCEEDED, then read the run's `defaultDatasetId`. Use `station_id` as your merge key. Never merge solely on station name or address.

- JSON: `https://api.apify.com/v2/datasets/DATASET_ID/items?format=json&clean=true`
- CSV: `https://api.apify.com/v2/datasets/DATASET_ID/items?format=csv&clean=true`

Authenticate using your Apify token in an Authorization Bearer header. Keep the NLR key in a secret field; it is a separate credential from your Apify token. Dataset exports contain station data, not input credentials.

### Reliability and cost controls

Direct HTTPS/JSON only: no Playwright, login scraping, hidden endpoints or proxies. Requests use a 25-second socket timeout, at most three attempts for 429/5xx/network failures, and exponential backoff. Calls are sequential. AFDC is called once per normal run, with bounded retries. Source download stops at its time/size bounds; processing stops within 220 seconds. Configure a 240-second Actor timeout. Authentication failures fail clearly without printing keys or response bodies.

The source's published quota is normally 1,000 requests/hour per key; DEMO_KEY has much lower IP-based limits and live server limits may be lower. Concurrent runs share key/IP quotas. Reuse your own key responsibly. Set `maxResults`, `maxCostUsd` and Apify's maximum run charge. The SDK saves accessible results before charging and stops at the platform event limit.

### Source, terms and attribution

Data source: US Department of Energy, Alternative Fuels Data Center; API operated by the National Laboratory of the Rockies (NLR).

- API and field definitions: https://developer.nlr.gov/docs/transportation/alt-fuel-stations-v1/all/
- API key documentation: https://developer.nlr.gov/docs/api-key/
- Rate limits: https://developer.nlr.gov/docs/rate-limits/
- Source terms: https://developer.nlr.gov/terms/
- Official download alternative: https://afdc.energy.gov/data_download
- Domain migration: https://developer.nlr.gov/docs/nlr-domain-transition/

The old `developer.nrel.gov` domain was retired on May 29, 2026 and does not redirect. This Actor uses `developer.nlr.gov`; existing NREL-issued keys continue to work according to the official migration notice.

Official terms permit use for any purpose, disclaim warranties and prohibit using DOE/NLR/Alliance names to imply endorsement. This independently developed Actor charges for querying, normalization and delivery of publicly available data. It is not affiliated with or endorsed by DOE, NLR or Alliance. The official download form is an alternative, but requests contact information and acceptance of terms; it is not an anonymous key-free API fallback. Source data is supplied as-is and may be stale or incomplete. Verify operational decisions with the station/network.

### Validation

Release 1.0.0 was tested against genuine official Level 2, DC Fast, private-access, planned and temporarily unavailable records. Local tests cover null preservation, station/port distinction, filters, deduplication, input validation, Decimal cost bounds, transient HTTP retries and sanitized authentication errors. Live cloud run evidence is maintained with the project release report. Test fixtures are not presented as live runs.

# Actor input Schema

## `state` (type: `string`):

US postal code; leave empty for nationwide queries of up to 200 stations. One state is required for more than 200.

## `chargingLevel` (type: `string`):

Filter by the presence of at least one port at this level. A station may have multiple levels.

## `facilityType` (type: `string`):

Exact AFDC facility category; not proof of fleet/commercial usage.

## `network` (type: `string`):

One exact AFDC network code, e.g. Tesla, ChargePoint Network, Non-Networked. Empty means all networks.

## `accessType` (type: `string`):

Public/private are AFDC access codes. Read access_detail_code and restricted_access for limitations.

## `stationStatus` (type: `string`):

E=Available, P=Planned, T=Temporarily Unavailable. Not live port occupancy.

## `maxResults` (type: `integer`):

Maximum rows and billable station events; never charged per port. For >200 choose one state.

## `maxCostUsd` (type: `number`):

Additional limit at $0.005 per station. Default $1; maximum $50. Platform spending limit also applies.

## `apiKey` (type: `string`):

Required unless NLR_API_KEY is set securely. Obtain your free key at https://developer.nlr.gov/signup/. For limited exploration explicitly enter DEMO_KEY (shared quota; unsuitable for recurring production).

## Actor input object example

```json
{
  "state": "CO",
  "chargingLevel": "LEVEL_2",
  "facilityType": "ALL",
  "network": "",
  "accessType": "public",
  "stationStatus": "E",
  "maxResults": 1,
  "maxCostUsd": 0.005,
  "apiKey": "DEMO_KEY"
}
```

# Actor output Schema

## `stationsJson` (type: `string`):

No description

## `stationsCsv` (type: `string`):

No description

## `summary` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "state": "CO",
    "chargingLevel": "LEVEL_2",
    "facilityType": "ALL",
    "network": "",
    "accessType": "public",
    "stationStatus": "E",
    "maxResults": 1,
    "maxCostUsd": 0.005,
    "apiKey": "DEMO_KEY"
};

// Run the Actor and wait for it to finish
const run = await client.actor("afkdigital/us-doe-ev-charging-station-fleet-network-intelligence").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "state": "CO",
    "chargingLevel": "LEVEL_2",
    "facilityType": "ALL",
    "network": "",
    "accessType": "public",
    "stationStatus": "E",
    "maxResults": 1,
    "maxCostUsd": 0.005,
    "apiKey": "DEMO_KEY",
}

# Run the Actor and wait for it to finish
run = client.actor("afkdigital/us-doe-ev-charging-station-fleet-network-intelligence").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "state": "CO",
  "chargingLevel": "LEVEL_2",
  "facilityType": "ALL",
  "network": "",
  "accessType": "public",
  "stationStatus": "E",
  "maxResults": 1,
  "maxCostUsd": 0.005,
  "apiKey": "DEMO_KEY"
}' |
apify call afkdigital/us-doe-ev-charging-station-fleet-network-intelligence --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,afkdigital/us-doe-ev-charging-station-fleet-network-intelligence"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/FN3ldGsbAuelqQFHv/builds/A1uw5gvM691bOzLI4/openapi.json
