Skip to main content
Nigeria is covered by a grid of frames: cells roughly a kilometre across, each with a stable numeric id. Everything on LOCI falls within frames. The administrative identity of a place, its population, its buildings, its physical setting and its cultural make-up are recorded on frames, and so is every dataset an organisation adds or licenses. A frame id is therefore the key to everything known about a place. The API is how your own code uses that. It is four calls, all read-only, all with an API key that acts for your organisation. The first takes a latitude and longitude and returns a frame. The second takes a box and returns the frames in it. The third takes frame ids and returns what every dataset you can read says about each one. The fourth takes frame ids and a question and returns an answer whose figures were computed from the data and whose wording was checked against those figures.

Quickstart

Mint a key and make all four calls, with the responses they really return.

Authentication

What a key is, how it is minted, and what happens when it expires or leaks.

Scopes

The three presets, and which of the four calls each one reaches.

API reference

Every parameter, every response field, every error code.

What a key can and cannot do

A key reads. It cannot create, change or delete anything, cannot buy or sell data, cannot manage members, and cannot mint another key. There is no write capability a key can hold, so a leaked key can read what its scope permitted and nothing more. Everything else is done by a signed-in person in the app. A key acts for exactly one organisation, the one it was minted in, and sees that organisation’s own datasets and the ones it has licensed from the marketplace. It can be narrowed further at mint time to named datasets.

How answers are made

Figures are never generated. GET /v1/frames/data returns stored values as they are. POST /v1/frames/insight computes its figures from those values, has a model word them, and then checks every number in the wording against the computed results; wording that fails the check is dropped and the computed sentence stands alone. The answer says which happened in its engine field.