Developers

Build on the data. Watch it ship.

The public API behind lokoja.app, and the running log of releases to the WhatsApp assistant, the client console and the data engine — the same transparency we ask of Nigeria's food markets, applied to ourselves.

Base URL

https://api.lokoja.app

JSON over HTTPS. The free endpoints below take a free API key — minted instantly with the form here, no approval step — sent as the X-API-Key header (or an api_key query parameter). Free keys carry 10 requests per hour per endpoint; over the limit you get a 429 with a Retry-After header and the reset time. Data refreshes automatically — prices monthly per source cadence, the diesel-indexed haulage layer weekly.

used by every Try-it button below — leave it empty to see the 401 for yourself

Get your free API key

One email address, one click, instant key — it appears below and lands in your inbox as a receipt. Lost it? Request again with the same email and the same key comes back. Free for any use with attribution: link to lokoja.app wherever the data is shown. Free-tier limit: 10 requests per hour per endpoint — enough to evaluate and to power a page; for production volume, see full data access below.


    

Price series free key

GET /price-series?commodity=Maize&months=13

Recent price history for one commodity across all covered markets — per-market monthly medians in ₦ per tonne. Commodities: Beans, Gari, Groundnuts, Maize, Maize flour, Millet, Onions, Rice, Sorghum, Yam. This endpoint powers every page under lokoja.app/prices.

runs live, trimmed to 3 months for readability

    

Haulage summary free key

GET /haulage-summary

The headline road-haulage rate (₦ per tonne-km), the current diesel index against the baseline, and a representative set of real corridors with modelled transport cost per tonne. Powers lokoja.app/haulage.

computes the corridor set live — can take up to ~30 seconds

    

Dataset metadata free key

GET /meta

Covered commodities, available periods, and data-source information.


    

Corridor Risk Score commercial · risk scope

GET /risk-score?commodity=Maize&market=Dawanau%20(Kano)&period=2026-08
GET /risk-score/corridor?commodity=Maize&buy_market=…&sell_market=…
POST /risk-score/batch  {"items":[{commodity, market, period?}, …]} ≤ 500
GET /risk-score/portfolio?commodity=Maize → CSV (or format=json)
GET /risk-score/changes?commodity=Maize → markets whose band moved this month

