API access
Programmatic access, on request.
How to get access
Three steps
- 1
Email your request
Say who you are, what you will use the data for, and which data you need. A short note is enough.
- 2
Receive a key
Access is granted case by case. You get a personal key with an expiry date.
- 3
Call the API
Send the key as an X-API-Key header, with the same endpoints below. Cite the source when you publish.
Using your key
An example request
curl -H "X-API-Key: tdo_YOUR_KEY" \
"https://YOUR-OBSERVATORY-HOST/api/v1/series?ids=Revenue_by_TaxHead:4&from=2018/19"
// or from code
const res = await fetch("https://YOUR-OBSERVATORY-HOST/api/v1/series?ids=Revenue_by_TaxHead:4", {
headers: { "X-API-Key": "tdo_YOUR_KEY" },
});
const { series } = await res.json();
// series[0].points → [{ fy: "2015/16", value: 11230.87 }, …]
// series[0].flags → known data-quality notes for this indicatorEndpoints
What you can ask
GET /api/v1/sheets
The 14 sheets with coverage, sections and source notes; add ?sheet=<name> for one sheet with all its indicators.
/api/v1/sheets?sheet=EnforcementGET /api/v1/catalog
Search indicators across every sheet and the Macro Data Portal.
/api/v1/catalog?q=arrears&limit=10GET /api/v1/series
One or more series by id, as JSON (with their data-quality flags) or CSV.
/api/v1/series?ids=Revenue_by_TaxHead:4&from=2018/19GET /api/v1/observations
Long-format rows: one per indicator per fiscal year. Paged.
/api/v1/observations?sheet=Customs_Trade&q=exports&limit=20GET /api/v1/districts
District-level counts from the URA workbook (new TIN registrations, presumptive tax register) for every district, with the published total.
/api/v1/districts?set=newtinGET /api/v1/sources
Where the data comes from: the URA dataset and the Uganda Macro Data Portal snapshot (datasets, publishers, dates).
/api/v1/sourcesGET /api/v1/sections
The sections of one sheet with their indicator ids, and which are reconciled to a published total.
/api/v1/sections?sheet=Audit_EnforcementGET /api/v1/dictionary
The data dictionary: unit, description and source reference for each indicator.
/api/v1/dictionary?q=arrearsGET /api/v1/health
Blank counts per sheet, reconciliation results and the catalogue of known data-quality flags.
/api/v1/healthConventions
Ids, years and blanks
- Ids. An indicator id is
<sheet>:<source row>, for exampleRevenue_by_TaxHead:4(Net URA Collections); Macro Data Portal series look likemdp:BOU_MMI_FY:E_EP. Find ids with the catalogue. - Fiscal years. Strings such as
2015/16(July to June). EFRIS also carries aPre-2019/20 (Undated)bucket. - Blanks. A blank cell in the source is simply absent from a series. It is not zero, and nothing is interpolated.