# AAA Gas Prices — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Access national, state, and metro-level gas prices from AAA in real time. Compare fuel costs across regions, view historical price trends, check EV charging rates, and browse the latest AAA fuel market news.

**Category:** Automotive | **Website:** [gasprices.aaa.com/](https://gasprices.aaa.com/) | **Docs:** [parse.bot/marketplace/a0d5d03f-534e-4504-9b04-41bae5708f4a/gasprices-aaa-com-api](https://parse.bot/marketplace/a0d5d03f-534e-4504-9b04-41bae5708f4a/gasprices-aaa-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-gasprices-aaa-com-api-a0d5d03f/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_ev_charging_prices

Returns national and per-state EV charging price data including cost per kWh and total charger counts for each state. Data sourced from a public Google Sheets dataset maintained by AAA.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gasprices-aaa-com-api-a0d5d03f/get_ev_charging_prices \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_highest_recorded_prices

Returns all-time highest recorded average gas prices for a specific state or nationally. If no state_code is provided, returns national records. Results include fuel type, record price, and the date it was recorded.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `state_code` | string | No | Two-letter US state code (e.g. TX, CA). Omitting returns national highest recorded prices. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gasprices-aaa-com-api-a0d5d03f/get_highest_recorded_prices \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"state_code":"<string>"}'
```

### get_lowest_metro_prices

Returns metro areas within a state sorted by lowest regular gas price ascending. Useful for finding the cheapest metros within a state.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `state_code` | string | Yes | Two-letter US state code (e.g. TX, CA, NY, FL). All 50 states and DC are supported. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gasprices-aaa-com-api-a0d5d03f/get_lowest_metro_prices \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"state_code":"<string>"}'
```

### get_lowest_state_prices

Returns all states sorted by lowest average regular gas price ascending. Useful for identifying the cheapest states for gasoline.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gasprices-aaa-com-api-a0d5d03f/get_lowest_state_prices \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_metro_prices_by_state

Returns gas price data for all metro/city areas within a given state, including current and historical prices (yesterday, week ago, month ago, year ago) for all fuel grades. Each metro includes top-level regular/mid_grade/premium/diesel current prices for convenience.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `state_code` | string | Yes | Two-letter US state code (e.g. TX, CA, NY, FL). All 50 states and DC are supported. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gasprices-aaa-com-api-a0d5d03f/get_metro_prices_by_state \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"state_code":"<string>"}'
```

### get_national_average

Returns today's AAA national average gas price for all fuel grades (Regular, Mid-Grade, Premium, Diesel) with historical comparisons to yesterday, one week ago, one month ago, and one year ago. Includes the date the prices were recorded.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gasprices-aaa-com-api-a0d5d03f/get_national_average \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_news_article_detail

Returns the full content of a specific news article identified by its URL slug. The slug is obtainable from get_news_articles results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `slug` | string | Yes | Article URL slug (e.g. national-gas-average-drops-nearly-20-cents-in-one-week). Obtainable from get_news_articles results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gasprices-aaa-com-api-a0d5d03f/get_news_article_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"slug":"<string>"}'
```

### get_news_articles

Returns recent AAA gas price news articles with pagination support. Results include article title, publication date, excerpt, slug, and link. Uses WordPress REST API.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum number of articles per page. |
| `page` | integer | No | Page number for pagination. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gasprices-aaa-com-api-a0d5d03f/get_news_articles \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","page":"<integer>"}'
```

### get_price_change_by_metro

Returns price changes for all metro areas within a given state, showing the difference between current and historical prices for each fuel grade. Includes yesterday_change, week_ago_change, month_ago_change, and year_ago_change.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `state_code` | string | Yes | Two-letter US state code (e.g. TX, CA, NY, FL). All 50 states and DC are supported. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gasprices-aaa-com-api-a0d5d03f/get_price_change_by_metro \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"state_code":"<string>"}'
```

### get_price_change_by_state

Returns the price change (delta) for a state between the current price and historical averages (day, week, month, year) for all fuel grades. Positive values indicate prices have risen; negative values indicate prices have fallen.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `state_code` | string | Yes | Two-letter US state code (e.g. TX, CA, NY, FL). All 50 states and DC are supported. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gasprices-aaa-com-api-a0d5d03f/get_price_change_by_state \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"state_code":"<string>"}'
```

### get_state_gas_prices

Returns current average gas prices for all 50 US states plus DC across all four fuel grades (Regular, Mid-Grade, Premium, Diesel). States are listed in alphabetical order by full state name.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gasprices-aaa-com-api-a0d5d03f/get_state_gas_prices \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_state_price_details

Returns detailed gas price data for a specific state including current prices for all fuel grades, historical averages (yesterday, week ago, month ago, year ago), and all-time highest recorded prices with their dates.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `state_code` | string | Yes | Two-letter US state code (e.g. TX, CA, NY, FL). All 50 states and DC are supported. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gasprices-aaa-com-api-a0d5d03f/get_state_price_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"state_code":"<string>"}'
```