A 0–100 local price-risk score per commodity, market and month (higher = riskier) with a band — Low, Moderate, Elevated, High — a separate A/B/C confidence grade for data quality, the component breakdown and plain-language drivers. Built as an input to agri-credit and collateral decisions, never borrower-level. Components: seasonality, three-month momentum, dislocation versus neighbouring markets, volatility, inbound arbitrage pressure, plus demand and verification signals where the data is thick enough; conflict-affected markets are flagged, not priced. Weights are fitted and validated out-of-sample on 24,000+ market-months of WFP history and re-tested on 148,000 market-months of the World Bank feed (AUC 0.68, High band 6× the Low band's adverse-move rate) — method and calibration on the methodology page. Each score is computed on the observed WFP series the model was validated on where that series is current for the commodity, otherwise on the modelled World Bank feed — every row carries its source and provenance. Where a fresher modelled price exists it is attached as a labelled nowcast with a divergence driver — a cross-check, never blended into the score.

Keys with the risk scope: 90-day validation pilots for lenders are free — hello@lokoja.app.

Fair use: the free tier is free for evaluation, research and journalism — the key identifies your usage, and attribution to Lokoja Intelligence is the only price. Be gentle with request volume; for production dependence, SLAs and bulk access, see full data access below. The try-it buttons on this page run against the live API with the key you paste above — without one, they show you the real 401.

No code? Embed a badge

Want a live price on your site without touching the API? The free embeddable price badge is two lines of HTML — pick a commodity and market, paste, done. It refreshes weekly and keeps its attribution link.

Full data access

The complete engine — corridor-level opportunity tables, market-pair cost breakdowns, demand signals, and query access — is available under commercial data plans with an API key, SLA, and a signed data-quality schedule. Write to hello@lokoja.app.

2026-09-25 · 05:00 UTC

Assistant hears “your price is wrong” and asks for the trader’s figure

A trader who says a quoted price is off — in English, Pidgin, Hausa, Yoruba or Igbo — now gets a reply that thanks them and asks what they see today, instead of a failed lookup. A reply such as “maize 100kg is 34,000 in Dawanau” is parsed and stored beside the figure Lokoja quoted, converted per tonne. Those disputes reach the market’s Field Ambassador, who verifies at the stall; an accepted weekly report then becomes the assistant’s answer.

2026-09-23 · 04:55 UTC

Field Ambassador prices now lead the answer

Prices verified in a market by a Lokoja Field Ambassador and accepted on review now become the assistant’s answer for that market for the following two weeks, labelled “week to 20 Sep, ambassador-verified”, ahead of the monthly reference feeds. The same figure appears as the latest point in /price-series, marked source: "field" with its observation date. Reported commodity names are mapped to the engine’s (white corn to Maize, black-eye beans to Beans) and commodities the feeds never carried, such as soybeans and tiger nut, become answerable. First market live: Dawanau, Kano.

2026-09-23 · 04:20 UTC

USSD remembers your language and credits your ambassador

Basic-phone traders who chose Hausa once now get the Hausa menu on every later dial. A field ambassador can register a trader’s phone by dialling the USSD code followed by their ambassador number, in one go with the first price lookup (for example *code*13*1*1*1#), so traders without WhatsApp count toward the ambassador’s numbers exactly like QR sign-ups. First touch wins, as on WhatsApp.

2026-09-15 · 04:33 UTC

Assistant reachable from basic phones by USSD

Traders without WhatsApp can now dial a USSD code and get the same answers: a numbered menu in English or Hausa (commodity, then market) or a typed question, all routed through the same query engine as the WhatsApp assistant. Every session is logged as a USSD query, so demand from basic phones counts alongside WhatsApp. Live channel number follows once the Africa’s Talking code is provisioned.

2026-09-09 · 02:30 UTC

“Mile 12” now understood as Lagos

Asking the assistant for a price “in Mile 12”, “mile12” or “Ketu” now resolves to the Lagos series instead of falling through to a national figure. Mile 12 is the market Lagos traders mean when they say “Lagos price”, and the first Mile 12 candidate to use the assistant asked exactly that way.

2026-09-08 · 06:40 UTC

Assistant explains itself to people who ask to “join”

Messages like “add me to the platform”, “register me” or “join your group” now get a clear answer: this chat is Lokoja, there is no group to join, save the number and ask a price. The reply shows example questions and the commodity list, in English or Pidgin. Every “Ask on WhatsApp” button on lokoja.app also now opens WhatsApp with a real question typed and ready, so the first send returns a price.

2026-09-03 · 14:05 UTC

Console menu grouped into Products, Integration, People, Finance

The console sidebar is now a sectioned menu instead of a flat list: Products (Opportunities, Market Pair, Demand Query, Risk Score), Integration (API Keys & Tiers, Console Users), People (Pre-boarding, Field Ambassadors, Payroll) and Finance (Pricing). Client accounts see Products only; the groups open expanded so every screen stays one click away.

2026-09-03 · 12:30 UTC

Risk scores choose their price source honestly

The Corridor Risk Score now picks its price series per commodity: the observed WFP series the model was validated on whenever that series is current, otherwise the modelled World Bank feed — and every row says which it used. Where the observed series is current, the fresher modelled price is attached as a labelled nowcast with a driver when the two diverge by 10% or more; it is a cross-check, never blended into the score. Commodity names resolve to the freshest variant of their family (so "Maize" never lands on a series that stopped years ago), stale series are graded C and say so, and the portfolio CSV gains the nowcast columns.

2026-09-03 · 04:45 UTC

Corridor Risk Score

A new commercial product for lenders and insurers: a 0–100 local price-risk score per commodity, market and month, with bands, a separate A/B/C confidence grade, component breakdown and plain-language drivers — plus corridor scores, batch lookups, a portfolio CSV, a month-on-month band-change feed and an emailed alert digest, all under a new risk API scope. Weights were fitted and validated out-of-sample on 24,000+ market-months of WFP history (AUC 0.70; the High band shows 4–6× the adverse-move rate of Low). Conflict-affected markets are flagged, not priced — the backtest showed conflict carries no price-drawdown signal. Console gains a Risk Score page with map, tables, corridor lookup and the alert digest.

2026-09-02 · 02:00 UTC

Console actions get progress and confirmation feedback

Every action button on the API-keys and Pricing screens now disables itself while its request runs, shows a working indicator, and confirms the outcome with a toast once done — success messages no longer vanish when the page refreshes its data, and a double-click can no longer fire an action twice.

2026-09-02 · 01:36 UTC

Endpoint-group cheat sheet while provisioning

The console's cost reference now explains what each endpoint group actually does alongside its serving cost, and appears on the provisioning tab too — so choosing what to grant a key no longer requires knowing the endpoints by name.

2026-09-01 · 21:07 UTC

All-in per-key cost estimates

The console's per-key monthly estimate now includes US taxes and the payment service charge on top of the serving subtotal, itemised in the breakdown and reflected in every ceiling figure; both percentages are editable on the Pricing page alongside the per-endpoint-group rates.

2026-09-01 · 20:41 UTC

Editable serving-cost rates + live FX

Serving-cost rates behind the per-key cost calculator moved from code constants to an editable console page: a new Pricing screen shows every endpoint group's ₦-per-1,000-calls rate (with its code default and dollar equivalent), lets operators override or reset each one, and displays the live USD→NGN exchange rate fetched when the page opens — including a one-click FX-derived rate for the Claude-backed assistant scope. Edited rates flow straight into the API-keys calculator.

2026-09-01 · 19:05 UTC

Per-key monthly cost estimates in the console

Every endpoint group now carries serving-cost guidance, and the console's API-keys page adds a live calculator: as an operator picks a tier's endpoint groups and hourly limit, an itemised monthly cost per key adds up — ceiling and utilisation-adjusted — and the same estimate appears when provisioning a key into a tier.

2026-09-01 · 18:48 UTC

Tiers now carry access scopes

A tier is now a full product package: alongside its rate limit it grants named endpoint groups — price data, haulage, corridor intelligence, demand signals, assistant queries — manageable from the console, with changes live for every key in the tier on its next request. A key whose tier lacks an endpoint's scope receives 403 with an upgrade path; free keys keep price data and haulage by default.

2026-09-01 · 18:23 UTC

Keys provisioned, managed and monitored from the console

The console's API-keys page now provisions a key directly into any tier — emailed to the recipient with a personal note — alongside moving keys between tiers, switching them off, and a usage view: hourly requests per key over the last seven days, per endpoint. Key values are never displayed after issuance.

2026-09-01 · 16:58 UTC

Groundnuts and millet join the data layer

Two feed-ration staples enter the engine from the observed World Bank RTFP series — groundnuts (the protein side of Nigerian feed economics) and millet — each across 67 markets with 12-month histories, live on the API, the price pages and the embeddable badge. Coverage is now 10 commodities.

2026-09-01 · 04:13 UTC

Rate-limit tiers, configurable

API rate limits are now tier categories managed from the console rather than constants: each tier carries its hourly per-endpoint limit, every key belongs to a tier, and a limit change applies to all of a tier's keys on their very next request. External identities — self-serve free keys and the demo trial — are always capped; only internal service identities run uncapped.

2026-09-01 · 04:03 UTC

Fair limits on the free tier

Free API keys now carry a rate limit of 10 requests per hour per endpoint, counted in fixed hourly windows — over the limit returns 429 with Retry-After and X-RateLimit headers and the exact reset time. Requesting a key for an email that already has one no longer returns it in the response; it is re-sent to that inbox only. Commercial-tier access is uncapped.

2026-09-01 · 03:15 UTC

Free API keys for the open tier

The open data endpoints (price series, haulage summary, metadata) now take a free API key — minted instantly on this page with just an email, sent as the X-API-Key header or an api_key parameter, and recoverable by re-requesting with the same email. The data stays free with attribution; the key makes usage visible so the free tier can stay generous.

2026-09-01 · 03:15 UTC

Live demand counter, published

A new open endpoint, GET /stats/public, serves aggregate demand-signal counters — total trader queries analyzed and answered, never individual records.

2026-08-25 · 04:15 UTC

Kenya joins the data layer

The engine now serves observed Kenyan market prices (WFP monitoring, in Kenyan shillings) as a first-class source — 86 markets over the trailing year, 10 staple families, live at lokoja.app/ke/ and via the API's source=ke-wfp. Data-only by design: the corridor haulage model and the WhatsApp assistant remain Nigeria-scoped, and engine endpoints refuse non-Nigerian sources rather than misprice them.

2026-08-25 · 01:55 UTC

Diesel price feed restored

Our upstream diesel-price source changed its page layout, which had silently stalled the haulage index at its calibration baseline. The engine now reads the new format (keeping the old ones as fallbacks) — the current pump price (₦1,662.50/L, 17 Aug) flows into corridor costs again.

2026-08-25 · 01:30 UTC

Haulage index live from the first minute

The weekly diesel price that indexes corridor haulage costs is now fetched the moment the engine starts and stored durably across deployments — landed costs always move with the current pump price instead of falling back to the calibration baseline after a deploy.

2026-08-25 · 00:57 UTC

No reply ever dead-ends

The assistant now auto-corrects misspelled market names ("dawanu", "lonoja"), asks "did you mean…?" instead of giving up, and treats "closest market" as a real question. Where your market has no data, it leads with that honestly and offers a numbered choice of the two nearest covered markets — every reply carries a next step.

2026-08-24 · 17:39 UTC

Admin mail delivery

A key-gated admin endpoint can now deliver prepared operational messages to the operator's own inbox through the platform's email service — the same fail-closed gate as backups, restricted to own addresses by design.

2026-08-21 · 03:43 UTC

Route questions understood

The assistant now recognises corridor questions ("beans from Kano to Aba") in all supported languages instead of answering with a one-sided price. Full route costing is part of the commercial service; the console's demand page gains a corridors-asked view.

2026-08-20 · 18:47 UTC

Nightly offsite backups

Every night, a verified snapshot of all platform state — accounts, attribution, signed contracts, demand signals — is stored offsite, versioned, and restorable with a documented one-page procedure. Completes the three-tier data story: never-deleted records, deploy-proof primary storage, offsite history.

2026-08-20 · 18:23 UTC

Durable state across deploys

All runtime state — users, attribution records, signed agreements, demand signals, feedback — now lives on persistent volume storage that survives every deployment. Nothing in the platform deletes records: deactivation and termination are flags, and history is kept in full.

2026-08-17 · 17:52 UTC

Assistant understands 180+ Nigerian towns

Ask about a town we don't cover — Kabba, Okene, Wukari — and the WhatsApp assistant now answers from the nearest covered market with the distance, instead of giving up. Follow-up questions keep the conversation's context, and typos are tolerated.

2026-08-17 · 16:52 UTC

Production WhatsApp launch

The assistant moved from sandbox to a production WhatsApp Business number (+234 816 085 2507).

2026-08-16 · 17:23 UTC

Garri, spelled properly

The dataset says “Gari”; Nigeria says “Garri”. The assistant's replies — and all data we publish — now use the right spelling, whichever way you type it.

2026-08-14 · 18:38 UTC

Console sessions that survive refresh

The client console (console.lokoja.app) keeps you signed in across refreshes and revisits via secure session tokens, with named navigation and role-based pages.

2026-08-14 · 17:31 UTC

api.lokoja.app + access tiers

The engine moved to its own domain with a public tier (price series, haulage summary) and a keyed commercial tier (opportunity tables, corridor detail, demand signals).

2026-08-14 · 16:59 UTC

Diesel-indexed haulage in the engine

Corridor transport costs now re-index weekly against the national diesel price, with zonal shading from NBS relativities — landed costs across the assistant, console and API move when the pump price moves.

2026-06-24 · 22:44 UTC

Engine, assistant & console

The foundation: the arbitrage engine computing net-of-haulage corridor economics from World Bank RTFP and WFP data, the five-language WhatsApp assistant, and the client intelligence console.