The Gambia home codes
Every compound in The Gambia has a home code beside its Plus Code. Look one up, find the code at a point, or decode it offline with the open engine, and credit N-Ways where you show it.
On this page
What a home code is
Every compound in The Gambia, in all 7 zones, has an N-Ways home code: the short name of its town, village or neighbourhood and a short number, such as Bakau 2389 or Banjul 19 474. Each code is unique in the whole country on its own and leads to the compound’s gate. Codes start provisional and become confirmed when residents agree in the N-Ways app.
- The official address is the government’s: the Plus Code of the gate with its town,
F8HC+9G6 Bakau(National Digital Addressing Policy, 2023). Show it first. A council’s street address, where known, comes before it. - Home form, what people say and type:
Bakau 2389. Any case, Gambian spellings (Keur = Kerr), with or without the spaces. - Written form, on plates and forms:
BAKAU 2389 · KANIFING(the zone added). People never see or type a check digit; it is in the machine form only. - Machine form, for systems, QR codes and links:
GM-KMC-0001-2389-6(zone, place index, number, check digit).
The model, the engine and the registry of every home code are open: github.com/n-ways/open-addresses-gambia. The white paper explains every rule.
Credit N-Ways wherever you show a code. Show “Home code by N-Ways Addressing” next to codes in your app, and credit “N-Ways Addressing for The Gambia, © N-WAYS LIMITED (nways.ng)” with a link to the repository in your about screen or documentation. The engine is Apache 2.0, the data ODbL 1.0 and the papers CC BY 4.0.
Look up a code
GET https://map.nways.ng/v1/homecodes/{code}, where code is the home or machine form, URL-encoded. No key is needed.
curl "https://map.nways.ng/v1/homecodes/Bakau%202389"{
"country": "GM",
"home": "Bakau 2389",
"machine": "GM-KMC-0001-2389-6",
"name": "Bakau",
"nameProvisional": false,
"municipality": "Kanifing",
"coverage": "official",
"officialAddress": "F8HC+9G6 Bakau",
"fullLine": "BAKAU 2389 · KANIFING",
"spoken": "Bakau, twenty-three, eighty-nine",
"status": "provisional",
"issued": "bulk",
"entrance": { "lat": 13.47841, "lng": -16.6787355, "kind": "centre", "source": "map" },
"location": { "lat": 13.47841, "lng": -16.6787355 },
"plusCode": "7C55F8HC+9G6",
"lote": { "use": "residential", "class": "res.maison", "kind": "un_batiment", "structures": 1, "floorAreaM2": 113.1, "enclosed": false },
"credit": "N-Ways Addressing for The Gambia, © N-WAYS LIMITED (nways.ng)",
"creditUrl": "https://github.com/n-ways/open-addresses-gambia"
}| Field | Description |
|---|---|
coverage, officialAddress | The official address, to show first: the government’s Plus Code with its town, or a council’s street address where known. |
home, machine | The home and machine forms. Show home to people beside the official address; store machine. |
fullLine | The written form, as on a plate: with the zone. The check digit is in check and the machine form, for systems only. |
officialName | The place’s full name, for small print (Brusubi Phase 1 for Brusubi 1). Missing when it equals name. |
nameProvisional | The council still has to choose the short name. The number never changes; the name may change once. |
status | provisional, confirmed (residents agreed) or retired (no home there any more; the number is never reused). |
entrance, location | Where to go: the gate when it is mapped, else the compound’s main building. |
lote, structures | The compound and each building’s profile: class, size, floors, status, each with its source. Homes never carry anything about the people who live there. |
Errors: 400 homecode_format when the text isn’t a home code; 404 homecode_unknown with a message saying why (a name no place has, a number outside every block, a wrong check digit).
What’s the code here?
GET https://map.nways.ng/v1/homecodes/at?lat=…&lng=… answers for a point: "status": "found" with the code, or "none" where no compound has one yet.
curl "https://map.nways.ng/v1/homecodes/at?lat=13.4784&lng=-16.6787"Search
A home code typed into N-Ways search, in any of its forms, finds the compound’s gate as the first result, with "category": "homecode" and the credit in attribution.
Decode offline
The repository’s reference engine (Python, standard library only) decodes every form, checks the check digit and computes the government’s Plus Code, with no network: python3 engine/reference/gm_engine.py find "Bakau 2389". Its test vectors are the conformance test for your own implementation, and registry/ holds every issued home code, one gzip file per zone.
Host it yourself
You can serve The Gambia’s codes from your own servers, with no calls to N-Ways. The repository on GitHub holds every issued code (registry/), the code areas and the model (model/), the reference engine, and a ready-made registry server with its JSON API:
git clone https://github.com/n-ways/open-addresses-gambia
cd open-addresses-gambia
docker compose up -dThe server imports the registry on first start, then answers lookups and searches on your machine; server/README.md covers configuration, backups and updates, and docs/api.md every endpoint. Your copy is read-only: new codes come from one issuer per country, N-Ways unless the State designates another, so no number is ever given twice. Pull the repository again for the codes issued since.
| What you take | Licence | What it asks of you |
|---|---|---|
| The engine, the server and the tools | Apache 2.0 | Keep the licence and NOTICE when you ship or change them. |
The codes, the areas and the model (registry/, model/, engine/data/) | ODbL 1.0 | Credit “N-Ways Addressing for The Gambia, © N-WAYS LIMITED (nways.ng)”, linked to the repository, where you show the codes. A database you make from the data and share is shared under ODbL 1.0 too. |
The papers and other documents (docs/) | CC BY 4.0 | Credit N-Ways and say what you changed. |
The full terms, and the credit line for maps and datasets made from the data (it also names OpenStreetMap), are in LICENSING.md. You may say your product uses N-Ways Addressing, not that it is N-Ways or is endorsed by N-Ways.