Emerald API
Start with a search.
Emerald gives you access to Kenyan judgments through a REST API. You can also connect the same case database to an MCP client.
Authentication
Send your Emerald key in the X-API-Key header.
X-API-Key: em_live_...The base URL is https://emerald.up.railway.app.
Search cases
GET /v1/searchSearch the text and metadata of cases already fetched into Emerald.
Example
curl "https://emerald.up.railway.app/v1/search?q=adverse+possession&document_type=judgment&limit=10" \
-H "X-API-Key: em_live_..."| Parameter | What it does |
|---|---|
q | Words, a phrase, party name or citation to search for. |
court | Filter by court code, for example KECA. |
date_from | Only return judgments on or after this date. |
date_to | Only return judgments on or before this date. |
limit | Number of results to return. Maximum: 100. |
offset | Skip results when paginating. |
Read a case
Search results include a document ID. Use it to fetch the case record or its text.
GET /v1/documents/{id}Case title, citation, court, date, source URL and hashes.GET /v1/documents/{id}/search-textPlain text used by Emerald for search and retrieval.GET /v1/documents/{id}/contentThe stored legal-body HTML.GET /v1/documents/{id}/content-urlA short-lived signed URL for the stored body artifact.Find a case by citation
GET /v1/citations/resolvecurl --get "https://emerald.up.railway.app/v1/citations/resolve" \
--data-urlencode "citation=[2025] KEHC 19140 (KLR)" \
-H "X-API-Key: em_live_..."New and updated cases
GET /v1/updatesUse an ISO timestamp in since. This is useful when you keep your own local index or cache.
curl "https://emerald.up.railway.app/v1/updates?since=2026-08-18T00:00:00Z" \
-H "X-API-Key: em_live_..."MCP
Use https://emerald.up.railway.app/mcp/ as the remote server URL. Authenticate with your Emerald key as a Bearer token.
Authorization: Bearer em_live_...The server exposes tools for judgments, statutes, citation lookup and recent cases.
search_casesSearch the fetched judgment corpus.search_statutesSearch fetched statutes.get_caseReturn details for one selected case.get_case_textRead the judgment in bounded chunks.resolve_citationLook up an exact citation.recent_casesSee cases recently added or refreshed.Errors and limits
401 | The API key is missing or invalid. |
404 | The requested case or stored content is not available. |
429 | The account has reached its current usage or rate limit. |
Search returns at most 100 results per request.