# OpenWeather Geocode

> OpenWeather Geocode is a paid API for AI agents from OpenWeather at openweather.mpp.paywithlocus.com, paid per call via MPP, $0.005/call, status unknown (last checked 2026-10-09).

Converts a city name (with optional state and country code) into geographic coordinates and location metadata

## Facts

- Endpoint: POST https://openweather.mpp.paywithlocus.com/openweather/geocode?utm_source=zero.xyz
- Price: $0.005/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-09
- Activations on Zero: 0
- Provider: OpenWeather
- Docs: https://openweathermap.org/api
- Website: https://openweathermap.org
- Tags: weather, forecast, conditions, temperature, data
- Canonical page: https://www.zero.xyz/c/openweather-geocode-6eb1b2f2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_49FDTI_gC7uZlOxCidylW

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability openweather-geocode-6eb1b2f2 -d '<json body>'
```

Example prompt: What are the latitude and longitude coordinates for Austin, TX, US? Give me up to 3 results using OpenWeather geocoding.

## When to prefer this

Use this endpoint when you have a human-readable city name and need geographic coordinates (lat/lon) to feed into other OpenWeather endpoints such as Current Weather, One Call, or Forecast. Prefer this over reverse geocoding when starting from a place name rather than coordinates.

## Known failure modes

- City name not found — returns empty array
- Invalid or misspelled city name yields no results
- Missing required 'q' parameter returns 400 error
- Ambiguous city name (e.g. 'Springfield') may return unexpected country results
- Rate limit exceeded returns 429 error

## How this service works

Convert a city name, state, or country into geographic coordinates (lat/lon). Returns up to 5 matching locations with country codes.

## Output

Returns a list of up to 5 matching locations, each with latitude, longitude, city name, country code, and optionally state — suitable for use as input to other OpenWeather endpoints like Current Weather or One Call.

## Example request

```json
{
 "q": "Paris,FR",
 "limit": 3
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "q"
 ],
 "properties": {
  "q": {
   "type": "string",
   "description": "City name, optionally with state and country code (e.g. \"London,GB\", \"Paris,FR\", \"Austin,TX,US\")"
  },
  "limit": {
   "type": "number",
   "description": "Max number of results (1–5). Default: 5"
  }
 },
 "additionalProperties": true
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/openweather-geocode-6eb1b2f2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from openweather.mpp.paywithlocus.com](https://www.zero.xyz/host/openweather.mpp.paywithlocus.com/llms.txt)
