About the Content API
This describes the Laws.Africa Content API.
Endpoint
The latest version of the API is version 3. It is available at the endpoint:
OpenAPI Schema
The API is described using the Open API format.
Download the OpenAPI Schema from https://api.laws.africa/v3/schema
API documentation in Swagger format: https://api.laws.africa/v3/schema/swagger-ui
API documentation in Redoc format: https://api.laws.africa/v3/schema/redoc
Akoma Ntoso FRBR URIs
The API relies heavily on Akoma Ntoso FRBR URIs, which are described in the Akoma Ntoso naming convention standard.
When we use a URL such as /v3/frbr-uri/
in this guide, the frbr-uri
part is a full FRBR URI, such as /akn/za/act/1998/84/eng
.
Content types
Some API calls can return content in multiple formats. You can specify the required content of your request by placing .format
at the end of the URL. In most cases the default response type is JSON.
.json
orAccept: application/json
: return JSON.xml
orAccept: application/xml
: return Akoma Ntoso XML.html
orAccept: text/html
: return human friendly HTML.epub
orAccept: application/epub+zip
: return an ePUB (ebook) document.pdf
orAccept: application/pdf
: return a PDF document.zip
orAccept: application/zip
: return a ZIP file with the document XML and media attachments
Not all responses support all formats, the documentation will be explicit about what is supported.
Last updated