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.
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.
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.
The same data as the endpoints below, served over the Model Context Protocol so Claude, ChatGPT, Cursor, VS Code or any MCP client can call it as tools: list_commodities, latest_prices (per tonne, 100kg and 50kg bag, cheapest market first), price_series, haulage_summary, plus market_pair and corridor_risk for keys with the commercial scopes; country: "KE" switches the price tools to the Kenya layer. Discovery is open; tool calls use your free key with the same 10-per-hour-per-tool limit. Registry description at /.well-known/mcp/server.json.
Recent price history for one commodity across all covered markets — per-market monthly medians in ₦ per tonne. Every point carries a basis code (field_wholesale, rtfp_estimate, wfp_wholesale, wfp_retail, wfp_observed) and the payload a basis_legend, so a wholesale stall check is never mistaken for a modelled per-kg estimate. Commodities: Beans, Gari, Groundnuts, Maize, Maize flour, Millet, Onions, Rice, Sorghum, Yam. This endpoint powers every page under lokoja.app/prices.
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.
Covered commodities, available periods, and data-source information.
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.
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.
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.
The per-ambassador feed counts traders who asked a question in the last 14 days and traders still asking 14 days after they joined. Both cutoffs were compared as text against timestamps stored in a different shape, so on the cutoff day a question from hours before the cutoff still counted as active, and a referral made earlier that day was not yet judged for retention. The cutoffs are now rendered in the stored shape and a boundary test pins the behaviour. Checked against production: no current total moved. Reported by an outside reader of the code.
GET /ambassadors/stats, the open per-ambassador performance feed, had been returning each ambassador’s name, email address, phone number and USSD code alongside the counts, with no key required, since the contact columns were added to it. An outside reader of the deployed code reported it today and we confirmed it against production. The open response is now aggregate only: code, market, active flag and the referral and activity counts. The full rows need the data key or the admin key, which the console already sends, so nothing changes there. A test now asserts the open shape. Access logs in the retained window show no request to the endpoint other than our own verification.
After every price the assistant asks “Reply YES or NO”. A trader who answered an hour later, after checking the stall, was told “Couldn’t find commodity for that query”, because the reply was matched against a ten-minute memory meant for follow-ups like “per bag”. A bare YES or NO is now matched to the last quoted price for a full day and recorded as feedback on it. If nothing was quoted in that day, the assistant says in the trader’s language what YES and NO are for and how to ask again. Found while investigating a Field Ambassador’s report that the assistant “wasn’t properly responding” last week; the larger cause was the 3 to 5 November outage logged above.
A reader comparing our Kano and Dawanau maize pages was looking at two layers of the market, not two dates: a World Bank monthly estimate priced per kilogram and converted to a bag, and an ambassador’s wholesale stall check quoted per tonne. Each figure on /price-series and the MCP tools now carries a basis code with a plain-English legend, every price page says its basis in words under the number, commodity hubs mark stall-check rows ✓ field and explain the rest, and state pages carry the same line. Nothing in the numbers changed; what they are is now written down.
From 3 November until this release the price endpoints, the MCP tools and the WhatsApp assistant answered with errors. The upstream data host had started returning an empty page to automated downloads; the weekly refresh accepted it as a valid file and every build since carried the empty datasets. Downloads are now rejected unless they are a real CSV, a committed snapshot of the last good datasets (World Bank to August, WFP Nigeria and Kenya to October) stands in whenever a file is missing or unusable, and the service never serves an empty frame. Also in this release: /price-series carries each market’s coordinates and counts months in feed months so a newer ambassador week rides on top instead of crowding feed months out; price pages say “latest feed, August 2026” instead of “Today” once a feed figure is older than 45 days, a market page in reach of an ambassador’s stall check shows that field-verified figure with its distance and date, and commodity hubs list all 67 markets again.
list_commodities, latest_prices and price_series take country: "KE" and answer from the Kenya layer in Kenyan shillings; Nigeria stays the default. While wiring it we found that /price-series?source=ke-wfp had been overlaying Nigerian ambassador stall checks onto the Kenya frame, so a Kenya maize query carried a Dawanau row and lost older Kenyan months; the overlay now applies to Nigerian sources only. The series payload also states its currency and source.
The API now speaks the Model Context Protocol at https://api.lokoja.app/mcp (Streamable HTTP, stateless). Claude, ChatGPT, Cursor, VS Code and any other MCP client can call list_commodities, latest_prices, price_series and haulage_summary with a free key, and market_pair and corridor_risk with the commercial scopes; the data, keys, scopes and hourly limits are exactly those of the free endpoints and the price pages. Discovery (initialize, tools/list) is open and a registry description is published at /.well-known/mcp/server.json. Set-up guide at lokoja.app/mcp.
A Field Ambassador report line more than 300% above the reference feed’s figure for that market and commodity can no longer be accepted into the field-price layer, on the console or through the API: the reviewer is told which line to send back for correction. Lines 40% or more away from the reference are still flagged for judgement, because a harvest-season drop is real and a slipped digit is not. Added after two accepted reports briefly put beans and onions at about ten times their market price in the Dawanau answers; both were withdrawn the same day.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
A new open endpoint, GET /stats/public, serves aggregate demand-signal counters — total trader queries analyzed and answered, never individual records.
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.
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.
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.
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.
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.
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.
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.
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.
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.
The assistant moved from sandbox to a production WhatsApp Business number (+234 816 085 2507).
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.
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.
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).
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.
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.