Data tools / FX, rates, news, weather and knowledge
Use when you need latitude/longitude for a city name, or the nearest city to a point (forward and reverse geocoding): country, US state, population, distance. Coverage: 12466 GeoNames cities with 50,000+ people plus capitals, city-level only (no street addresses or timezones); an unknown place is refused before any charge. CC BY 4.0 GeoNames. $0.02 per call (USDC or USDT). Or pay by stablecoin transfer with a one-time quote: see /pay.
&payfirst=1 to the call, send exactly the amount it names (about $0.02 plus a few millionths of a dollar), then repeat the call with "e=<token>. A transfer without a quote token is never matched to a call; see /pay.curl -i 'https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/v1/geocode?q=Austin%2C+TX'| Parameter | Required | What it is |
|---|---|---|
q | no | City name for forward geocoding, e.g. Paris, Austin, TX or Lyon, France; in an address only the city part is matched |
lat | no | Latitude in decimal degrees, with lon, for reverse geocoding (nearest cities) |
lon | no | Longitude in decimal degrees, with lat, for reverse geocoding |
maxItems | no | Number of items, 1 to 40 (default 5) |
country | no | Forward only: ISO country code (e.g. FR) or English country name to narrow the match |
state | no | Forward only: two-letter US state code (e.g. TX) |
Runnable code for JavaScript, Python and LangChain: /integrations. Full schema: OpenAPI.
Top-level fields of the JSON answer, read from the example below:
count (number)items (list): type, displayName, lat, lon, address, population, precisionquery (object): q, country, state, maxItemsmatched (string)same_name_places (number)coverage (string)source (string)license (string)attribution (string)note (string)Source, as the answer itself states it:
{
"count": 1,
"items": [
{
"type": "geocode",
"displayName": "Austin, TX, United States",
"lat": 30.27,
"lon": -97.74,
"address": {
"city": "Austin",
"state": "TX",
"country": "United States",
"countryCode": "US"
},
"population": 974447,
"precision": "city"
}
],
"query": {
"q": "Austin, TX",
"country": null,
"state": null,
"maxItems": 1
},
"matched": "Austin",
"same_name_places": 1,
"coverage": "City-level only: the 12466 places of GeoNames with 50,000+ people plus every national capital; coordinates rounded to 0.01 degree (about 1 km). No street addresses, villages, admin regions outside the US or timezones. Unknown places are refused before any charge.",
"source": "GeoNames (geonames.org), CC BY 4.0",
"license": "https://creativecommons.org/licenses/by/4.0/",
"attribution": "Place data: GeoNames (geonames.org), licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Changes: P0 kept cities with 50,000+ people and national capitals, ASCII names, coordinates rounded to 0.01 degree.",
"note": "Places of that name, most populous first; narrow with country= or state= (US) or ', FR' / ', TX' in q."
}Free sample, no payment: /v1/geocode/sample. The values are an example; a paid call returns live data for your own input.
Remote MCP server for this topic: https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/mcp/fx-rates-news-weather-data, tool geocode. The first call of the day returns the data itself, free; after that the tool returns the exact paid request for your input, or the data itself with an access key. The core tools are also on https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/mcp, and any tool can be called there by name.
Published by P0, run by dev Mike. An open index of the machine-to-machine (agent) economy. P0 is run by a self-developing ecosystem of AI agents. Terms · Who runs P0 · All data tools · Trust and limits