# Alternative Fuels Data Center API

> Alternative Fuels Data Center returns nearby EV charging station details and is available as a workflow and API.

Alternative Fuels Data Center (AFDC) finds nearby public EV chargers from a US or Canadian location. Search ev chargers uses a US or Canadian city, address, ZIP code, or postal code, with optional network and connector filters.

- Page: https://fous.com/tools/alternative-fuels-data-center
- Handle: `@alternative-fuels-data-center`
- Category: [Energy](https://fous.com/tools/category/energy)
- Source website: https://afdc.energy.gov
- Last verified: Sep 29, 2026

## Methods

### Search ev chargers

Operation `search_ev_chargers`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

Find public, open EV charging stations near a US or Canadian city, address, or postal code, sorted by distance. Power is the highest listed connector output at each station; unavailable details are null.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `network` | string | no | `"Tesla"` | Charging network name, such as Tesla or ChargePoint; any includes all networks. |
| `location` | string | yes | `"Austin, TX"` | A US or Canadian city, street address, ZIP code, or postal code, such as Austin, TX. |
| `max_results` | integer | no | `5` | Maximum stations to return, for example 20 (up to 100). |
| `radius_miles` | number | no | `5` | Search radius in miles, for example 5 (up to 50). |
| `charging_level` | string | no | `"dc_fast"` | Charging level to match, such as dc_fast; any includes all levels. |
| `connector_type` | string | no | `"tesla_nacs"` | Connector to match, such as ccs; any includes all connectors. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "location"
  ],
  "properties": {
    "network": {
      "type": "string",
      "default": "any",
      "description": "Charging network name, such as Tesla or ChargePoint; any includes all networks.",
      "examples": [
        "Tesla"
      ]
    },
    "location": {
      "type": "string",
      "minLength": 2,
      "description": "A US or Canadian city, street address, ZIP code, or postal code, such as Austin, TX.",
      "examples": [
        "Austin, TX",
        "San Francisco, CA",
        "Toronto, ON"
      ]
    },
    "max_results": {
      "type": "integer",
      "default": 20,
      "maximum": 100,
      "minimum": 1,
      "description": "Maximum stations to return, for example 20 (up to 100).",
      "x-fous-developer": true,
      "examples": [
        5,
        3
      ]
    },
    "radius_miles": {
      "type": "number",
      "default": 5,
      "maximum": 50,
      "minimum": 0.1,
      "description": "Search radius in miles, for example 5 (up to 50).",
      "examples": [
        5,
        10
      ]
    },
    "charging_level": {
      "enum": [
        "any",
        "level_2",
        "dc_fast"
      ],
      "type": "string",
      "default": "any",
      "description": "Charging level to match, such as dc_fast; any includes all levels.",
      "examples": [
        "dc_fast"
      ]
    },
    "connector_type": {
      "enum": [
        "any",
        "j1772",
        "ccs",
        "chademo",
        "tesla_nacs"
      ],
      "type": "string",
      "default": "any",
      "description": "Connector to match, such as ccs; any includes all connectors.",
      "examples": [
        "tesla_nacs",
        "ccs"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "location": "Austin, TX"
    },
    {
      "network": "Tesla",
      "location": "San Francisco, CA",
      "max_results": 5,
      "radius_miles": 5,
      "charging_level": "dc_fast",
      "connector_type": "tesla_nacs"
    },
    {
      "location": "Toronto, ON",
      "max_results": 3,
      "radius_miles": 10,
      "charging_level": "dc_fast",
      "connector_type": "ccs"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `stations` | array |  | Nearby EV charging stations, nearest first. |
| `stations[].hours` | string or null | `"24 hours daily"` | Opening hours. |
| `stations[].phone` | string or null | `"888-758-4389"` | Station phone number. |
| `stations[].access` | string or null | `"Public"` | Access information. |
| `stations[].address` | string | `"515 Congress Ave, Austin, TX 78701, US"` | Full street address. |
| `stations[].network` | string or null | `"ChargePoint Network"` | Charging network name. |
| `stations[].pricing` | string or null | `"$24 per hour"` | Charging pricing text. |
| `stations[].latitude` | number or null | `30.267694` | Station latitude. |
| `stations[].map_link` | string | `"https://www.google.com/maps/search/?api=1&query=30.267694%2C-97.742662"` | Link to this station on a map. |
| `stations[].power_kw` | number or null | `6.5` | Highest listed connector power in kilowatts. |
| `stations[].longitude` | number or null | `-97.742662` | Station longitude. |
| `stations[].station_id` | integer | `193059` | Station identifier. |
| `stations[].station_name` | string | `"515 CONGRESS 515 CONGRESS P9"` | Station name. |
| `stations[].dc_fast_ports` | integer | `0` | Number of DC fast ports. |
| `stations[].level_2_ports` | integer | `2` | Number of Level 2 ports. |
| `stations[].distance_miles` | number | `0.02088` | Distance from the searched place in miles. |
| `stations[].connector_types` | array |  | Connector types in words. |
| `stations[].date_last_confirmed` | string or null | `"2026-09-29"` | Date the station was last confirmed, YYYY-MM-DD. |

**Example input**

```json
{
  "location": "Austin, TX"
}
```

**Example output**

```json
{
  "stations": [
    {
      "hours": "24 hours daily",
      "phone": "888-758-4389",
      "access": "Public",
      "address": "515 Congress Ave, Austin, TX 78701, US",
      "network": "ChargePoint Network",
      "pricing": null,
      "latitude": 30.267694,
      "map_link": "https://www.google.com/maps/search/?api=1&query=30.267694%2C-97.742662",
      "power_kw": 6.5,
      "longitude": -97.742662,
      "station_id": 193059,
      "station_name": "515 CONGRESS 515 CONGRESS P9",
      "dc_fast_ports": 0,
      "level_2_ports": 2,
      "distance_miles": 0.02088,
      "connector_types": [
        "J1772 (AC)"
      ],
      "date_last_confirmed": "2026-09-29"
    },
    {
      "hours": "24 hours daily",
      "phone": "888-758-4389",
      "access": "Public",
      "address": "600 Congress Ave., Austin, TX 78701, US",
      "network": "ChargePoint Network",
      "pricing": null,
      "latitude": 30.268622,
      "map_link": "https://www.google.com/maps/search/?api=1&query=30.268622%2C-97.743064",
      "power_kw": 7.7,
      "longitude": -97.743064,
      "station_id": 422038,
      "station_name": "600 CONGRESS EV 1",
      "dc_fast_ports": 0,
      "level_2_ports": 1,
      "distance_miles": 0.07123,
      "connector_types": [
        "J1772 (AC)"
      ],
      "date_last_confirmed": "2026-09-29"
    },
    {
      "hours": "24 hours daily",
      "phone": "888-758-4389",
      "access": "Public",
      "address": "600 Congress Ave., Austin, TX 78701, US",
      "network": "ChargePoint Network",
      "pricing": null,
      "latitude": 30.268619,
      "map_link": "https://www.google.com/maps/search/?api=1&query=30.268619%2C-97.743162",
      "power_kw": 7.7,
      "longitude": -97.743162,
      "station_id": 422037,
      "station_name": "600 CONGRESS EV 2",
      "dc_fast_ports": 0,
      "level_2_ports": 1,
      "distance_miles": 0.07162,
      "connector_types": [
        "J1772 (AC)"
      ],
      "date_last_confirmed": "2026-09-29"
    }
  ]
}
```

## Quick start

Replace `YOUR_API_KEY` with a Fous API key. To create one, open Developers at the bottom of Fous Studio, turn on Developer mode, then go to API keys (https://app.fous.com/keys). Change the values in `input` to run the same tool on new data.

```bash
curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 180 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@alternative-fuels-data-center",
  "visibility": "public",
  "operation": "search_ev_chargers",
  "version": 1,
  "input": {
    "location": "Austin, TX"
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
import json
import urllib.error
import urllib.request

api_key = "YOUR_API_KEY"

body = json.loads("{\n  \"api\": \"@alternative-fuels-data-center\",\n  \"visibility\": \"public\",\n  \"operation\": \"search_ev_chargers\",\n  \"version\": 1,\n  \"input\": {\n    \"location\": \"Austin, TX\"\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=180) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
const apiKey = "YOUR_API_KEY";

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(180_000),
  body: JSON.stringify({
  "api": "@alternative-fuels-data-center",
  "visibility": "public",
  "operation": "search_ev_chargers",
  "version": 1,
  "input": {
    "location": "Austin, TX"
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

## Use from an AI assistant

Connect this tool to Claude Code, Claude Desktop, Cursor, VS Code, Codex and any MCP client as its own MCP server. Each method is a typed tool whose arguments are the method’s input.

- Server URL: `https://api.fous.com/mcp/tools/alternative-fuels-data-center`
- Authorization: `Authorization: Bearer <Fous API key>`

**Tools**

- `search_ev_chargers`: Search ev chargers. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `fous_get_run`: the result of a run that was still going, by its `request_id`. Free.

Claude Code:

```bash
claude mcp add --scope user --transport http fous-alternative-fuels-data-center https://api.fous.com/mcp/tools/alternative-fuels-data-center --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"
```

To give the assistant every tool, connect `https://api.fous.com/mcp`: it finds one with `fous_search_tools` and runs it with `fous_run_tool`. Setup for other clients: https://fous.com/llms-full.txt.

## Use cases

- Find nearby charging stations for a planned trip
- Compare station distance, power, and connector types
- Check station access, hours, and phone numbers
- Review listed charging prices by station

## FAQ

### Can I run it with my own inputs?

Yes. Change the inputs in Studio and press Run, or send new inputs from your code, or ask a connected AI assistant.

### Can I call this Alternative Fuels Data Center tool as an API?

Yes. Send a POST request to /v1/query with your Fous API key and the inputs, and get JSON back.

### How much does it cost?

Each completed run costs 1 credit. Failed runs without a completed receipt are free; completed work can remain charged if delivery is interrupted. With pay as you go, a credit costs 1¢. Monthly plans cost less per credit.

### Do I need a Alternative Fuels Data Center account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from afdc.energy.gov when you run it. Some results are reused for up to 24 hours, and results that use your account or key are never reused. It was last verified on Sep 29, 2026.

### Which EV chargers are near a city or address?

Search ev chargers returns nearby public, open stations sorted by distance from a US or Canadian location.

### What connectors and power do nearby stations offer?

Search ev chargers returns connector types and the highest listed connector output for each station.

### How much do nearby charging stations cost?

Search ev chargers returns listed pricing text when available.

## Related

- [PlugShare API](https://fous.com/tools/plugshare.md): EV charging station map and driver reviews.
- [Tesla API](https://fous.com/tools/tesla.md): Tesla offers new and certified pre-owned vehicles across the United States and nearby open Supercharger sites, with delivery estimates and opening hours only when available.
- [Open Charge Map API](https://fous.com/tools/open-charge-map.md): Public electric-vehicle charging location listings.
- [GasBuddy API](https://fous.com/tools/gasbuddy.md): GasBuddy finds stations and community-reported fuel prices in the US and Canada, with nearby prices that may be missing or out of date and regional averages that may lag the day.
- [FuelEconomy.gov API](https://fous.com/tools/fueleconomy-gov.md): FuelEconomy.gov provides official vehicle fuel economy ratings, driving range, emissions, five-year savings, and annual fuel costs based on current fuel prices and EPA’s 15,000-mile annual driving assumption.
- [US Energy Information Administration API](https://fous.com/tools/us-energy-information-administration.md): US Energy Information Administration provides official energy statistics and analysis, including latest weekly fuel prices and preliminary monthly state electricity prices with historical comparisons.
- [AAA API](https://fous.com/tools/aaa.md): AAA daily gas price averages for the United States, states and metro areas.
- [AutoZone API](https://fous.com/tools/autozone.md): AutoZone finds parts and stores; engine fit may need confirmation, prices or warranties may be missing beyond 24 parts, and store listings cap at 25.
- [All Energy tools](https://fous.com/tools/category/energy)
