Product

Geocode City (birthplace → coordinates + timezone)

The shared place-resolution utility: a free-text city (or 'City, Region, Country', or a native-script name like 上海/서울/東京) → { latitude, longitude, timezone (IANA), tzOffset (hours, DST-CORRECT for the given date), label, country, admin1, population, source, resolved, triedVariants }. Codifies what asktian.com home validated: (1) LOCALE DETECTION — a CJK name must be queried in its own language or the geocoder returns nothing, so the query language is auto-detected from the script (Han→zh, kana→ja, Hangul→ko, else en) with an en fallback; (2) a VARIANT-FALLBACK LADDER — progressively looser forms ('Nanchang, Jiangxi, China' → 'Nanchang'; 'Jiang Xi' → 'Jiangxi', full-width commas handled) until one resolves; (3) DATE-AWARE OFFSET — the IANA timezone is converted to a UTC offset FOR THE GIVEN date (pass the birth date), so DST is correct for that day incl. historical rules (a summer-1990 China birth is +9, not +8). Primary source is open-meteo (keyless, global, CJK-aware, fail-soft ~8s); falls back to a bundled gazetteer of major cities when the network is unavailable or open-meteo misses (source tells you which). A utility for the OTHER readings' accuracy — resolve once and CACHE latitude/longitude/tzOffset on the profile; never re-geocode per read (re-geocode only when the user edits their birthplace). Not a divination system → absent from the catalogue by design.

Cost: 1 TIAN Points per call. tRPC procedure geocode.city.

get/api/trpc/geocode.city

Request

  • Base URL: https://api.asktian.com
  • URL: https://api.asktian.com/api/trpc/geocode.city
  • Auth: HTTP bearer

Query parameters

inputstring

URL-encoded JSON of the procedure input (tRPC GET convention).

Response

tRPC result envelope

Changes

No recorded changes to this operation across all 1 revision of this API.