geonames-mcp-server

io.github.cyanheads由 GitHub 帳號 cyanheads 發布v0.2.0更新於 Oct 29, 2026

Search GeoNames places, walk admin hierarchies, reverse geocode, get postal codes and country info.

已驗證Streamable HTTP可網頁執行位置與生活資料與分析

概覽

AI 產生的概覽

GeoNames 地名資料庫伺服器:搜尋 1300 多萬個地點、讀取紀錄、走訪行政區層級、反向地理編碼座標,並查詢郵遞區號與國家資訊。

可以做什麼
  • 依名稱、國家、行政區代碼、要素類別或代碼、人口層級與邊界框搜尋地點
  • 依 geonameId 讀取完整地點紀錄,含行政區鏈、時區、海拔、別名與外部識別碼
  • 走訪行政樹:向上取得直達大陸的父層鏈,向下取得行政、觀光或屬地樹中的直接子層
  • 將經緯度反向地理編碼為國家與各級行政區(或海洋),並列出附近地點或要素及可選時區
  • 依郵遞區號、地名或座標附近查詢郵遞區號,並讀取國家資訊如 ISO 代碼、首都、人口與貨幣
  • 解讀 GeoNames 的要素類別、要素代碼與郵遞區號涵蓋範圍
適用情境
適合需要權威地點資料的情境:把地名解析為座標與行政區、把座標轉為國家或地區、查找郵遞區號,或回答國家層級的參考問題。相較一般網頁搜尋,更適合地理空間查詢。
執行需求
需要一個 GeoNames 帳號使用者名稱,透過 GEONAMES_USERNAME 或每次呼叫傳入 geonamesUsername,並在帳號頁面啟用免費 Web 服務。可作為託管 HTTP 端點使用,也可透過 npx(Node.js)或 Docker 在本機執行。選用設定涵蓋傳輸方式、HTTP 主機/連接埠/路徑、驗證模式、日誌層級、儲存與 OpenTelemetry。
安裝前請注意
每次呼叫都會消耗某個 GeoNames 帳號的額度;免費帳號每小時 1,000 次、每天 10,000 次,反向地理編碼單次最多消耗 7 次額度。在共用託管執行個體上,未自備使用者名稱的呼叫者共用同一帳號額度。資料由社群編輯、依現狀提供,轉傳結果須依 CC BY 4.0 標示 GeoNames。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 geonames-mcp-server,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.cyanheads%2Fgeonames-mcp-server/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "geonames": {
      "type": "http",
      "url": "https://geonames.caseyjhand.com/mcp"
    }
  }
}

README

@cyanheads/geonames-mcp-server

Search GeoNames places, walk admin hierarchies, reverse geocode, get postal codes and country info via MCP. STDIO or Streamable HTTP.

8 Tools

Public Hosted Server: https://geonames.caseyjhand.com/mcp


Overview

The GeoNames gazetteer: 13M+ places worldwide, linked into an administrative tree from continent to neighborhood. Search places, read full records, walk the admin hierarchy, reverse geocode coordinates, look up postal codes, and read country facts.

Tools

ToolDescription
geonames_search_placesSearch places by name, country, admin division code, feature class or code, population tier, and bounding box
geonames_get_placeFull record for one geonameId: admin chain, timezone, elevation, alternate names, postal codes, external identifiers
geonames_get_hierarchyParent chain from Earth and the continent down to the feature
geonames_get_childrenDirect children of a feature in the administrative, tourism, or dependency tree
geonames_reverse_geocodeCountry and admin subdivisions (or the ocean) for a coordinate, plus the nearest places or features and an optional timezone
geonames_find_postal_codesPostal codes by code, by place name, or near a coordinate
geonames_get_countriesCountry facts: ISO and FIPS codes, geonameId, capital, population, area, languages, currency, postal-code format
geonames_list_referenceFeature classes, feature codes, and the countries with postal-code data

Capability reference

