> For the complete documentation index, see [llms.txt](https://developers.laws.africa/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.laws.africa/knowledge-bases/reference/list-knowledge-bases.md).

# List Knowledge Bases

Call this endpoint to list the Knowledge Bases available to your account.

## Explore legal data Knowledge Bases for use with Generative AI (PREVIEW).

> Get details of Laws.Africa's Knowledge Bases.\
> \
> Note: this API is a preview and may change in future.

```json
{"openapi":"3.0.3","info":{"title":"Laws.Africa Content API","version":"20.0.0 (v1)"},"security":[{"cookieAuth":[]},{"tokenAuth":[]},{"tokenAuth":[]}],"components":{"securitySchemes":{"cookieAuth":{"type":"apiKey","in":"cookie","name":"sessionid"},"tokenAuth":{"type":"http","scheme":"bearer"}},"schemas":{"PaginatedKnowledgeBaseList":{"type":"object","required":["count","results"],"properties":{"count":{"type":"integer"},"next":{"type":"string","nullable":true,"format":"uri"},"previous":{"type":"string","nullable":true,"format":"uri"},"results":{"type":"array","items":{"$ref":"#/components/schemas/KnowledgeBase"}}}},"KnowledgeBase":{"type":"object","properties":{"code":{"type":"string","description":"Unique code identifying this knowledge base","maxLength":50,"pattern":"^[-a-zA-Z0-9_]+$"},"name":{"type":"string","description":"Name of the knowledge base","maxLength":255},"description":{"type":"string","description":"Description of the knowledge base"},"url":{"type":"string","format":"uri","readOnly":true}},"required":["code","description","name","url"]}}},"paths":{"/ai/v1/knowledge-bases":{"get":{"operationId":"knowledge_bases_list","description":"Get details of Laws.Africa's Knowledge Bases.\n\nNote: this API is a preview and may change in future.","summary":"Explore legal data Knowledge Bases for use with Generative AI (PREVIEW).","parameters":[{"name":"page","required":false,"in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer"}},{"name":"page_size","required":false,"in":"query","description":"Number of results to return per page.","schema":{"type":"integer"}}],"tags":["knowledge-bases"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedKnowledgeBaseList"}}},"description":""}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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/knowledge-bases/reference/list-knowledge-bases.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.
