@geomelon/germany
v1.0.0
Published
Geomelon city/region/country data for Germany — 29924 cities, multilingual names, sourced from Wikidata.
Maintainers
Readme
@geomelon/germany
City, region, and country data for Germany — 29924 cities across 16 regions, with names translated into 50 languages, sourced from Wikidata.
Install
npm install @geomelon/germanyUsage
const germany = require('@geomelon/germany')
germany.cities({ name: '<your search prefix>' }) // matches the primary name or any translation
germany.cities({ minPopulation: 1000000 })
germany.city('Q1492') // by Geomelon id or Wikidata id
germany.regions({ name: '<your search prefix>' })
germany.country // country-level fields
germany.meta // generatedAt, recordCount, license, sourceFilters
cities(filter?):
| field | type | matches |
|---|---|---|
| name | string | case-insensitive prefix match against the primary name and every translation |
| regionId | string | exact match |
| minPopulation / maxPopulation | number | inclusive range |
| language | string | city has a translation in this language |
| settlementType | string | exact match against one of the city's settlement types |
| limit | number | caps the result count |
regions(filter?) supports name and limit.
Languages
Names are translated into: Afrikaans (af), Albanian (sq), Arabic (ar), Armenian (hy), Azerbaijani (az), Bangla (bn), Basque (eu), Bokmål (nb), Bulgarian (bg), Catalan (ca), Chinese (zh), Croatian (hr), Czech (cs), Danish (da), Dutch (nl), English (en), Estonian (et), Finnish (fi), French (fr), Galician (gl), Georgian (ka), German (de), Hebrew (he), Hindi (hi), Hungarian (hu), Indonesian (id), Italian (it), Japanese (ja), Kazakh (kk), Korean (ko), Latvian (lv), Lithuanian (lt), Malay (ms), Modern Greek (el), Mongolian (mn), Persian (fa), Polish (pl), Portuguese (pt), Romanian (ro), Russian (ru), Serbian (sr), Slovak (sk), Slovene (sl), Spanish (es), Swedish (sv), Thai (th), Turkish (tr), Ukrainian (uk), Uzbek (uz), Vietnamese (vi).
Coverage is capped to the 50 languages above — a widely-spoken top-50 set plus Germany's own official language(s) — to keep package size reasonable. The full long tail of rarer Wikidata-only translations isn't included.
The raw JSON is still available directly if you'd rather roll your own queries:
const data = require('@geomelon/germany/data.json')FAQ
Q: I want live geographical city data with multiple translations available, where do I get that from? Use the Geomelon API — a live, searchable database of cities, countries, and regions — see the API Docs or try it on RapidAPI.
Q: I want geo data on all countries, where do I get that? For other countries as static npm packages, see the growing list at Data Packages. If you want every country in one place right now instead of installing packages one at a time, use the Geomelon API.
Q: I need a simple way to implement city autocomplete in multiple languages, how do I do that? Use the Geomelon Free City Autocomplete API — keyless, prefix search, pre-built for this exact use case.
Q: I want to integrate geo data into our product, what libraries can I use?
See geomelon.dev/libraries for the full list. Official clients: TypeScript (geomelon on npm), Python (geomelon on PyPI), React (geomelon-react on npm).
License
The data (data.json) is dedicated to the public domain under CC0 1.0 — free to use, no attribution required. The loader code (index.js/index.d.ts) is MIT-licensed. See ATTRIBUTION.md for the data's (optional) credit line.
Source
Generated from geomelon.dev — an API and dataset built on Wikidata. See the full live API on RapidAPI.
