Regiones y comunas de Chile
All 16 regions, 56 provinces and 346 communes with official CUT codes (Decreto 1115, 2018), ISO 3166-2 codes and URL-safe slugs. Search is accent-insensitive and knows common alternative spellings (La Calera, Llay-Llay, Coihaique).
import { findCommune, getCommune, getCommunesByRegion, getRegion, REGIONS, searchCommunes } from "chile-kit/regions";
REGIONS.length; // 16, north to south
getRegion("RM"); // { id: "RM", code: "13", iso: "CL-RM", name: "Metropolitana de Santiago", … }
getRegion(16)?.name; // "Ñuble"
getCommunesByRegion("NB").length; // 21
getCommune("13120"); // { id: "nunoa", code: "13120", name: "Ñuñoa", provinceCode: "131", regionCode: "13" }
findCommune("nunoa")?.code; // "13120"
searchCommunes("conce"); // [Concepción]
searchCommunes("san", { region: "RM", limit: 5 });
Data sources and credits
The record shape (region id as abbreviation, commune id as accent-free slug) comes from the community dataset juanbrujo/chile-regiones-comunas (MIT), born in this 2016 gist; the slug format is Gary Velásquez's 2022 contribution. Codes, names and provinces were verified one by one against Decreto 1115 (2018) of the Ministerio del Interior.