Algeria Administrative Divisions

geoalgeria

69 wilayas, 555 dairas, 1,528 communes — bilingual names, postal codes, coordinates, plus 3,908 post offices and 2,026 ATMs.

6,086 records across 7 datasetsnpm

Source: ONS, Algerie Poste, ANEM, Journal Officiel

Install

npm install geoalgeria

Quick example

import dz from "geoalgeria";

const wilayas = dz.wilayas;           // 69 wilayas
const alger = dz.getWilaya(16);       // single wilaya
const communes = dz.getCommunesByWilaya(16);

API reference

NameSignatureDescription
wilayasreadonly wilayas: Wilaya[]All 69 wilayas (lazy-loaded).
communesreadonly communes: Commune[]All 1,528 communes (lazy-loaded).
dairasreadonly dairas: Daira[]All 555 dairas (lazy-loaded).
ecommercereadonly ecommerce: CommuneEcommerce[]Flat denormalized commune list for e-commerce use.
allreadonly all: WilayaWithCommunes[]69 wilayas with nested communes.
postOfficesreadonly postOffices: PostOffice[]All 3,908 post offices (mirrored from @geoalgeria/poste).
atmsreadonly atms: Atm[]All 2,026 ATMs (mirrored from @geoalgeria/poste).
getWilayagetWilaya(code: number): Wilaya | undefinedLook up a single wilaya by its numeric code.
getCommunesByWilayagetCommunesByWilaya(wilayaCode: number): Commune[]All communes in a wilaya.
getDairasByWilayagetDairasByWilaya(wilayaCode: number): Daira[]All dairas in a wilaya.
findCommunefindCommune(name: string): Commune[]Fuzzy search communes by French or Arabic name.
findByPostalCodefindByPostalCode(postalCode: string): Commune[]Find communes by exact postal code.
getPostOfficesByCommunegetPostOfficesByCommune(codeCommune: number | string): PostOffice[]Post offices in a commune (by commune code).

Record shape

FieldTypeNullableDescription
codenumberWilaya numeric code (1-69).
name_frstringWilaya name in French.
name_arstringWilaya name in Arabic.
phone_codestringyesPhone area code.
postal_codestringPrimary postal code.
latitudenumberLatitude (WGS84).
longitudenumberLongitude (WGS84).
created"original" | "2019" | "2025"Which administrative reform created this wilaya.
parent_wilayastringyesParent wilaya for wilayas created post-reform.

Formats

JSONCSVGEOJSONSQLTS

The npm package ships JSON. Other formats are available in each GitHub Release.

Related packages