# Open Alvary > A public catalogue of African law, with each record's official source and rights status. A read-only REST API (https://api.open.alvary.ai/api/v1) and MCP server (https://api.open.alvary.ai/mcp) for organisations with an account (the Starter plan is free), and a public change feed (https://open.alvary.ai/api/changes). Each page below is Markdown. The OpenAPI document is at https://api.open.alvary.ai/api/v1/openapi.json. ## Start here - [Overview](https://open.alvary.ai/docs/index.md): Search, read and follow Africa's published law from your own code and AI tools. - [Quickstart](https://open.alvary.ai/docs/quickstart.md): Get a key, make your first request and read the answer, in about five minutes. - [Authentication](https://open.alvary.ai/docs/authentication.md): API keys, connected apps, roles and the second factor. - [Plans and rate limits](https://open.alvary.ai/docs/plans.md): What each plan allows, how limits are counted, and what to do when you reach one. - [Console guide](https://open.alvary.ai/docs/console.md): Every page of the console, step by step, with pictures. ## Guides - [Find records](https://open.alvary.ai/docs/search.md): Find records by title, citation or text, search the words of published texts, and resolve citations to the part they name. - [Read a record and its text](https://open.alvary.ai/docs/records.md): A record's details, its official source, and its full text once cleared. - [Retrieve evidence for AI answers](https://open.alvary.ai/docs/retrieval.md): Get ranked, citable legal evidence for a question, check cited parts before an answer is shown, and keep a cache honest with the change feed. - [Jurisdictions, bodies and courts](https://open.alvary.ai/docs/jurisdictions.md): The jurisdictions the catalogue holds, which regional bodies a country belongs to on a date, and each jurisdiction's courts. - [Rights and reuse](https://open.alvary.ai/docs/rights.md): What you may do with the catalogue and with each law's text. - [Pagination](https://open.alvary.ai/docs/pagination.md): Page through records with limit and offset, and through changes with cursors. - [Follow changes](https://open.alvary.ai/docs/changes.md): Keep a copy current, subscribe to a feed, or get notified when the catalogue changes. - [Download and mirror the data](https://open.alvary.ai/docs/mirror.md): Download a release, check each file's SHA-256, and keep your copy current with the change feed. - [Monitors and webhooks](https://open.alvary.ai/docs/webhooks.md): Get your monitors' matches at your own endpoint, signed, as they happen. - [Connect AI tools](https://open.alvary.ai/docs/ai-tools.md): Connect Claude, Claude Code, Codex or Antigravity to the Open Alvary catalogue over MCP, with no API key. ## API reference - [API reference](https://open.alvary.ai/docs/api.md): The base address, sign-in, formats and every route of the REST API. - [Errors](https://open.alvary.ai/docs/errors.md): Every error code, what it means and what to do. - [Search the catalogue](https://open.alvary.ai/docs/api/search.md): Records with every one of the words in their title, citation or summary, or in one part of their cleared full text, a page at a time in record ID order. Whole words only, in any order: `invest` doesn't find the Investments and Securities Act. Without `jurisdiction`, a search covers your plan's jurisdictions. - [Search published texts](https://open.alvary.ai/docs/api/search-text.md): Passages of published texts that match the words, best first: each hit is a section, article or schedule paragraph, with a snippet of the exact text, its byte span and the anchor to get it whole. Only published texts are searched; `coverage` says how many records in the scope have one, and `status` tells no result (`no_result`) apart from a scope with no published text (`unsupported_scope`) and a search that could not run (`degraded`). A query that reads as a citation of a part, such as `NDPA s. 23(1)(a)`, puts that part first. Without `jurisdiction`, a search covers your plan's jurisdictions. - [List records](https://open.alvary.ai/docs/api/list-sources.md): Catalogued records a page at a time, with the same filters as search. Without `jurisdiction`, the list covers your plan's jurisdictions. - [Get a record](https://open.alvary.ai/docs/api/get-source.md): One record: its title, citation, type, legal status, official link and rights status. - [Get a record's history](https://open.alvary.ai/docs/api/get-relationships.md): Whether the record is current, and how it relates to other records, a page at a time: the laws it repeals, amends or commences and the law it is made under; the later laws that repealed, amended or commenced it; the treaty or directive it transposes, domesticates, implements or ratifies, and the laws that do so for it; the records it cites and that cite it; the instruments made under it; and, when it has been repealed or replaced, the record in force in its place now. For case law, each judgment paragraph that cites a provision or another judgment, with the part it cites, and how a judgment follows, applies, distinguishes, doubts or overrules another, or was so treated, once a legally qualified reviewer has recorded it; no treatment listed means none is recorded, never that the judgment is good law. Links one step away only (depth 1), between public records that a reviewer has checked against the official text. - [Get a record's editions](https://open.alvary.ai/docs/api/get-expressions.md): The record's language editions with a public text: for each, its texts, the one to read when no date is given (`preferred_version_id`) with the reason, and what the edition is worth as law as the record states it (`authority`, with `authority_evidence`; `unknown` when nothing is recorded); and the instrument's own rule for which version prevails where its language versions differ (`language_rule`). A preferred text is a reading default, never a claim that the edition is authoritative. An edition's ID is `{source_id}:{language}`; pass it as `expression_id` to Get a record's texts. - [Get a record's texts](https://open.alvary.ai/docs/api/get-versions.md): The record's text versions cleared for reuse, each with its full text; the parts, chapters and sections located in that text; and its rights record. A record whose text isn't cleared answers no versions and a notice saying why. With `as_of` or `language`, only the text they select, or the alternatives and why (`selection`): a text with no effective date is never taken to be in force on a date. - [Get a text](https://open.alvary.ai/docs/api/get-version-text.md): One text version's full text, exactly: `text/plain; charset=utf-8`, the bytes whose SHA-256 is the version's `content_hash` and which structure offsets refer to. The `ETag` is that hash: send it back as `If-None-Match` and an unchanged text answers `304` with no body, after the same check that it is still public. A version that is not public answers like one that does not exist. - [Get a text's structure](https://open.alvary.ai/docs/api/get-version-structure.md): The parts, sections, articles and other parts of one text version, in document order, a page at a time, each with its span in the text and its locator. Each part's `id` is also an anchor: get it at `/anchors/{anchor_id}`. Answers carry an `ETag` for `If-None-Match`. - [Get one part of a text exactly](https://open.alvary.ai/docs/api/get-anchor.md): One part of a text, such as a section: its words, its span in the text and the unit of the offsets, its locator and printed number, the hash of its own bytes for checking a quotation, a citation, the official file and the attribution the rights record asks for. The words are never shortened. A part of a text that is not public answers like one that does not exist. - [Get a record's rights](https://open.alvary.ai/docs/api/get-rights.md): The rights record behind a record (licence, permissions, evidence, review) and the decision taken from it: whether the catalogue record and the text may be shown, and why. - [Get a record's rights history](https://open.alvary.ai/docs/api/get-rights-history.md): Every revision of the record's rights record, newest first, as recorded when the catalogue changed; revisions are never edited. Each new revision of a public record's rights record is announced as a `rights_changed` change, and text and withdrawal events name the revision in force (`rights_revision`), so a copy of a text can say which rights record it was published under. - [Resolve a citation](https://open.alvary.ai/docs/api/resolve-citation.md): The records a citation refers to. Case and spacing don't matter; encode the citation for a URL (spaces as `%20`, `/` stays as it is). A citation of a part, such as `NDPA s. 23(1)(a)`, `art. 12` or `First Schedule, para. 3` after the record's citation, also answers `provision`: the part in the record's public text, with its anchor and exact span, or the alternatives and why. Nothing is chosen between alternatives. - [List jurisdictions](https://open.alvary.ai/docs/api/list-jurisdictions.md): The jurisdictions the catalogue holds: countries and their states or regions, the African Union and the regional bodies, with their legal systems and languages, and for each country `member_of`, the bodies it belongs to on `as_of` (today by default). Only reviewed memberships are listed; `status` is `unknown` when none is reviewed. - [Get a jurisdiction and its memberships](https://open.alvary.ai/docs/api/get-jurisdiction.md): One jurisdiction on a date. For a country, `member_of`: the African Union and the regional bodies it belonged to on `as_of`, in `uncertain` those it may or may not have belonged to (the date falls inside an uncertain first or last day), and in `ended` the memberships that had ended by then, each with its first and last day (as precisely as the evidence gives them, with their bounds), its basis, evidence and review, and its suspensions from participation as context. For the African Union or a regional body, `members`: its member states on that date, and those that had left. Only reviewed memberships are listed; `status` is `unknown`, never an empty list, when none is reviewed. A suspension never ends a membership. Membership alone never means a body's treaties apply to a member. - [Get coverage](https://open.alvary.ai/docs/api/get-coverage.md): How many records the catalogue holds, how many have cleared full text, and how many in each jurisdiction. - [Retrieve evidence](https://open.alvary.ai/docs/api/retrieve-evidence.md): Ranked legal evidence for a question, for an application that writes answers: each unit is a provision (or the text a part holds between its provisions, or a whole law's title and preamble), with its exact words or an excerpt within `max_evidence_bytes`, its byte span and hashes to check it, what quoting it asks for, whether it was in force, the definitions it relies on, and why it ranks where it does. A query that cites a part, names a law or asks what a term means is routed to that first (`query.routes`). The same request over the same revisions gives the same answer. Nothing is generated: only published texts' words. Without `jurisdiction`, it covers your plan's jurisdictions. With `scope=applicable`, it also covers the regional and treaty law that binds in the one jurisdiction asked about, and says how each unit relates to it. - [Check cited parts](https://open.alvary.ai/docs/api/check-currentness.md): Before showing an answer that cites the corpus: for each cited part (up to 100), whether it is still published with the same words (`span_mismatch` when its words don't hash to the `span_hash` sent), whether a newer text of the same edition exists (with the same part's anchor there and whether its words changed), and whether it was in force on a date. Given a `jurisdiction`, also whether the record binds there on that date (`applicability`): a regional instrument through the country's reviewed membership and the instrument's legal effect, a treaty through the country's own ratification or accession. A part that is not public now and one that never was get the same answer, `unavailable`; only a part whose text was public and was withdrawn for a reason that may be told (its rights record changed or lapsed, or its approval was withdrawn) is `withdrawn` instead, to a keyed caller. - [List court registers](https://open.alvary.ai/docs/api/list-court-registers.md): The jurisdictions with a court register, each with how many courts, relations and entries it records and how many entries have been reviewed. A jurisdiction not listed has no register: every court relation there is `unknown`. - [Get a court register](https://open.alvary.ai/docs/api/get-court-register.md): A jurisdiction's courts and tribunals with their levels, appeal routes and the dates their roles apply; how each court's decisions bear on the others (`binding`, `prevails_on_matter`, `binding_in_referred_case`, `persuasive` or `not_applicable`), each in the words of its source; and whether precedent binds there at all. A regional or continental body's register also gives the states its courts reach, the routes from their courts to its own and declarations admitting cases from individuals; its bearing on a member state's courts is limited to the subject matter its sources give. Every entry has its sources and its own review: `structural` for courts, matters, members, routes and declarations, `doctrinal` (by a legally qualified reviewer) for relations and the precedent rule. Until a relation has its own doctrinal review its `relation` is `unknown`, and `recorded` shows what awaits review. A jurisdiction with no register answers an empty one. - [List changes](https://open.alvary.ai/docs/api/list-changes.md): Changes in the order they were made, oldest first: records added, corrected or withdrawn, texts published, legal effects recorded, coverage changes, and reviewed memberships and suspensions recorded. Keep the `resume_token` and send it next time for only newer changes. Send at most one of `cursor`, `resume_token` and `start`. The same route answers without a key at https://open.alvary.ai/api/changes. - [Get a change](https://open.alvary.ai/docs/api/get-change.md): One change, at its latest revision. - [List recent changes](https://open.alvary.ai/docs/api/list-recent-changes.md): The latest changes of the last 90 days, newest first (up to 50), with the same filters. For showing what's new, not for keeping up: use List changes for that. - [Atom feed of changes](https://open.alvary.ai/docs/api/get-atom-feed.md): The latest changes of the last 90 days as an Atom feed, newest first, with the same filters. Public at https://open.alvary.ai/api/changes/feed.atom. - [RSS feed of changes](https://open.alvary.ai/docs/api/get-rss-feed.md): The same as the Atom feed, as RSS 2.0. - [Get change coverage](https://open.alvary.ai/docs/api/get-change-coverage.md): When recording changes began, how far back they can be replayed, and what is held for each jurisdiction. Changes cover what Open Alvary holds, not every change in a country's law. - [List plans](https://open.alvary.ai/docs/api/list-plans.md): The plans and their limits. Needs no key. - [Get the quota policy](https://open.alvary.ai/docs/api/get-quota-policy.md): How limits are counted. Needs no key. - [Get the calling key](https://open.alvary.ai/docs/api/get-key.md): The key or connected app that sent the request: its ID, kind, name and when it expires, and your organisation's access as this request was admitted under it: its plan, the countries it covers and when it ends. Never the secret. A server can read `expires_at` and warn before the key stops working, then rotate it in the console. It counts as one request, like any other. - [List data releases](https://open.alvary.ai/docs/api/list-releases.md): The versioned data releases still available: their scope, files and checksums. Download a file from `download_base` + `/` + its name. Catalogue releases download from `/downloads/…` with no key. Releases with full text are listed only when your organisation's access includes bulk releases, for the jurisdictions of its plan, and download from `/api/v1/bulk/…` with your key. - [Download a bulk release file](https://open.alvary.ai/docs/api/get-bulk-file.md): One file of a release, exactly as its manifest's SHA-256 says, for organisations whose access includes bulk releases (granted by agreement, not a listed plan). Releases with full text download only here, and only for the jurisdictions of your plan. Each file is checked against the current catalogue just before it is sent: a release with a withdrawn or changed record is no longer served, so download a newer one. Downloads count as bulk use and draw on your organisation's data a day. - [MCP tools](https://open.alvary.ai/docs/api/mcp.md): The tools AI tools use, and how to call them yourself. ## Help - [Help](https://open.alvary.ai/docs/help.md): Answers to common questions, and how to reach us. - [Changelog](https://open.alvary.ai/docs/changelog.md): Changes to the API, the MCP server and these docs. - [Compatibility](https://open.alvary.ai/docs/compatibility.md): Which changes come at any time, how breaking changes are announced, and what your code should ignore. ## Optional - [All the documentation in one file](https://open.alvary.ai/llms-full.txt)