# Tesla API

> Tesla returns vehicle listings and Supercharger locations as a workflow and API.

Tesla’s Search inventory method returns new and certified pre-owned vehicle listings near a required US ZIP code. Tesla’s Search superchargers method returns nearby open Supercharger sites for a required city, address, or postcode.

- Page: https://fous.com/workflows/tesla
- Handle: `@tesla`
- Category: [Commerce](https://fous.com/workflows/category/commerce)
- Source website: https://tesla.com
- Last verified: Sep 29, 2026
- Fous is not affiliated with Tesla.

## Methods

### Search inventory

Operation `search_inventory`, version 1. 1 credit per call.

Find new or certified pre-owned Tesla cars near a US ZIP code. Some new cars do not show a location or delivery estimate; these fields are null when absent.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `sort` | string | no |  | Listing order, for example price_low_to_high. |
| `trim` | string | no |  | Words in the trim name, for example Long Range. |
| `model` | string | yes | `"Model 3"` | Tesla model, for example Model 3. |
| `zip_code` | string | yes | `"90210"` | US ZIP code near which to look, for example 90210. |
| `condition` | string | no | `"used"` | New or certified pre-owned; for example used. |
| `max_price` | number | no |  | Highest vehicle price in USD, for example 45000. |
| `max_results` | integer | no | `3` | Maximum cars to return, for example 20. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "model",
    "zip_code"
  ],
  "properties": {
    "sort": {
      "enum": [
        "price_low_to_high",
        "price_high_to_low",
        "lowest_mileage",
        "newest"
      ],
      "type": "string",
      "default": "price_low_to_high",
      "description": "Listing order, for example price_low_to_high."
    },
    "trim": {
      "type": "string",
      "description": "Words in the trim name, for example Long Range."
    },
    "model": {
      "enum": [
        "Model 3",
        "Model Y",
        "Model S",
        "Model X",
        "Cybertruck"
      ],
      "type": "string",
      "description": "Tesla model, for example Model 3.",
      "examples": [
        "Model 3",
        "Model Y"
      ]
    },
    "zip_code": {
      "type": "string",
      "description": "US ZIP code near which to look, for example 90210.",
      "examples": [
        "90210",
        "10001"
      ]
    },
    "condition": {
      "enum": [
        "new",
        "used"
      ],
      "type": "string",
      "default": "new",
      "description": "New or certified pre-owned; for example used.",
      "examples": [
        "used",
        "new"
      ]
    },
    "max_price": {
      "type": "number",
      "minimum": 0,
      "description": "Highest vehicle price in USD, for example 45000."
    },
    "max_results": {
      "type": "integer",
      "default": 20,
      "maximum": 50,
      "minimum": 1,
      "description": "Maximum cars to return, for example 20.",
      "x-fous-developer": true,
      "examples": [
        3
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "model": "Model 3",
      "zip_code": "90210",
      "condition": "used",
      "max_results": 3
    },
    {
      "model": "Model Y",
      "zip_code": "10001",
      "condition": "new",
      "max_results": 3
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `cars` | array |  |  |
| `cars[].vin` | string or null | `"5YJ3E1EBXJF111902"` |  |
| `cars[].trim` | string or null | `"Long Range All-Wheel Drive"` |  |
| `cars[].year` | integer or null | `2018` |  |
| `cars[].model` | string | `"Model 3"` |  |
| `cars[].price` | number or null | `23100` | Vehicle price in USD. |
| `cars[].wheels` | string or null | `"19’’ Sport Wheels"` |  |
| `cars[].mileage` | number or null | `91469` | Odometer in miles for used cars. |
| `cars[].currency` | string | `"USD"` | Currency of the price and discount. |
| `cars[].discount` | number or null | `560` | Vehicle discount in USD, when shown. |
| `cars[].interior` | string or null | `"Black and White Premium Interior"` |  |
| `cars[].location` | string or null | `"North Hollywood, CA"` | Vehicle city and state, when available. |
| `cars[].paint_colour` | string or null | `"Midnight Silver Metallic"` |  |
| `cars[].car_page_link` | string | `"https://www.tesla.com/m3/order/5YJ3E1EBXJF111902?range=200&titleStatus=used&redirect=no#overview"` |  |
| `cars[].epa_range_miles` | number or null | `310` |  |
| `cars[].delivery_estimate` | string or null |  | Delivery estimate as shown, when available. |

**Example input**

```json
{
  "model": "Model 3",
  "zip_code": "90210",
  "condition": "used",
  "max_results": 3
}
```

**Example output**

```json
{
  "cars": [
    {
      "vin": "5YJ3E1EBXJF111902",
      "trim": "Long Range All-Wheel Drive",
      "year": 2018,
      "model": "Model 3",
      "price": 23100,
      "wheels": "19’’ Sport Wheels",
      "mileage": 91469,
      "currency": "USD",
      "discount": null,
      "interior": "Black and White Premium Interior",
      "location": "North Hollywood, CA",
      "paint_colour": "Midnight Silver Metallic",
      "car_page_link": "https://www.tesla.com/m3/order/5YJ3E1EBXJF111902?range=200&titleStatus=used&redirect=no#overview",
      "epa_range_miles": 310,
      "delivery_estimate": null
    },
    {
      "vin": "5YJ3E1EAXKF311705",
      "trim": "Standard Range Plus Rear-Wheel Drive",
      "year": 2019,
      "model": "Model 3",
      "price": 24600,
      "wheels": "19’’ Sport Wheels",
      "mileage": 57997,
      "currency": "USD",
      "discount": null,
      "interior": "All Black Interior",
      "location": "Ontario, CA",
      "paint_colour": "Pearl White Multi-Coat",
      "car_page_link": "https://www.tesla.com/m3/order/5YJ3E1EAXKF311705?range=200&titleStatus=used&redirect=no#overview",
      "epa_range_miles": 240,
      "delivery_estimate": null
    },
    {
      "vin": "5YJ3E1EA6JF061992",
      "trim": "Long Range Rear-Wheel Drive",
      "year": 2018,
      "model": "Model 3",
      "price": 25000,
      "wheels": "19’’ Sport Wheels",
      "mileage": 32187,
      "currency": "USD",
      "discount": null,
      "interior": "All Black Premium Interior",
      "location": "Norwalk, CA",
      "paint_colour": "Solid Black",
      "car_page_link": "https://www.tesla.com/m3/order/5YJ3E1EA6JF061992?range=200&titleStatus=used&redirect=no#overview",
      "epa_range_miles": 325,
      "delivery_estimate": null
    }
  ]
}
```

### Search superchargers

Operation `search_superchargers`, version 1. 1 credit per call.

Find open Tesla Supercharger sites near a city, address or postcode, ordered by straight-line distance. Non-Tesla access reflects each station’s charging details; hours are null when not shown.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `place` | string | yes | `"80202"` | City, street address or postcode to search near, for example Denver, CO. |
| `max_results` | integer | no | `3` | Maximum number of nearby sites, for example 20. |
| `radius_miles` | number | no | `1` | Maximum straight-line distance from the place in miles, for example 25. |
| `open_to_other_evs_only` | boolean | no | `true` | Return only sites usable by non-Tesla EVs, for example true. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "place"
  ],
  "properties": {
    "place": {
      "type": "string",
      "description": "City, street address or postcode to search near, for example Denver, CO.",
      "examples": [
        "80202",
        "Denver, CO",
        "1600 Pennsylvania Avenue NW, Washington, DC"
      ]
    },
    "max_results": {
      "type": "integer",
      "default": 20,
      "maximum": 50,
      "minimum": 1,
      "description": "Maximum number of nearby sites, for example 20.",
      "x-fous-developer": true,
      "examples": [
        3,
        2
      ]
    },
    "radius_miles": {
      "type": "number",
      "default": 25,
      "maximum": 100,
      "minimum": 0,
      "description": "Maximum straight-line distance from the place in miles, for example 25.",
      "examples": [
        1
      ]
    },
    "open_to_other_evs_only": {
      "type": "boolean",
      "default": false,
      "description": "Return only sites usable by non-Tesla EVs, for example true.",
      "examples": [
        true
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "place": "80202",
      "max_results": 3,
      "open_to_other_evs_only": true
    },
    {
      "place": "Denver, CO",
      "max_results": 3
    },
    {
      "place": "Denver, CO",
      "max_results": 3,
      "radius_miles": 1
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `superchargers` | array |  |  |
| `superchargers[].city` | string or null | `"Edgewater"` |  |
| `superchargers[].country` | string or null | `"United States"` |  |
| `superchargers[].latitude` | number | `39.748228` |  |
| `superchargers[].longitude` | number | `-105.057764` |  |
| `superchargers[].site_name` | string or null | `"Edgewater, CO"` |  |
| `superchargers[].access_hours` | string or null | `"Available 24/7"` |  |
| `superchargers[].distance_miles` | number | `3.25` | Straight-line distance in miles. |
| `superchargers[].street_address` | string or null | `"5505 W 20th Ave"` |  |
| `superchargers[].tesla_page_link` | string | `"https://www.tesla.com/findus/location/supercharger/29612"` |  |
| `superchargers[].maximum_power_kw` | number or null | `250` |  |
| `superchargers[].number_of_stalls` | integer or null | `8` |  |
| `superchargers[].open_to_other_evs` | boolean or null | `true` |  |
| `superchargers[].tesla_location_id` | string | `"5296867"` |  |

**Example input**

```json
{
  "place": "80202",
  "max_results": 3,
  "open_to_other_evs_only": true
}
```

**Example output**

```json
{
  "superchargers": [
    {
      "city": "Edgewater",
      "country": "United States",
      "latitude": 39.748228,
      "longitude": -105.057764,
      "site_name": "Edgewater, CO",
      "access_hours": "Available 24/7",
      "distance_miles": 3.25,
      "street_address": "5505 W 20th Ave",
      "tesla_page_link": "https://www.tesla.com/findus/location/supercharger/29612",
      "maximum_power_kw": 250,
      "number_of_stalls": 8,
      "open_to_other_evs": true,
      "tesla_location_id": "5296867"
    },
    {
      "city": "Denver",
      "country": "United States",
      "latitude": 39.71785,
      "longitude": -104.9059,
      "site_name": "Denver, CO - Pontiac Street",
      "access_hours": "Available 24/7",
      "distance_miles": 5.34,
      "street_address": "44 Pontiac St",
      "tesla_page_link": "https://www.tesla.com/findus/location/supercharger/DenverCOEastsupercharger",
      "maximum_power_kw": 250,
      "number_of_stalls": 16,
      "open_to_other_evs": true,
      "tesla_location_id": "5314915"
    },
    {
      "city": "Westminster",
      "country": "United States",
      "latitude": 39.832098,
      "longitude": -105.023935,
      "site_name": "Westminster, CO",
      "access_hours": "Available 24/7",
      "distance_miles": 5.79,
      "street_address": "7450 Federal Blvd",
      "tesla_page_link": "https://www.tesla.com/findus/location/supercharger/WestminsterCOsupercharger",
      "maximum_power_kw": 250,
      "number_of_stalls": 8,
      "open_to_other_evs": true,
      "tesla_location_id": "5306500"
    }
  ]
}
```

## Quick start

Call the API with a Fous API key (`FOUS_API_KEY`). To create one, turn on Developer mode in Fous Studio, then open Keys & connections → API keys (https://app.fous.com/keys).

```bash
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
: "${FOUS_API_KEY:?Set FOUS_API_KEY before running this example}"

curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 120 \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@tesla",
  "visibility": "public",
  "operation": "search_inventory",
  "version": 1,
  "input": {
    "model": "Model 3",
    "zip_code": "90210",
    "condition": "used",
    "max_results": 3
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
import json
import os
import urllib.error
import urllib.request

api_key = os.environ.get("FOUS_API_KEY")
if not api_key:
    raise RuntimeError("Set FOUS_API_KEY before running this example")

body = json.loads("{\n  \"api\": \"@tesla\",\n  \"visibility\": \"public\",\n  \"operation\": \"search_inventory\",\n  \"version\": 1,\n  \"input\": {\n    \"model\": \"Model 3\",\n    \"zip_code\": \"90210\",\n    \"condition\": \"used\",\n    \"max_results\": 3\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=120) 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.
// First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
const apiKey = process.env.FOUS_API_KEY;
if (!apiKey) throw new Error("Set FOUS_API_KEY before running this example");

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(120_000),
  body: JSON.stringify({
  "api": "@tesla",
  "visibility": "public",
  "operation": "search_inventory",
  "version": 1,
  "input": {
    "model": "Model 3",
    "zip_code": "90210",
    "condition": "used",
    "max_results": 3
  },
  "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);
```

Or describe the data in plain language: send `{"api":"@tesla","prompt":"Describe the data you need, with every detail"}` to the same URL. Fous fills in the input, runs the method that fits and returns only the fields you asked for; `data.route.calls[].request` is the exact call it made. Routing is free; the run costs the same.

## Use cases

- Compare vehicle prices, trims, mileage, and range near a ZIP code.
- Find nearby cars that match a model and budget.
- Locate open Supercharger sites near a destination.
- Identify nearby sites usable by non-Tesla electric vehicles.

## FAQ

### Is Fous affiliated with Tesla?

No. Fous is not affiliated with Tesla. This workflow reads the public tesla.com website and returns its data.

### How much does it cost?

Each run costs 1 credit. With pay-as-you-go, a credit costs 1¢; monthly plans cost less per credit.

### Do I need a Tesla account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from tesla.com when you run it; repeating the same request within a day may return the saved result. Fous checks this workflow automatically; it last passed a check on Sep 29, 2026.

### What cars are available near a US ZIP code?

Search inventory returns cars near the required ZIP code for a required model, with optional filters such as condition, trim, and maximum price.

### Where are nearby open Supercharger sites?

Search superchargers returns nearby open sites ordered by straight-line distance from the required place.

### Which nearby Supercharger sites are usable by other electric vehicles?

Search superchargers can return only sites usable by non-Tesla electric vehicles when the non-Tesla access filter is true.

## Related

- [Cars.com API](https://fous.com/workflows/cars-com.md): Cars.com finds car listings by make, model, and U.S. ZIP code, and provides dealerships’ latest customer reviews when available.
- [Carfax API](https://fous.com/workflows/carfax.md): Carfax provides used-car listings near a US ZIP code with free history highlights, plus open safety recalls reported by CARFAX for a VIN or US plate.
- [Autotrader API](https://fous.com/workflows/autotrader.md): Search new, used and certified cars for sale across the United States.
- [Carvana API](https://fous.com/workflows/carvana.md): Search used vehicles for sale on Carvana.
- [PlugShare API](https://fous.com/workflows/plugshare.md): EV charging station map and driver reviews.
- [CarGurus API](https://fous.com/workflows/cargurus.md): CarGurus helps shoppers browse dealer-listed new and used cars with deal ratings, and view average used prices, price ranges and 12-month price history by model year.
- [CarMax API](https://fous.com/workflows/carmax.md): Search public CarMax used-car listings.
- [Open Charge Map API](https://fous.com/workflows/open-charge-map.md): Public electric-vehicle charging location listings.
- [All Commerce workflows](https://fous.com/workflows/category/commerce)
