Countries and localities

Listing the countries and localities (sub-country regions) that are available from the Content API.

All Laws.Africa content belongs to a country or a locality within a country. A locality is a jurisdiction within a country, such as a province or municipality. Together, they form a two-level hierarchy.

Country and locality codes

Countries are identified using two-letter ISO 3166-1 alpha-2 country codes, such as na or za.

Localities are identified using a combination of the country code and a locality code specific to the country, such as za-cpt.

Locality codes are not well standardised and may vary between different countries. In South Africa, for example, municipalities are identified by the codes determined by the South African Municipal Demarcation Board.

get
Get countries and localities

https://api.laws.africa/v2/countries.json
This endpoint lists the countries and localities that Laws.Africa knows about. It includes links to the APIs for listing works for each country and locality.
Request
Response
Request
Headers
Authentication
required
string
Authentication token to identify you.
Response
200: OK
Paginated list list of countries, localities and API endpoints.
{
"count": 2,
"next": null,
"previous": null,
"results": [
{
"code": "na",
"name": "Namibia",
"localities": [],
"links": [
{
"rel": "works",
"title": "Works",
"href": "https://api.laws.africa/v2/akn/na/"
},
]
},
{
"code": "za",
"name": "South Africa",
"localities": [
{
"code": "wc033",
"name": "Cape Agulhas",
"frbr_uri_code": "za-wc033",
"links": [
{
"rel": "works",
"title": "Works",
"href": "https://api.laws.africa/v2/akn/za-wc033/"
}
]
},
{
"code": "cpt",
"name": "Cape Town",
"frbr_uri_code": "za-cpt",
"links": [
{
"rel": "works",
"title": "Works",
"href": "https://api.laws.africa/v2/akn/za-cpt/"
}
]
}
]
}
]
}

‚Äč