geonames_search_places tool

  • query (up to 200 characters) compared per match: name_required (default), any_field, exact_name, or name_prefix; filters countries (up to 10, by ISO alpha-2, alpha-3, or numeric code), adminCode1–adminCode4, featureClasses, featureCodes (up to 20), cities (cities1000 / cities5000 / cities15000), and boundingBox. A call needs query or one of countries, featureClasses, featureCodes, boundingBox
  • A listed country also returns the territories GeoNames files under it (GB also returns IM, GG, JE, and GS), each place under its own countryCode; the notice names any country on the page that countries does not list
  • adminCode1–adminCode4 search inside an admin division by its GeoNames code, as geonames_get_place and geonames_reverse_geocode return it in adminLevels (countries: ["US"], adminCode1: "TX", featureCodes: ["AIRP"] lists Texas airports). Codes are case-insensitive and zero padding counts (02, not 2); they are not ISO 3166-2 or postal codes (Bavaria is 02, not BY). Each needs exactly one country, and levels 2–4 need adminCode1
  • limit 1–1,000 (default 10), held to 100 per call with a notice when more remain; offset 0–5000, orderBy relevance or population (omitted, GeoNames' own order); returns totalCount, effectiveQuery, and nextOffset
  • featureClasses, featureCodes, and cities (class P only) intersect: with both lists set, each code's class must be listed and each listed class needs a code; beside cities, only class P and its codes. Anything else fails as feature_filter_mismatch
  • Fails before any request with query_or_filter_required, query_required, unknown_country_code, unknown_feature_code, admin_code_unscoped, feature_filter_mismatch, or invalid_bounding_box

geonames_get_place tool

  • One geonameId; an unknown id returns found: false with guidance
  • Returns adminLevels 1–5 (code, name, geonameId), timezone (UTC offsets on 1 January and 1 July), bounding box, recorded and DEM elevation, population, Wikipedia URL, alternateNames, postalCodes, links, and identifiers (IATA, ICAO, FAA, Transport Canada, UN/LOCODE, Wikidata)
  • The timezone is the zone GeoNames associates with the record. On a record with no country (an ocean, a sea, a continent) a notice says so and gives the geonames_reverse_geocode call for the time at its coordinates
  • postalCodes lists the codes GeoNames links to the feature, which can be fewer than geonames_find_postal_codes returns for the place
  • nameLanguages (up to 20 tags; zh also matches zh-CN) filters alternateNames only

geonames_get_hierarchy tool

  • One geonameId; chain runs from Earth and its continent through the country and admin divisions down to the feature, skipping levels it does not sit under
  • Each level carries geonameId, feature class and code, country and first-level codes, coordinates, and population; an unknown id returns found: false

geonames_get_children tool

  • hierarchy: administrative (default), tourism (islands, coasts, and their municipalities; almost all in Spain), or dependency (a country's dependent territories). Children are mostly admin divisions (class A) and populated places (class P); continents and coasts are class L, islands class T
  • GeoNames answers a tourism or dependency request with the administrative children when the feature has no such tree. The tool compares the two lists and sets sameAsAdministrative, with a notice, when they match; the rows stay, since a real tree can match too
  • Fetches up to 1,000 children per parent once and caches them, so nameContains, limit (1–1,000, default 100, held to 500 per call with a notice when more remain), and offset cost no extra credits; a notice says when GeoNames lists more. A nameContains with no letter or digit fails before any request as name_contains_unsearchable
  • An unknown id returns found: false; a leaf returns an empty children list with a notice

geonames_reverse_geocode tool

  • lat / lng resolve to country and adminLevels (down to ADM5, each with its geonameId and ISO 3166-2 subdivision code where one exists) or, offshore, the ocean
  • coastalBufferKm (0–50, default 0) matches the nearest country within that distance when none contains the point, for harbor, pier, and shoreline fixes; a buffered match carries country.distanceInKm, and the nearby and timezone lookups keep the exact point
  • nearby lists the nearest populated places (nearbyLimit 0–1,000, default 5, held to 50 per call with a notice when more lie within the radius; radiusKm up to 300, default 20; optional cities tier) or, when featureClasses / featureCodes is set, the nearest features of that type; nearbyKind says which. featureClasses and featureCodes intersect
  • When more than 50 lie within the radius, the notice prints the geonames_search_places call, with a boundingBox enclosing the radius, that lists them, up to the search's 5,100-row reach. The search returns rows by relevance, not distance, so read every page and keep the rows within radiusKm
  • Fails before any request with conflicting_filters (cities with a feature filter), unknown_feature_code, or feature_filter_mismatch (a code whose class is not listed, or a listed class with no code)
  • includeTimezone adds the IANA id, UTC offsets, local time, sunrise, and sunset (offsets only offshore, where both dates are reported at the standard offset)

geonames_find_postal_codes tool

  • mode: code (needs postalCode), place_name (needs placeName), or nearby (needs lat and lng; radiusKm up to 30, default 10); a missing field, or countries or an offset above 0 in nearby, fails as mode_fields_mismatch
  • countries filter for code and place_name, by ISO alpha-2, alpha-3, or numeric code (the 250 country codes plus the retired AN, CS, and YU; any other, such as EL or ZZZ, fails as unknown_country_code)
  • A listed country also returns the territories GeoNames files under it (GB also returns IM, JE, and GG), each postal code under its own countryCode; the notice names any country on the page that countries does not list
  • limit 1–1,000 (default 10), held to 100 per call with a notice when more remain; code and place_name page with offset 0–5000 and return nextOffset while more rows remain below offset 5000; GeoNames reports no total, so truncated says whether more rows exist, never how many
  • Covers 122 countries; Ireland returns only Eircode routing keys and Malta only letter prefixes
  • Admin codes on postal rows come from the postal dataset and can differ from the gazetteer's (Bavaria is BY here, 02 in search), so they are not geonames_search_places filters

geonames_get_countries tool

  • Up to 250 countries by ISO alpha-2, alpha-3, or numeric code, a continent, nameContains, or no filter for all 250; limit 1–1,000 (default 50), held to 250 per call, with offset; a nameContains with no letter or digit fails before any request as name_contains_unsearchable
  • Rows carry ISO and FIPS codes, geonameId (the starting point for geonames_get_children), capital, population, area, continent, languages, currency, postal-code format, and mainland bounding box; unknown codes land in notFound

geonames_list_reference tool

  • topic: feature_classes (9), feature_codes (684, filterable by featureClass), or postal_countries (122, with each country's code range and count); featureClass with another topic fails as filter_not_applicable
  • nameContains, limit 1–1,000 (default 100, held to 700 per call, which fits every topic), and offset; feature classes and codes are bundled and spend no credits. A nameContains with no letter or digit fails before any request as name_contains_unsearchable

Features

Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.

GeoNames-specific:

  • Data from GeoNames, licensed CC BY 4.0: results you pass on must credit GeoNames. This server is independent of GeoNames.
  • Per-account pacing at 1,000 requests an hour, with a cooldown after a quota error that holds only that account
  • Responses are cached across callers: searches for 1 hour, timezones never, every other lookup for 24 hours. A cache hit spends no credit
  • Forgiving inputs: alpha-3 and numeric country codes, UK for GB, and FL for LI. The server also accepts forms its advertised schemas leave out (a comma-joined string for a list, other casings of enums and codes, a P.PPLC class prefix, a geonames.org URL or a JSON integer for a geonameId, extra spaces in a postal code, username for geonamesUsername), but the tool descriptions offer only the canonical forms, since a client that validates arguments refuses the rest

Agent-friendly output:

  • Typed failure reasons separate the caller's account (caller_account_rejected) from the operator's (server_account_rejected), a spent quota (quota_exhausted, with data.window of hour, day, week, or local), and a value GeoNames rejected (upstream_rejected_parameter)
  • Unknown ids return found: false with guidance rather than an error; empty or partial pages carry a notice naming the next offset or the filter to loosen
  • GeoNames placeholders for "none" (population: 0, empty admin names, geonameId: 0) are dropped rather than reported as facts

Known limitations:

  • Shared quota on a shared deployment. All callers without their own username share the server account's 1,000 credits an hour. A burst of reverse geocodes (up to 7 credits each) can exhaust it, and GeoNames does not say when the window resets.
  • Search and postal searches reach only offset 5000 on the free tier, and a page holds at most 100 rows, so a result set is reachable up to its 5,100th row. Nearby postal lookups do not page: they return the nearest 100, which in a dense city covers little ground (0.19 km in central London).
  • Children cap at 1,000 per parent.
  • Postal data covers 122 countries. Ireland and Malta return only code prefixes. US nearby lookups place the first row at the query point rather than the ZIP centroid.
  • Nearby radius tops out at 300 km for places and features and 30 km for postal codes, GeoNames' free-tier ceilings.
  • Bounding boxes cannot cross the 180° meridian. Split such an area into two searches.
  • Coastal points can resolve to the ocean without a buffer. By default only a country that contains the point matches, so a harbor or shoreline point just outside the outline returns the sea while its nearby places are on land. Set coastalBufferKm (up to 50) to match the nearest country instead; in a strait that can be either shore.
  • Microstates and enclaves can resolve to the surrounding country. A point inside Vatican City returns Italy.
  • Nearest populated places include sections and historical places. In a dense city the nearest rows are often PPLX quarters or PPLH former districts; each row's featureCode says which. cities restricts to places above a population tier, but a city section (PPLX) with its own population passes it.
  • Offshore timezones are offsets only. No IANA id, local time, sunrise, or sunset is available at sea, and both dated offsets are the standard offset (open water has no DST).
  • A place record's timezone is GeoNames' association, not a lookup at its coordinates. On a record with no country it can be far off (South Pacific Ocean carries Pacific/Tongatapu, +13), and a country-bearing record can still carry another country's zone, as some Antarctic seas do. geonames_reverse_geocode with includeTimezone gives the time at a point.
  • exact_name matches alternate and historical names, so a result's name can differ from the query: "Springfield" can return Plattsburg or Palmyra, MO.
  • Data is community-edited and provided "as is". Many features have no recorded population or elevation.

Getting started

Connect to the hosted instance, no install:

sh
claude mcp add --transport http geonames-mcp-server https://geonames.caseyjhand.com/mcp

A call that passes no geonamesUsername spends the hosted instance's GeoNames account, whose 1,000 credits an hour are shared by every such caller. Pass your own geonamesUsername to spend your account's quota instead.

Or run it locally:

sh
claude mcp add geonames-mcp-server -e GEONAMES_USERNAME=your_geonames_username -- npx -y @cyanheads/geonames-mcp-server

For other clients, add this to the MCP config file:

json
{  "mcpServers": {    "geonames-mcp-server": {      "command": "npx",      "args": ["-y", "@cyanheads/geonames-mcp-server"],      "env": { "GEONAMES_USERNAME": "your_geonames_username" }    }  }}

Create a free GeoNames account, then enable free web services on its account page; GeoNames rejects calls from an account until they are enabled. For Docker or a source build, see Running the server.

Configuration

Every GeoNames call spends credits from a GeoNames account. GEONAMES_USERNAME is the server's account: a free GeoNames account with free web services enabled on its account page. Every tool also takes geonamesUsername, so a caller on a shared deployment can spend their own account instead of the server's. When neither is set, calls fail with username_required; only the bundled feature_classes and feature_codes topics of geonames_list_reference work without an account.

A free account gets 1,000 credits an hour and 10,000 a day. Cached lookups spend nothing.

ToolCredits per call
geonames_search_places, geonames_get_place, geonames_get_hierarchy1
geonames_get_children1; 2 for tourism or dependency when the parent's administrative list is not cached
geonames_find_postal_codes1 (code, place_name; a miss with countries adds 1 for the postal coverage list unless it is cached); 2 (nearby)
geonames_reverse_geocode1 for containment (with or without coastalBufferKm), plus 3 for nearest populated places or 4 for nearest features, 1 for the ocean when no country contains the point or lies within the buffer, and 1 for the timezone
geonames_get_countries1 a day; the country table is cached
geonames_list_reference0 for feature_classes and feature_codes; 1 a day for postal_countries
VariableDescriptionDefault
GEONAMES_USERNAMEGeoNames account used when a call passes no geonamesUsername. Free at geonames.org; enable free web services on its account page.none
MCP_TRANSPORT_TYPETransport: stdio or http.stdio
MCP_HTTP_PORTHTTP server port.3010
MCP_SESSION_MODEHTTP session mode: stateless, stateful, or auto. .env.example and the Docker image set stateless.auto
MCP_AUTH_MODEAuthentication: none, jwt, or oauth.none
MCP_LOG_LEVELLog level (debug, info, warning, error, etc.).info
LOGS_DIRDirectory for log files (Node.js only).<app-root>/logs
LOG_TOOL_FAILURE_PAYLOADSLog each failed tool call's arguments and result, redacted by key name: a GeoNames username is removed under geonamesUsername, username, or any near-miss key with a user or account word.false
STORAGE_PROVIDER_TYPEStorage backend: in-memory, filesystem, supabase, cloudflare-kv/r2/d1.in-memory
OTEL_ENABLEDEnable OpenTelemetry.false

See .env.example for the full list of optional overrides.

Running the server

Local development

Requires Bun v1.4.0 or higher (or Node.js v24+).

  • Clone and install:

    sh
    git clone https://github.com/cyanheads/geonames-mcp-server.gitcd geonames-mcp-server && bun installcp .env.example .env   # set GEONAMES_USERNAME
  • Build and run:

    sh
    # One-time buildbun run rebuild
    # Run the built serverbun run start:stdio# orbun run start:http   # listens at http://localhost:3010/mcp
  • Run checks and tests:

    sh
    bun run devcheck   # Lint, format, typecheck, securitybun run test       # Vitest test suitebun run lint:mcp   # Validate MCP definitions against spec

Docker

sh
docker run --rm -e GEONAMES_USERNAME=your_geonames_username -p 3010:3010 ghcr.io/cyanheads/geonames-mcp-server:latest

The image defaults to HTTP transport, stateless session mode, and logs to /var/log/geonames-mcp-server. To run it over stdio from an MCP client, use "command": "docker" with "args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "-e", "GEONAMES_USERNAME=your_geonames_username", "ghcr.io/cyanheads/geonames-mcp-server:latest"]. To build locally, docker build -t geonames-mcp-server .; OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.

Project structure

DirectoryPurpose
src/index.tscreateApp() entry point: server instructions, tool registration, GeoNames service setup and teardown.
src/configGEONAMES_USERNAME parsing and validation with Zod.
src/mcp-server/toolsThe eight tool definitions (*.tool.ts) and the inputs they share (shared-inputs.ts).
src/services/geonamesGeoNames service: fetch boundary, status mapping, retry, per-account pacing, response cache, parsers, and the bundled feature-code and country-code tables.
src/utilsInline-text sanitizer for GeoNames-authored and caller-echoed text in format() output and the enrichment trailer renders.
tests/Unit and integration tests, mirroring the src/ structure.
docs/design.mdDesign notes: tool surface, credential model, upstream behavior.

Development guide

See CLAUDE.md for development guidelines and architectural rules. The short version:

  • Handlers throw, framework catches — no try/catch in tool logic
  • Use ctx.log for logging, ctx.state for storage
  • Register new tools in src/mcp-server/tools/definitions/index.ts
  • Wrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields

Contributing

Issues are welcome. Run checks and tests before submitting:

sh
bun run devcheckbun run test

License

This project is licensed under the Apache 2.0 License. See the LICENSE file for details.

來源:README.md,提交 1c09896

工具

8

geonames_search_places

Search GeoNames places

Search the GeoNames gazetteer of 13M+ places by name and filters: country, admin division by its GeoNames code (adminCode1 TX with countries US for Texas), feature class (P populated places, A admin divisions, T mountains and terrain, H water, S buildings and spots), feature code (PPLC capitals, ADM1 states, MT mountains, AIRP airports), population tier, and bounding box. Results carry the geonameId that geonames_get_place, geonames_get_hierarchy, and geonames_get_children take. The default match requires a query term in the place name while letting other terms match the country or admin names ("Berlin, Germany"). Costs 1 GeoNames credit per call.

輸入參數limitmatchquerycitiesoffsetorderBycountriesadminCode1adminCode2adminCode3adminCode4boundingBox另有 3 個

geonames_get_place

Get a GeoNames place

Fetch the full GeoNames record for one geonameId: coordinates, feature type, the admin chain with each level's code, name, and geonameId, timezone, bounding box, recorded and DEM elevation, population, Wikipedia URL, names in other languages, postal codes, and external identifiers (IATA, ICAO, UN/LOCODE, Wikidata). Take the geonameId from geonames_search_places, geonames_reverse_geocode, geonames_get_children, or geonames_get_countries. An unknown id returns found: false. Costs 1 GeoNames credit; repeat lookups are cached.

輸入參數geonameId必填nameLanguagesgeonamesUsername

geonames_get_hierarchy

Get a GeoNames hierarchy

Return the parent chain of a GeoNames feature, ordered from Earth and its continent through the country and admin divisions down to the feature itself, each with its geonameId, feature code, and coordinates. Use it to find which country, state, and county contain a place, or to fill an admin path for a geonameId. An unknown id returns found: false. Costs 1 GeoNames credit; cached.

輸入參數geonameId必填geonamesUsername

geonames_get_children

List GeoNames children

List the direct children of a GeoNames feature — Earth's continents, a continent's countries, a country's first-level divisions, a state's counties, a city's sections — in the administrative tree, or in the tourism tree (islands, coasts, and their municipalities; almost all in Spain) or the dependency tree (a country's dependent territories). Start from a country's geonameId (geonames_get_countries) or any admin division's. Children are mostly admin divisions (class A) and populated places (class P); continents and coasts are class L and islands class T. For other feature types inside a country or admin division, use geonames_search_places with its country in countries and its admin codes (adminLevels of geonames_get_place), which match exactly; a boundingBox also takes in neighboring areas, so keep it for a place that is not a division. GeoNames answers a tourism or dependency request with the administrative children when the feature has no such tree, so the tool compares the two lists and sets sameAsAdministrative when they match, keeping the rows (a real tree can match too). The full child list is fetched once (1 GeoNames credit) and cached, so paging and nameContains filtering are free; a tourism or dependency call also reads the administrative list for the comparison, 1 more credit unless it is cached.

輸入參數limitoffsetgeonameId必填hierarchynameContainsgeonamesUsername

geonames_reverse_geocode

Reverse geocode with GeoNames

Resolve a latitude/longitude to the country and admin subdivisions that contain it (down to ADM5, each with its geonameId and ISO 3166-2 code where one exists), or the ocean or sea when the point is offshore, plus the nearest populated places with distances; these include neighborhood sections (PPLX) and historical places (PPLH), marked by featureCode. Set featureClasses or featureCodes to list the nearest features of that type instead (peaks, lakes, airports), cities to keep only places above a population tier, and includeTimezone for the IANA timezone with local time, sunrise, and sunset (offshore points get only GeoNames' UTC-offset estimate). A harbor, pier, or shoreline point can fall just outside every country outline and resolve to the sea; coastalBufferKm (up to 50) matches the nearest country within that distance instead. Costs 1 GeoNames credit for containment, with or without the buffer, plus 3 for nearest populated places or 4 for nearest features (nearbyLimit 0 skips them), 1 for the ocean when no country contains the point or lies within the buffer, and 1 for the timezone.

輸入參數lat必填lng必填citiesradiusKmnearbyLimitfeatureCodesfeatureClassescoastalBufferKmincludeTimezonegeonamesUsername

geonames_find_postal_codes

Find GeoNames postal codes

Look up postal codes in the GeoNames postal database (122 countries): mode code resolves a postal code to its place, admin names, and centroid; mode place_name finds postal codes for a place name; both page with offset, up to 5000; mode nearby lists postal codes within radiusKm (up to 30 km) of a coordinate, nearest first. Ireland returns only Eircode routing keys and Malta only the letter prefix; the United Kingdom (GB), Canada, and the Netherlands hold both full codes and their outward or district prefixes. Check coverage with geonames_list_reference topic postal_countries. Costs 1 GeoNames credit (2 for nearby); a code or place_name lookup with countries that returns nothing at offset 0 also reads the postal coverage list, 1 more credit unless that list is cached. Repeat lookups are cached.

輸入參數latlngmode必填limitoffsetradiusKmcountriesplaceNamepostalCodegeonamesUsername

geonames_get_countries

GeoNames country facts

Get GeoNames country facts — ISO alpha-2, alpha-3, and numeric codes, FIPS code, geonameId, capital, population, area in km², continent, languages, currency, postal-code format, and mainland bounding box — for the countries named, a continent, or all 250. The geonameId anchors geonames_get_children (a country's first-level divisions) and geonames_get_hierarchy. The full table is fetched once a day (1 GeoNames credit) and cached.

輸入參數limitoffsetcontinentcountriesnameContainsgeonamesUsername

geonames_list_reference

GeoNames reference vocabulary

Decode GeoNames vocabulary used by the other tools: topic feature_classes lists the 9 one-letter classes; topic feature_codes lists the 684 feature codes with names and definitions, filterable by class and text; topic postal_countries lists the 122 countries with postal-code data and each one's code range and count. feature_classes and feature_codes are bundled and spend no credits; postal_countries costs 1 GeoNames credit a day (cached).

輸入參數limittopic必填offsetfeatureClassnameContainsgeonamesUsername

版本歷史

4
  1. v0.2.0最新Oct 29, 2026
  2. v0.1.3Oct 18, 2026
  3. v0.1.2Oct 2, 2026
  4. v0.1.1Oct 1, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分