# About the Content API

## Endpoint

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

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

## 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](http://docs.oasis-open.org/legaldocml/akn-nc/v1.0/akn-nc-v1.0.html).

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

{% hint style="info" %}
Not all responses support all formats, the documentation will be explicit about what is supported.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.laws.africa/api/about-the-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
