๐Ÿ‡ช๐Ÿ‡ธ Spain data package

24,019 Spain cities and 19 regions, every city with a known population, names translated into 50+ languages, as an installable npm package. Versioned, offline-usable, no API key required.

@geomelon/spain on npm Source on GitHub

npm install @geomelon/spain

Usage

const spain = require('@geomelon/spain')

spain.cities({ name: '<prefix>' })       // matches primary name or any translation
spain.cities({ minPopulation: 1000000 })
spain.regions({ name: '<prefix>' })
spain.country                            // country-level fields
spain.meta                               // generatedAt, recordCount, license, source

Looking for the whole live API instead of a static package โ€” search, autocomplete, coordinate queries, all countries at once? Try Geomelon on RapidAPI. Just want a smaller free file with no install step? See the Spain free JSON dataset.

License

Dedicated to the public domain under CC0 1.0, matching the license of the underlying Wikidata source. Free for any use, including commercial, with no attribution required.

All data packages ยท Spain free JSON dataset