# Weatherunderground — 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.

> Get real-time weather data and 10-day forecasts for any location, with access to current conditions like temperature, humidity, and wind speed. Search for locations and receive detailed weather narratives to plan your day or week ahead.

**Category:** Weather | **Website:** [weatherunderground.com/](https://weatherunderground.com/) | **Docs:** [parse.bot/marketplace/988c7b53-9c2c-47b9-a27d-6b30db321173/weatherunderground-com-api](https://parse.bot/marketplace/988c7b53-9c2c-47b9-a27d-6b30db321173/weatherunderground-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-weatherunderground-com-api-988c7b53/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_current_conditions

Get current weather observations for a specific location using its geocode. Returns temperature, wind speed, wind direction, humidity, cloud cover, visibility, pressure, precipitation amounts, and a human-readable weather phrase. Geocode is obtained from search_locations.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `geocode` | string | Yes | Latitude,longitude string obtained from search_locations (e.g., '40.713,-74.006'). |
| `units` | string | No | Unit system: 'e' for Imperial (°F, mph, inches), 'm' for Metric (°C, kph, mm). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-weatherunderground-com-api-988c7b53/get_current_conditions \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"geocode":"<string>","units":"<string>"}'
```

### get_forecast

Get a detailed 10-day daily weather forecast for a specific location. Returns arrays of daily values including day of week, temperature highs/lows, narrative descriptions, and detailed daypart (day/night) forecasts with precipitation chances, wind, and conditions. Geocode is obtained from search_locations.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `geocode` | string | Yes | Latitude,longitude string obtained from search_locations (e.g., '40.713,-74.006'). |
| `units` | string | No | Unit system: 'e' for Imperial (°F, mph), 'm' for Metric (°C, kph). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-weatherunderground-com-api-988c7b53/get_forecast \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"geocode":"<string>","units":"<string>"}'
```

### search_locations

Search for locations by city name, zip code, or address. Returns matching locations with geocode coordinates and place IDs. Use the geocode from results as input to get_current_conditions and get_forecast.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | City, zip code, or address to search for (e.g., 'New York', '90210', 'Los Angeles'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-weatherunderground-com-api-988c7b53/search_locations \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```
