---
title: "Address or place to coordinates (US Census with FIPS, OpenStreetMap worldwide) (pay per call in USDC via x402, no key)"
method: POST
path: "/x402/api/geocode"
tags: ["Afterwren"]
---

# Address or place to coordinates (US Census with FIPS, OpenStreetMap worldwide) (pay per call in USDC via x402, no key)

`POST /x402/api/geocode`

## Request

- Base URL: `https://afterwren.cybermaxtools.com`
- URL: `https://afterwren.cybermaxtools.com/x402/api/geocode`
- Auth: none required

geocoder-style result: { ok, provider, address, lat, lng, latlng, housenumber, street, city, state, postal, country, county, fips { state, county, tract, block } }. US addresses go to the US Census Geocoder (public domain); others, or country=xx, to OpenStreetMap Nominatim (ODbL, attribution included).

Pay per call with x402: $0.002 per call in USDC on Base. No key, no account: an unpaid call returns 402 with the payment requirements; retry with the X-PAYMENT (x402 v1) or PAYMENT-SIGNATURE (v2) header.

## Request body

- object
  - `q` string, required
  - `country` string

## Response `200`

Results (same field names as the bulk version's dataset records) plus the free-tier limits.

- object

## Other responses

- `400`: Invalid input
- `401`: Invalid or revoked API key
- `402`: Payment Required: x402 payment requirements (body: x402Version 1 accepts[]; header PAYMENT-REQUIRED: x402 v2).
- `504`: Took too long; ask for fewer items

---

[API](https://skmtc.dev/cybermaxtools/apis/afterwren-api.md) · [All operations](https://skmtc.dev/cybermaxtools/apis/afterwren-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cybermaxtools/apis/afterwren-api/revisions/1b59acb5f5b2?raw)
