Laws.Africa Developer Guide
  • Laws.Africa Developer Guide
  • Get Started
    • Introduction
    • Quick start
    • Works and expressions
    • Webhooks
    • Changelog
  • Tutorial
    • About the tutorial
    • Module 1: Build a legislation reader
      • Introductory concepts
      • Create a basic Django app
      • Create database models
      • Fetching the data
      • Work listing page
      • Expression detail page
      • Styling with Law Widgets
      • Adding interactivity
      • Staying up to date
    • Module 2: Enrichments and interactivity
      • Basic enrichments
      • Advanced enrichments
      • Advanced interactivity
    • Module 3: Text extraction for search and analysis
      • Why extracting text is important
      • Basics of text extraction
      • Advanced text extraction
      • Extracting text for analysis and machine learning
  • Content API Reference
    • About the Content API
    • Authentication
    • Pagination
    • Places
    • All work expressions
    • Single work expression
      • Commencements
      • Embedded images
      • Publication document
      • Table of Contents
      • Timeline
    • Taxonomy topics
    • Enrichment datasets
  • AI API Reference
    • About the AI API
    • Authentication
    • Knowledge Bases
  • How-to Guides
    • How to use the Table of Contents API
    • How to download images
Powered by GitBook
On this page
  • Endpoint
  • OpenAPI Schema
  • Akoma Ntoso FRBR URIs
  • Content types
  1. Content API Reference

About the Content API

This describes the Laws.Africa Content API.

PreviousExtracting text for analysis and machine learningNextAuthentication

Last updated 10 months ago

Endpoint

The latest version of the API is version 3. It is available at the endpoint:

https://api.laws.africa/v3/

OpenAPI Schema

The API is described using the Open API format.

  • Download the OpenAPI Schema from

  • API documentation in Swagger format:

  • API documentation in Redoc format:

Akoma Ntoso FRBR URIs

The API relies heavily on Akoma Ntoso FRBR URIs, which are described in the .

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 or Accept: application/json: return JSON

  • .xml or Accept: application/xml: return Akoma Ntoso XML

  • .html or Accept: text/html: return human friendly HTML

  • .epub or Accept: application/epub+zip: return an ePUB (ebook) document

  • .pdf or Accept: application/pdf: return a PDF document

  • .zip or Accept: 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.

https://api.laws.africa/v3/schema
https://api.laws.africa/v3/schema/swagger-ui
https://api.laws.africa/v3/schema/redoc
Akoma Ntoso naming convention standard