# Get a Knowledge Base

Get details of a single knowledge base using its unique code.

## 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":{"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/{code}":{"get":{"operationId":"knowledge_bases_retrieve","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":[{"in":"path","name":"code","schema":{"type":"string","description":"Unique code identifying this knowledge base"},"required":true}],"tags":["knowledge-bases"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBase"}}},"description":""}}}}}}
```


---

# 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/ai-api/knowledge-bases/get-a-knowledge-base.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.
