# ForgeMesh City Geocoding API

> ForgeMesh City Geocoding API 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-13).

Converts a city or place name to latitude/longitude coordinates along with country, admin region, population, elevation, and timezone for up to 5 matches.

## Facts

- Endpoint: POST https://x402.forgemesh.io/geocode-city
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/forgemesh-city-geocoding-api-54681e6e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_KczwQlYXb_KOH-_KCsDVn

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 forgemesh-city-geocoding-api-54681e6e -d '<json body>'
```

Example prompt: What are the latitude and longitude coordinates for Medellín, Colombia? I need the top matches with timezone, elevation, and population too.

## When to prefer this

Use this endpoint when you have a human-readable city or place name and need coordinates (lat/lon) plus metadata like timezone, elevation, and population — especially as a preprocessing step before calling coordinates-based APIs such as weather, air quality, or sun times. Prefer this over manual lookup or geocoding libraries when you need a fast, paid-API-quality result with timezone and elevation bundled.

## Known failure modes

- Ambiguous or misspelled city name returns unexpected top matches
- Very small or obscure localities may return zero results
- Non-English place names may require exact local spelling for best results
- Payment failure (402) if USDC balance is insufficient

## How this service works

City geocoding API: convert any city or place name to latitude/longitude, with country, admin region, population, elevation, and timezone for the top 5 matches. The bridge from human place names to every coordinates-based API (weather, air quality, sun times). Cached 24 hours.

## Output

Returns up to 5 matching locations for the given place name, each with latitude, longitude, country, administrative region, population, elevation, and timezone. Results are cached for 24 hours.

## 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/forgemesh-city-geocoding-api-54681e6e/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)
