npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@geomelon/spain

v1.0.1

Published

Geomelon city/region/country data for Spain — 19423 cities, multilingual names, sourced from Wikidata.

Readme

@geomelon/spain

City, region, and country data for Spain — 19423 cities across 17 regions, with names translated into 50 languages, sourced from Wikidata.

Install

npm install @geomelon/spain

Usage

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

spain.cities({ name: '<your search prefix>' })   // matches the primary name or any translation
spain.cities({ minPopulation: 1000000 })
spain.city('Q1492')                              // by Geomelon id or Wikidata id
spain.regions({ name: '<your search prefix>' })
spain.country                                    // country-level fields
spain.meta                                       // generatedAt, recordCount, license, source

Filters

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 Spain'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/spain/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.