{"openapi":"3.1.0","info":{"title":"Laws.Africa (BYOK) API","version":"0.1.0","description":"Laws.Africa (BYOK) lets an AI assistant read your own Laws.Africa data through the Laws.Africa API with a key you supply (Laws.Africa API token). Read-only: 9 tools (list_knowledge_bases, get_knowledge_base, search_knowledge_base, list_places, get_place, list_work_expressions_in_place, list_work_expressions, list_taxonomy_topics, list_taxonomy_topic_works). The BYOK key travels with each request,...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-laws-africa.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-laws-africa/docs"},"termsOfService":"https://connectorbay.com/byok-laws-africa/terms"},"servers":[{"url":"https://byok-laws-africa.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-laws-africa/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/list_knowledge_bases":{"post":{"operationId":"list_knowledge_bases","summary":"List the legislation and judgment Knowledge Bases your Laws.Africa plan can search, with their codes and descriptions (p","description":"List the legislation and judgment Knowledge Bases your Laws.Africa plan can search, with their codes and descriptions (preview API). Use for \"Which Laws.Africa knowledge bases can I search\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"page_size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Results per page (1 to 100).","title":"Page Size"}},"title":"list_knowledge_basesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_knowledge_base":{"post":{"operationId":"get_knowledge_base","summary":"Get the name and description of one Knowledge Base by its code. Use for \"What is in the legislation-za-municipal knowled","description":"Get the name and description of one Knowledge Base by its code. Use for \"What is in the legislation-za-municipal knowledge base\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"code":{"description":"Knowledge Base code from list_knowledge_bases, for example 'legislation-za-municipal'.","maxLength":50,"title":"Code","type":"string"}},"required":["code"],"title":"get_knowledge_baseArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/search_knowledge_base":{"post":{"operationId":"search_knowledge_base","summary":"Search one Knowledge Base for legal text matching a phrase and return the best passages with title, source link and rele","description":"Search one Knowledge Base for legal text matching a phrase and return the best passages with title, source link and relevance score. Counts toward the plan's daily call limit. Use for \"What do Cape Town by-laws say about dog ownership\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"code":{"description":"Knowledge Base code from list_knowledge_bases, for example 'legislation-za-municipal'.","maxLength":50,"title":"Code","type":"string"},"text":{"description":"Search text, ideally a focused legal search phrase such as 'informal trading permit'.","maxLength":500,"title":"Text","type":"string"},"top_k":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":5,"description":"How many passages to return (1 to 100).","title":"Top K"},"frbr_place":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only passages from this place code, for example 'za' or the locality 'za-cpt'.","title":"Frbr Place"},"principal":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True to keep only principal legislation and skip amendment notices (legislation Knowledge Bases).","title":"Principal"},"repealed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"False to leave out repealed legislation, true for only repealed.","title":"Repealed"}},"required":["code","text"],"title":"search_knowledge_baseArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_places":{"post":{"operationId":"list_places","summary":"List the countries and localities (provinces, municipalities) the Content API covers, with their place codes. Use for \"W","description":"List the countries and localities (provinces, municipalities) the Content API covers, with their place codes. Use for \"Which African countries does Laws.Africa cover\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"page_size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Results per page (1 to 100).","title":"Page Size"}},"title":"list_placesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_place":{"post":{"operationId":"get_place","summary":"Get one country or locality by its place code, with the localities inside it. Use for \"What localities does Laws.Africa ","description":"Get one country or locality by its place code, with the localities inside it. Use for \"What localities does Laws.Africa have in South Africa\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"frbr_uri_code":{"description":"Place code, for example 'za' for a country or 'za-cpt' for a locality.","maxLength":40,"title":"Frbr Uri Code","type":"string"}},"required":["frbr_uri_code"],"title":"get_placeArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_work_expressions_in_place":{"post":{"operationId":"list_work_expressions_in_place","summary":"List the laws (works with their current expression) of one country or locality, with title, FRBR URI, type, year and com","description":"List the laws (works with their current expression) of one country or locality, with title, FRBR URI, type, year and commencement. The plan decides which places return data; Cape Town by-laws are open to every plan. Use for \"List the Cape Town by-laws on Laws.Africa\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"frbr_uri_code":{"description":"Place code, for example 'za-cpt'.","maxLength":40,"title":"Frbr Uri Code","type":"string"},"updated_at__gte":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only works updated at or after this ISO 8601 time, for example 2026-01-01T00:00:00Z.","title":"Updated At  Gte"},"created_at__gte":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only works created at or after this ISO 8601 time, for example 2026-01-01T00:00:00Z.","title":"Created At  Gte"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"page_size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Results per page (1 to 100).","title":"Page Size"}},"required":["frbr_uri_code"],"title":"list_work_expressions_in_placeArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_work_expressions":{"post":{"operationId":"list_work_expressions","summary":"List laws across every place your plan can access, filtered by when they were created or updated, with title, FRBR URI a","description":"List laws across every place your plan can access, filtered by when they were created or updated, with title, FRBR URI and commencement. Use for \"Which African laws changed on Laws.Africa since January 2026\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"updated_at__gte":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only works updated at or after this ISO 8601 time, for example 2026-01-01T00:00:00Z.","title":"Updated At  Gte"},"created_at__gte":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only works created at or after this ISO 8601 time, for example 2026-01-01T00:00:00Z.","title":"Created At  Gte"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"page_size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Results per page (1 to 100).","title":"Page Size"}},"title":"list_work_expressionsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_taxonomy_topics":{"post":{"operationId":"list_taxonomy_topics","summary":"List the subject topics used to classify laws, as a tree with names and slugs. Use for \"What subject topics does Laws.Af","description":"List the subject topics used to classify laws, as a tree with names and slugs. Use for \"What subject topics does Laws.Africa use to classify legislation\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"page_size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Results per page (1 to 100).","title":"Page Size"}},"title":"list_taxonomy_topicsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_taxonomy_topic_works":{"post":{"operationId":"list_taxonomy_topic_works","summary":"List the laws classified under one taxonomy topic. Use for \"Which laws are filed under the environment topic\".","description":"List the laws classified under one taxonomy topic. Use for \"Which laws are filed under the environment topic\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"slug":{"description":"Topic slug from list_taxonomy_topics, for example 'environment'.","maxLength":100,"title":"Slug","type":"string"},"updated_at__gte":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only works updated at or after this ISO 8601 time, for example 2026-01-01T00:00:00Z.","title":"Updated At  Gte"},"created_at__gte":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only works created at or after this ISO 8601 time, for example 2026-01-01T00:00:00Z.","title":"Created At  Gte"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"page_size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Results per page (1 to 100).","title":"Page Size"}},"required":["slug"],"title":"list_taxonomy_topic_worksArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}