Fertilizer price questions, answered in one call

10 of these 11 calls return a worked-out answer about what fertilizer costs in Kenya. You name a variety, optionally a county, and the reply is a single figure with a trust block attached, and no pile of rows left over for you to average.

11 questions under /api/partner/v1/market. 10 priced per answer at 4¢ a call; the rest are metered as ordinary calls.

The 11 questions

QuestionWhat comes backCallFiltersPrice
Can farmers here actually afford fertilizer this season? Fertilizer price weighed against what their crop earns. /fertilizer/affordability variety, window_days 4¢
Do the official prices and the online asking prices agree? /fertilizer/source-compare variety, county, window_days 4¢
How does the local price compare to the world market? /fertilizer/global-benchmark variety 4¢
Is the price rising or falling, and by how much? /fertilizer/trend variety, county, field, window_days 4¢
What can this API do, and what are the valid names? The catalogue of varieties, counties, fields and analyses. Call it first. /meta — call rate
What does DAP cost right now, and where? Robust median price for a variety, optionally in one county. /fertilizer/price variety, county, field, window_days 4¢
What does it cost in each individual market inside a county? Market-level detail where the county figure hides a spread. /fertilizer/markets variety, county, field, source, window_days 4¢
Where is the retail-minus-wholesale markup fattest? /fertilizer/margin variety, window_days 4¢
Which counties are dearest and which cheapest? Counties ranked by price — where to sell, where to buy. /fertilizer/rank variety, field, order, window_days 4¢
Which month of the year is cheapest to buy? Monthly index over the full history. /fertilizer/seasonality variety, county, field 4¢
Would that seasonal rule actually have made money? Replays the strategy over past years and reports the hit rate. /fertilizer/backtest variety, county, field 4¢

The vocabulary these calls accept

8 varieties are served: DAP, urea, CAN, NPK, MOP, TSP, sulphate of ammonia and anhydrous ammonia. Each can be read at retail or at wholesale, for the country as a whole or for one county, over a window you set. The catalogue call lists the valid names. It is the one entry here billed as an ordinary call, since it computes nothing.

Why a county figure is not the end of it

A county median is a useful number; it hides a real spread. 2 markets inside the same county can sit a long way apart on price. A buyer planning a delivery round cares about that gap far more than about the county average. So there are 2 calls: one for the county, one that opens the county up market by market. The second exists because the first was being used for decisions it could not carry.

The ranking call turns the same data the other way round and orders counties against each other, which is the shape a question like “where do I sell, where do I buy” takes.

Movement, and what a backtest is worth

3 of the calls are about change rather than level. The trend figure says whether a price is rising or falling and by how much. The seasonality figure says which month of the year has historically been cheapest. The third one tests that seasonal rule against the record and reports what following it would have returned.

The third call is the least glamorous of the set. It is arithmetic on what already happened, not a signal. The platform carries no price forecast anywhere: one was built, measured against the trivial rule of carrying today’s figure forward, and lost. Read the backtest as a check on a rule you were already considering.

Against the world, and against what a farmer earns

2 calls step outside the local record. The first compares the Kenyan price with the world benchmark for the same product; that is how a trader sees whether a local move is local. The second divides the cost of fertilizer by what the crop in that county is currently worth. It answers the question a subsidy programme or a lender asks first: can farmers here afford to buy it this season.

Another call puts the official market table beside the online asking prices and reports whether the 2 agree. They often do not, and the size of the disagreement is itself the answer.

Thin coverage

Nothing here is modelled, and no figure is carried forward to fill a gap. A window with thin coverage is flagged as thin in the trust block. No confident number is invented to cover it. For some counties and some varieties that happens often, and it is the correct answer when it does.

The data underneath

Every answer on this page is computed on the datasets below, and each of them can also be pulled row by row with the same key if you would rather do the arithmetic yourself.

Questions not on this list

A variety outside the 8, a market the record does not yet split out, or today's prices set against your own purchase invoices. Tell us the decision the figure is meant to support. We will say whether the record can carry it, and what it would cost. Work like that is scoped in a conversation and quoted; the per-answer rate does not apply to it.

Ask on request Create a free account