# x402.forgemesh.io City-to-Coordinates Geocoding

> x402.forgemesh.io City-to-Coordinates Geocoding is a paid API for AI agents from x402.forgemesh.io, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-15).

Converts a city or place name to latitude/longitude coordinates, returning country, region, population, and timezone for top-ranked matches.

## Facts

- Endpoint: POST https://x402.forgemesh.io/city-to-coordinates
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-forgemesh-io-city-to-coordinates-geocoding-814d826e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Zp4Ms2YcQTA7tR3QDJ_ZN

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 x402-forgemesh-io-city-to-coordinates-geocoding-814d826e -d '<json body>'
```

Example prompt: What are the latitude, longitude, timezone, and country for Bangkok? I need to pass coordinates to a weather or earthquake API.

## When to prefer this

Use this endpoint when you have a human-readable place name and need machine-readable coordinates (lat/lng) plus enrichment data (timezone, country, region, population) to feed into any coordinates-based API such as weather, earthquake, precipitation, or wave data. Prefer it over static databases when you need ranked top matches and don't have a pre-built geocoding integration.

## Known failure modes

- Unknown or misspelled place name returns empty results or no matches
- Ambiguous city name (e.g. 'Springfield') returns multiple candidates requiring disambiguation
- Network or payment failure returns HTTP error or 402 payment required
- Invalid input format (non-string city field) returns validation error

## How this service works

Geocoding API: city or place name to latitude/longitude with country, region, population, and timezone — top matches ranked. The bridge between human place names and every coordinates-based API.

## Output

Returns a ranked list of top matching places for the input name, each with latitude, longitude, country, region/state, population, and timezone — so the agent can pick the best match and feed coordinates into any downstream coordinates-based API.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "city": {
   "type": "string",
   "description": "place name, e.g. Houston"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "results": [
    {
     "name": "Houston",
     "latitude": 29.76328,
     "timezone": "America/Chicago",
     "longitude": -95.36327,
     "population": 2296224,
     "country_code": "US"
    }
   ]
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-forgemesh-io-city-to-coordinates-geocoding-814d826e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.forgemesh.io](https://www.zero.xyz/host/x402.forgemesh.io/llms.txt)
