Skip to content

Agriculture

All endpoints are prefixed with /v1/agriculture/. Pxie analyses a field — at a point or over an arbitrary polygon — and returns soil properties, growing-season climate, ranked crop suitability, soil-health recommendations and a multi-year rotation plan, anywhere on Earth.

Coverage: Global. Soil from ISRIC SoilGrids (1 km point lookups, 250 m field statistics), climate from NASA POWER (~50 km), within-field zones from Sentinel-2 (10–20 m).

Data sources: ISRIC SoilGrids v2.0 (CC-BY 4.0 — attribution required), NASA POWER (public domain), FAO ECOCROP, Copernicus Sentinel-2 (CC-BY). Computed products are sourced as Pxie. Responses carry an X-Pxie-Attribution header.

Five endpoints are live for Builder+ accounts: /soil, /soil/field, /soil/zones, /moisture and /climate. The crop endpoints (/suitability, /recommendations, /rotation, /yield, /economics, /fertilizer) are in preview: they are available on request (hello@pxie.ai), and accounts without preview access get 404.

Every agriculture endpoint except /soil and /moisture has a 120-second gateway timeout, because a cold request may need to fetch soil, ten years of climate data or satellite scenes. Allow at least that long in your client. Later requests reuse cached data and are much faster.

Point endpoints take lat/lon query parameters. Field endpoints take a POST body with either a GeoJSON polygon or a bbox ([lon_min, lat_min, lon_max, lat_max]). /suitability, /recommendations and /rotation accept either a point (lat+lon) or a field. Maximum field area is 2,500 km².

The five live endpoints answer a chain of practical questions about a piece of land. A typical workflow:

  1. What is my soil like? — /soil (a point) or /soil/field (a whole field). pH, organic matter, nitrogen, texture and more.
  2. What’s the growing season here? — /climate for frost dates, season length, heat units and rainfall; /moisture for how wet the ground is right now.
  3. Where does my field vary? — /soil/zones maps the distinct soil patches inside a single field so you can manage them separately.

With preview access, the crop endpoints carry on from there:

  • What can I grow? — /suitability ranks crops from best to worst for this land, and tells you the single factor holding each one back.
  • What should I grow, and how do I improve the soil? — /recommendations turns that ranking into concrete picks plus soil-health actions (lime, cover crops…).
  • What’s my multi-year plan? — /rotation sequences crops across several seasons to break pest cycles and keep the soil fed.
  • What will it yield? — /yield gives the regional yield statistics for each crop that fits, whether it is grown commercially around here, and a dry-year figure for this site.
  • What will it earn? — /economics turns yield, farm-gate price and the provincial crop budget into revenue, return over variable costs and break-evens, with your own prices, costs and yields as overrides.
  • What should I put on? — /fertilizer turns a lab soil test into nitrogen, phosphorus, potassium and sulphur rates for the crop and target yield.

You can call any endpoint on its own — they don’t depend on each other — but together they take a farmer from “I have this field” to “here’s what to plant, where, and in what order.”


Credits: 3 | Tier: Builder+

What it does: a soil “report card” for a single location — the answer to “what is the dirt actually like here?” without anyone digging or sending a sample to a lab.

Returns modeled soil properties at a point: pH, organic carbon, nitrogen, sand/silt/clay (+ USDA texture class), CEC, bulk density and coarse fragments. Add depth=all for layers down to 200 cm, or properties=phh2o,soc to fetch a subset. resolution_m tells you the detail of the answer (normally 1000). The 90% prediction interval fields (q05/q95) are filled only when the answer comes from the 250 m source, and are null otherwise.

Terminal window
curl -H "X-API-Key: YOUR_KEY" \
"https://api.pxie.ai/v1/agriculture/soil?lat=54.05&lon=-112.13"
{
"lat": 54.05, "lon": -112.13, "depth": "topsoil",
"properties": {
"phh2o": { "unit": "pH", "topsoil_mean": 6.22,
"depths": { "0-5cm": { "mean": 6.3, "q05": null, "q95": null } } },
"soc": { "unit": "g/kg", "topsoil_mean": 23.4, "depths": { } }
},
"texture_class": "loam",
"resolution_m": 1000,
"nearest_cell_km": 0.0,
"note": null,
"confidence": "medium",
"caveat": "Soil chemistry here is modeled from the global SoilGrids dataset (250 m to 1 km)…",
"sources": [ { "name": "ISRIC SoilGrids v2.0", "license": "CC-BY-4.0" } ]
}

Source: ISRIC SoilGrids v2.0 (CC-BY 4.0)


Credits: 8 | Tier: Builder+

What it does: the same soil report card, but for a whole field instead of a single point — and it tells you how uniform that field is. Outline the field once and get the average soil plus how much it varies across the field.

Returns zonal statistics — mean / median / min / max / std and a spatial-variability flag for each property — across every 250 m soil cell inside the polygon (1 km cells if the 250 m source is unavailable; check resolution_m). A high spread is itself a useful signal: it means the field isn’t uniform and is worth sampling in more than one place.

Terminal window
curl -X POST -H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" \
-d '{"polygon":{"type":"Polygon","coordinates":[[[-112.135,54.045],[-112.115,54.045],[-112.115,54.055],[-112.135,54.055],[-112.135,54.045]]]}}' \
"https://api.pxie.ai/v1/agriculture/soil/field"
{
"centroid": { "lat": 54.05, "lon": -112.125 },
"area_km2": 1.45, "cells": 36,
"zonal": { "phh2o": { "unit": "pH", "mean": 6.41, "min": 6.15, "max": 6.78, "std": 0.16, "cv": 0.025, "cells": 36 } },
"texture_class": "loam",
"spatial_variability": "low-moderate",
"confidence": "medium"
}

Source: ISRIC SoilGrids v2.0 (CC-BY 4.0)


Credits: 15 | Tier: Builder+

What it does: draws a management-zone map of a single field — splitting it into a few distinct soil patches (“this corner is lighter and sandier, that strip is darker”) so inputs like seed and fertiliser can be varied across the field instead of treating it as one uniform block. This is the precision-agriculture view that the coarser /soil and /soil/field numbers can’t show.

It builds the zones from high-resolution satellite imagery of the bare soil over time, grouping pixels into a few relative zones (lightest → darkest soil) and returning per-zone indices plus a label grid you can render as a map.

These are relative patterns, not measured chemistry — Sentinel-2’s broad bands cannot read absolute pH. Needs cloud-free bare-soil scenes (best in fallow / pre-planting / post-harvest windows); returns 503 if too few bare-soil pixels.

{
"zone_count": 3, "bare_soil_pixels": 1180, "scenes_used": 7,
"zones": [
{ "zone": 1, "pixels": 410, "field_fraction": 0.347,
"relative_indices": { "brightness": 0.21, "soc_proxy": 0.08, "clay_proxy": 1.31, "coloration": 1.18 } }
],
"grid": { "width": 100, "height": 110, "bbox": [ ], "labels": [ ] }
}

Source: Pxie + Copernicus Sentinel-2 (CC-BY) + ISRIC SoilGrids


Credits: 2 | Tier: Builder+

What it does: tells you how wet the ground is right now — useful for deciding whether it’s dry enough to work a field or plant, or whether the root zone has enough moisture for a crop.

Returns current soil wetness at a point as a fraction of saturation (0–1) at three depths — surface, root-zone and profile — plus a 7-day trend showing whether it’s drying out or wetting up.

{
"lat": 54.05, "lon": -112.13,
"surface_wetness": 0.48, "root_zone_wetness": 0.56, "profile_wetness": 0.55,
"surface_trend_7d": -0.03, "fraction_of_saturation": true,
"resolution_km": 50, "sources": [ { "name": "NASA POWER", "license": "public-domain" } ]
}

Source: NASA POWER


Credits: 5 | Tier: Builder+

What it does: describes the growing season at a location — when frosts start and end, how long the frost-free window is, how much heat and rain crops can expect. This is what decides whether a crop has time to mature before the cold returns.

Returns a 10-year climatology built year by year: each year’s own last spring frost and first fall frost (minimum temperature at or below 0 °C), reported as the typical (median) date plus the 1-in-10-year risk dates (_p90 for a late spring frost, _p10 for an early fall one); the typical frost-free season and the safer season between the risk dates; growing-season mean temperature, precipitation and growing-degree-days (capped at 30 °C, the standard method). These are long-run statistics for the area, not a forecast for one season. Sites with no frost in at least 9 years out of 10 are reported as year_round_frost_free.

{
"lat": 42.0, "lon": -93.6,
"last_spring_frost": "04-21", "last_spring_frost_p90": "04-26",
"first_fall_frost": "10-21", "first_fall_frost_p10": "10-13",
"frost_free_days": 184, "frost_free_days_safe": 168,
"year_round_frost_free": false,
"growing_season_mean_temp_c": 19.7, "growing_season_precip_mm": 488,
"gdd_base5_season": 2778, "gdd_base10_season": 1912, "annual_precip_mm": 823,
"climatology_years": 10, "climate_grid_km": 50, "confidence": "medium"
}

Source: NASA POWER


How crops are judged. Each crop’s temperature, rainfall and soil pH limits are FAO ECOCROP’s published ranges (the FAO data-sheet number is kept with each crop). A crop is scored over its own growing cycle at the best planting date for the site, which the response reports as planting_window; in cool climates the cycle lengthens until the crop’s heat requirement is met, as it does in the field. Heat is judged in growing-degree- days (capped method); frost-sensitive crops must fit between the 1-in-10-year frost dates. Water is judged two ways: too wet against the FAO annual range, and too dry with a daily water balance (FAO Irrigation & Drainage Papers 56 and 33): the crop’s water need from temperature and sunlight, met by rain plus moisture stored in the soil before planting, converted to a yield effect. That is why cool dryland regions score as water-limited but suitable rather than unsuitable. Each result carries its water_balance figures and the limiting factor in plain words. Perennial forages (alfalfa, red clover, timothy) are judged at their best establishment window and must also tolerate the hottest 90 days of the year. With "irrigated": true water is not limiting.

The water balance runs on each of the ten real years as well as the average year, so water_balance reports the typical year (et_ratio, the share of the crop’s water need met by rain plus stored soil water) and the 1-in-5 dry year (et_ratio_dry_year, factor_dry_year). Frost-tolerant crops (cereals, canola, peas) may be sown from the growing-season start (five consecutive days at or above 5 °C), weeks before the last frost; frost-sensitive crops wait for the 1-in-10-year frost date. planting_window gives the sowing range (sow_from–sow_until), the maturity date for the best sowing (matures_by) and the cycle length.

Scores. The score is the FAO limiting-factor result (90 %) plus a 10 % term for how centred the site sits inside the crop’s optimum ranges, so crops that all clear their limits no longer tie at 100: a site at the edge of the optimum reads about 90, one in the middle about 100. FAO classes are unchanged (S1 ≥ 85, S2 ≥ 60, S3 ≥ 35, else N). Soil pH and texture. pH can be corrected, so a pH outside a crop’s range lowers its score but does not rule the crop out; the crop then carries an amendment (lime or elemental sulphur, the target pH and the change needed), and /recommendations lists the amendments for the recommended crops. Strongly alkaline soils (above pH 8, usually calcareous) are hard to acidify and count fully against the crop. A texture next to a crop’s preferred range costs a little; the opposite extreme (sand for a clay-loving crop) costs more.

Waterlogging. Wetness is judged on the crop’s own cycle: how much water drains through the root zone in the wettest month while the crop is in the ground, against the crop’s drainage tolerance (water_balance.peak30_drainage_mm, wet_factor). Rain that falls outside the crop’s season no longer counts against it. Sowing dates follow the rains: planting_window.rain_fed_share is the share of the crop’s water need met by rain and stored soil water.

Regional crops. A crop grown as a major crop in the region is never dropped from a top_n list because minor crops score a few points higher: it is added and marked included_as: "regional_major", and within 5 points it is listed first. Its score is not changed.

n_fixation_kg_ha is a legume’s total symbiotic fixation, not a fertilizer credit. When soil confidence is low, confidence_reason says why, and soil-driven scores (pH, texture) inherit that uncertainty.

Regional context. Each ranked crop also carries regional: the statistical region the point falls in, the median yield there and commercial.status — major (5 % or more of the region’s harvested field-crop area), grown (any reported area), not_reported (the regional statistics report other crops but not this one) or null (no statistics for this crop here). A crop can fit the climate and soil well and still be not_reported: that usually means markets, disease pressure or harvest conditions keep farmers away from it locally, which the suitability score cannot see.

Credits: 10 | Preview: available on request (hello@pxie.ai)

What it does: answers “what can I actually grow here?” It scores crops from best to worst for this land and — crucially — names the single factor holding each one back (too cold, too dry, wrong pH…), so a low score is explained rather than just a number.

It matches each crop’s known requirements (temperature, rainfall, pH, soil texture, heat units) against the field’s soil and climate, scores each crop 0–100, and assigns an FAO suitability class (S1 highly suitable → N not suitable). Crop requirements come from the FAO ECOCROP reference. Set irrigated: true to relax the rainfall test, or top_n to limit how many crops are returned.

Terminal window
curl -X POST -H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" \
-d '{"lat":54.05,"lon":-112.13,"top_n":5}' \
"https://api.pxie.ai/v1/agriculture/suitability"
{
"mode": "point", "confidence": "medium",
"method": "FAO ECOCROP envelopes + FAO limiting-factor (law of the minimum)",
"inputs": {
"growing_season_mean_temp_c": 14.1, "growing_season_precip_mm": 338,
"frost_free_days": 118, "soil_ph": 6.22, "texture_class": "loam"
},
"ranked": [
{ "crop": "spring_wheat", "name": "Spring Wheat", "score": 92.9, "fao_class": "S1", "limiting_factor": null,
"fit": 0.29,
"planting_window": { "sow_from": "05-13", "sow_until": "06-12", "matures_by": "08-25", "days": 105, "season_mean_temp_c": 16.1, "rain_mm": 260 },
"water_balance": { "factor": 1.0, "et_ratio": 1.0, "et_ratio_dry_year": 1.0, "factor_dry_year": 1.0, "years_evaluated": 8,
"crop_water_need_mm": 331, "water_used_mm": 331, "stored_at_planting_mm": 194 },
"reason": "all measured factors within optimal range" },
{ "crop": "canola", "name": "Canola", "score": 84.2, "fao_class": "S2p", "limiting_factor": "soil pH",
"planting_window": { "sow_from": "04-28", "sow_until": "06-12", "matures_by": "08-10", "days": 105 },
"reason": "soil pH 6.4 is below this crop's optimum 6.5–7.6" }
]
}

Source: Pxie + ISRIC SoilGrids + NASA POWER + FAO ECOCROP


A cold request may take longer while soil and ten years of NASA POWER climate data are fetched (see Timeouts). Soil/climate retrieval is limited to 110 seconds and returns 503 with a retry message if that budget is exceeded.

Credits: 12 | Preview: available on request (hello@pxie.ai)

What it does: turns the suitability ranking into actionable advice — not just “these crops fit” but “plant these, and here’s how to improve your soil while you’re at it.” It’s the difference between a list and a plan.

It takes the best-fitting crops and layers on soil-health checks — low organic matter, low nitrogen, acidic or alkaline pH, low nutrient-holding capacity, heavy clay/drainage risk — returning recommended crops, indicative amendments (e.g. lime for acidic soil) and practices (cover crops, adding a nitrogen-fixing legume). Amendment rates are indicative; confirm with a lab test before applying.

{
"mode": "point", "confidence": "medium",
"recommended_crops": [ { "crop": "mustard", "name": "Mustard", "score": 88.0, "fao_class": "S1" } ],
"soil_health_flags": [
{ "issue": "low organic matter", "detail": "Soil organic carbon ~9.0 g/kg is low…",
"action": "Build organic matter with cover crops, residue retention and reduced tillage." }
],
"amendments": [ { "type": "lime", "reason": "pH 5.2 acidic", "indicative_rate": "1–2 t/ha, confirm by soil test" } ],
"nitrogen_building_legumes": [ "Field Pea", "Lentil" ]
}

Source: Pxie + ISRIC SoilGrids + NASA POWER + FAO ECOCROP


How a rotation is planned. Each year the planner scores every suitable crop and picks the best, applying: a minimum return interval per botanical family (clubroot, root rots); alternation of grasses and broadleaves (oilseed → cereal → pulse → cereal), with the heavy-feeder penalty only within the same group; a shared-pathogen break for Sclerotinia hosts (canola, mustard, sunflower, dry bean, field pea, lentil, soybean, potato, chickpea, faba bean: penalised back to back and noted when only one non-host year separates them, per the Canola Council’s 2–3 year guidance); a nitrogen-credit preference for a heavy feeder after a legume, reported with n_credit_note (the benefit is modest and not a fertilizer rate); perennial forages only as a soil-building year when nitrogen or organic carbon is low; and, among crops within 5 points, a preference for staple crops over specialty ones. Pass crops (a list of crop ids) to plan only with the crops you actually grow.

Credits: 10 | Preview: available on request (hello@pxie.ai)

What it does: lays out a multi-year planting plan instead of a single season — the order in which to grow crops so you don’t drain the soil or invite pests, the way an experienced farmer rotates fields. Tell it what you grew last and it plans the next few years forward.

Provide current_crop (the crop last grown) and years (2–8). current_crop takes a crop id (spring_wheat) or an everyday name (wheat, corn, soya, groundnut); an unrecognised name returns 422 listing the valid ids. It sequences crops to break pest and disease cycles (it won’t put related crops back-to-back), follows heavy-feeding crops with soil-building legumes, alternates nutrient demand, and slots in cover crops in gap years — only ever scheduling crops that suit the field.

Terminal window
curl -X POST -H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" \
-d '{"lat":54.05,"lon":-112.13,"current_crop":"canola","years":4}' \
"https://api.pxie.ai/v1/agriculture/rotation"
{
"current_crop": "canola", "years": 4,
"rotation": [
{ "year": 1, "crop": "barley", "name": "Barley", "role": "cash crop",
"rationale": "eases nutrient demand after a heavy feeder", "n_credit_applied": false },
{ "year": 2, "crop": "field_pea", "name": "Field Pea", "role": "cash crop",
"rationale": "legume builds soil nitrogen (soil N is low)", "n_credit_applied": false },
{ "year": 3, "crop": "spring_wheat", "name": "Spring Wheat", "role": "cash crop",
"rationale": "uses nitrogen fixed by the preceding Field Pea", "n_credit_applied": true }
],
"basis": "family pest/disease break + legume N credit + feeder sequencing + cover crops (USDA-SARE; FAO CA)"
}

Crop ids include: barley, spring_wheat, canola, oats, field_pea, lentil, soybean, maize, potato, alfalfa, flax, sunflower, sugar_beet, dry_bean, chickpea, faba_bean, rye, triticale, mustard, buckwheat, red_clover, timothy, sorghum, pearl_millet, rice, cotton, peanut, tomato, sweet_potato, cassava, sugarcane.

Source: Pxie + ISRIC SoilGrids + NASA POWER + FAO ECOCROP


Credits: 10 | Preview: available on request (hello@pxie.ai)

What it does: For every crop that fits the location, returns the yield statistics of the most local statistical region available — Statistics Canada small-area regions, then provinces, in Canada; national FAOSTAT figures elsewhere — over the latest ten reported years (mean, 20th/50th/80th percentiles, latest year), whether the crop is grown commercially there (commercial.status, see /suitability), and a site outlook: the regional median, and the same figure scaled by this site’s 1-in-5 dry-year water balance. Metric and the crop’s usual imperial unit (bu/ac, cwt/ac, ton/ac, lb/ac) are both given. The typical figure is never adjusted upward from the regional median.

Takes the same body as /suitability plus optional crops (ids or common names) and include_series (the yearly series behind the statistics). Coverage: Global, with regional detail in Canada (US state statistics follow once the NASS data build is enabled).

Terminal window
curl -X POST -H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" \
-d '{"lat": 53.55, "lon": -113.49, "crops": ["canola", "wheat"]}' \
"https://api.pxie.ai/v1/agriculture/yield"
{
"mode": "point", "lat": 53.55, "lon": -113.49, "confidence": "medium",
"region": { "country": "Canada", "admin1": "Alberta", "region": "Alberta, Census Agricultural Region 5",
"soil_zone": "black", "level_available": "region" },
"crops": [
{ "crop": "canola", "name": "Canola / Rapeseed", "score": 93.8, "fao_class": "S1",
"regional": { "level": "region", "geo_name": "Alberta, Census Agricultural Region 5",
"source": "Statistics Canada, Table 32-10-0002-01", "years": [2016, 2025], "n_years": 10,
"yield_t_ha": { "mean": 2.56, "p20": 2.29, "p50": 2.58, "p80": 2.83, "latest": 2.92, "latest_year": 2025 },
"yield_imperial": { "unit": "bu/ac", "mean": 45.7, "p20": 40.9, "p50": 46.1, "p80": 50.5 },
"stale": false },
"commercial": { "status": "major", "level": "region", "area_share": 0.351, "area_ha_mean": 289981 },
"site_outlook": { "typical_t_ha": 2.58, "dry_year_t_ha": 2.58, "typical_imperial": 46.1, "dry_year_imperial": 46.1,
"unit": "bu/ac", "dry_year_ratio": 1.0,
"basis": "regional median over the latest reported years; the dry year applies this site's 1-in-5 dry-year water-balance factor relative to its median year (never adjusted upward)" } }
],
"data_as_of": { "built_at": "2026-10-15T18:36Z", "sources": ["statcan_32100002", "statcan_32100359", "statcan_32100077", "faostat_qcl", "faostat_pp"] },
"caveat": "Regional statistics describe the average management and soils of the whole region ..."
}

Source: Pxie + Statistics Canada (Tables 32-10-0002-01, 32-10-0359-01) + FAOSTAT + ISRIC SoilGrids + NASA POWER + FAO ECOCROP


Credits: 12 | Preview: available on request (hello@pxie.ai)

What it does: For each suitable crop, combines yield (the regional median at this site), the farm-gate price (the provincial monthly price statistic averaged over the latest twelve months, or the planning guide’s price where no statistic exists) and the provincial crop-planning budget for the soil zone into revenue, return over variable costs, return over total costs (the guide’s other expenses, no labour or management), break-even yield and price, and the 1-in-5 dry-year return, per hectare and per acre. Every money figure carries its currency (CAD in Canada, USD elsewhere) and currencies are never mixed: where only a foreign-currency price exists the crop reports no revenue. Where no budget exists the crop reports revenue only and says so in margin_basis.

Budgets come from the Saskatchewan Crop Planning Guide 2026, transcribed per crop and soil zone with page references; in Alberta and Manitoba the Saskatchewan figures for the same soil zone are used and labelled “nearest published guide” until those provinces’ guides are transcribed. The soil zone comes from the AAFC Prairie Soil Zones layer and can be overridden with soil_zone.

Body: as /yield, plus soil_zone (brown, dark_brown, black, dark_grey, grey), price_overrides (crop → price per tonne), cost_overrides (crop → variable costs per hectare) and yield_overrides (crop → t/ha). Overrides are echoed back with overridden: true. Coverage: Canada (budgets for the prairie provinces); revenue only elsewhere.

Terminal window
curl -X POST -H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" \
-d '{"lat": 53.55, "lon": -113.49, "crops": ["canola", "wheat", "peas"], "price_overrides": {"canola": 700}}' \
"https://api.pxie.ai/v1/agriculture/economics"
{
"currency": "CAD", "soil_zone": "black", "soil_zone_source": "AAFC Prairie Soil Zones layer",
"ranked_by": "return over variable costs",
"crops": [
{ "crop": "canola", "name": "Canola / Rapeseed", "score": 93.8,
"yield": { "t_ha": 2.582, "imperial": 46.1, "unit": "bu/ac", "dry_year_t_ha": 2.582,
"source": "regional median (Alberta, Census Agricultural Region 5, 2016–2025)", "overridden": false },
"price": { "per_tonne": 700.0, "per_bu": 15.88, "currency": "CAD", "source": "user override", "overridden": true },
"cost": { "variable_per_ha": 1058.95, "variable_per_ac": 428.53, "other_expenses_per_ha": 483.06, "currency": "CAD", "year": 2026,
"lines_per_ac": { "seed": 84.35, "fertilizer_n": 76.95, "...": "..." },
"source": "nearest published guide: Saskatchewan Crop Planning Guide 2026, black soil zone, Canola (p. 14)", "overridden": false },
"per_ha": { "revenue": 1807.4, "return_over_variable": 748.45, "return_over_total": 265.39, "dry_year_return_over_variable": 748.45 },
"per_ac": { "revenue": 731.43, "return_over_variable": 302.89, "return_over_total": 107.4 },
"break_even": { "yield_t_ha": 1.513, "yield_imperial": 27.0, "unit": "bu/ac", "price_per_tonne": 410.13, "price_per_bu": 9.3 },
"margin_basis": "return over variable costs", "missing": [] }
],
"caveat": "Prices and costs are regional planning defaults, not quotes ..."
}

Source: Pxie + Statistics Canada (Tables 32-10-0002-01, 32-10-0359-01, 32-10-0077-01) + FAOSTAT + Government of Saskatchewan (Crop Planning Guide 2026) + ISRIC SoilGrids + NASA POWER + FAO ECOCROP


Credits: 10 | Preview: available on request (hello@pxie.ai)

What it does: Nitrogen, phosphorus (as P₂O₅), potassium (as K₂O) and sulphur rates for a crop and target yield from a lab soil test. Two views are computed and both are returned: the crop’s nutrient removal at the target yield (University of Saskatchewan 2023 coefficients from 1,800 prairie fields) minus the measured soil supply and any legume credit — the convention the Saskatchewan planning guide budgets with — and, where one exists, the provincial guideline table (Manitoba Soil Fertility Guide: nitrogen tables for spring wheat, feed barley and canola; phosphorus, potassium and sulphur sufficiency tables by soil-test rating for all prairie crop groups). The headline rate is the guideline table where available, otherwise the removal balance; every step of the arithmetic is listed under steps. Rates are given in kg/ha and lb/ac; elemental P and K are given alongside the oxide figures.

Without a soil test the response is the crop’s removal at the target yield, flagged confidence: low and removal_only: true. With lab values confidence is medium: a guideline table is still not a field-calibrated recommendation, and the response says so. Coverage: Western Canadian calibrations, a proxy elsewhere.

Body: location plus crop (required), target_yield + target_yield_unit (t_ha, kg_ha, bu_ac; default: the region’s 80th-percentile yield), soil_nitrate_n + soil_nitrate_n_unit (lb_ac, kg_ha, ppm) with soil_sample_depth_cm (default 60), soil_p_ppm + soil_p_method (olsen, modified_kelowna), soil_k_ppm, soil_sulfate_s + unit, sampling_season (spring, fall), previous_crop, irrigated, canola_hybrid. Supported crops: barley, spring wheat, oats, corn, canola, flax, mustard, soybean, chickpea, dry bean, faba bean, lentil, field pea.

Terminal window
curl -X POST -H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" \
-d '{"lat": 53.55, "lon": -113.49, "crop": "canola", "target_yield": 50, "target_yield_unit": "bu_ac",
"soil_nitrate_n": 30, "soil_p_ppm": 11, "soil_p_method": "olsen", "soil_k_ppm": 310, "soil_sulfate_s": 12,
"sampling_season": "spring", "previous_crop": "field_pea"}' \
"https://api.pxie.ai/v1/agriculture/fertilizer"
{
"crop": "canola", "target_yield": { "t_ha": 2.802, "imperial": 50.0, "unit": "bu/ac", "source": "user" },
"nutrients": {
"N": { "rate_kg_ha": 157.9, "rate_lb_ac": 140.9, "basis": "elemental", "method": "provincial table (Manitoba Soil Fertility Guide)",
"removal_balance_lb_ac": 38.5,
"steps": [
{ "label": "crop removal at target yield", "value": 93.5, "unit": "lb/ac", "detail": "50.0 bu/ac × 1.87 lb N/bu (U of S 2023, 75th percentile; study mean 1.68)" },
{ "label": "soil nitrate-N (0-60 cm, spring equivalent)", "value": -30.0, "unit": "lb/ac", "detail": "spring sample 30 lb/ac; the Manitoba tables are fall-calibrated, so 22 is used there" },
{ "label": "legume credit (Field Pea)", "value": -25.0, "unit": "lb/ac", "detail": "Manitoba Soil Fertility Guide" },
{ "label": "removal balance", "value": 38.5, "unit": "lb/ac", "detail": "removal − soil supply − credit; keeps soil N, not a yield-response rate" },
{ "label": "provincial table", "value": 140.9, "unit": "lb/ac", "detail": "Manitoba Soil Fertility Guide table at 40.8 bu/ac and 22 lb/ac fall nitrate-N; hybrid canola: ..." } ],
"notes": ["Keep seed-placed nitrogen at or below 10 lb N/ac for Canola / Rapeseed; band the rest away from the seed (Alberta Fertilizer Guide)."] },
"P2O5": { "rate_kg_ha": 33.6, "rate_lb_ac": 30.0, "basis": "oxide", "soil_test_rating": "M", "seed_placed_max_lb_ac": 20.0, "...": "..." },
"K2O": { "rate_kg_ha": 0.0, "rate_lb_ac": 0.0, "basis": "oxide", "soil_test_rating": "VH+", "...": "..." },
"S": { "rate_kg_ha": 22.4, "rate_lb_ac": 20.0, "basis": "elemental", "soil_test_rating": "VL", "...": "..." }
},
"elemental": { "P_lb_ac": 13.1, "K_lb_ac": 0.0, "P_kg_ha": 14.7, "K_kg_ha": 0.0 },
"confidence": "medium", "removal_only": false,
"caveats": ["The removal balance has no term for nitrogen mineralised from organic matter; ...", "..."]
}

Source: Pxie + Walley, Farrell & Issah (2023), University of Saskatchewan + Manitoba Agriculture Soil Fertility Guide + Canola Council of Canada + Alberta Fertilizer Guide + Statistics Canada + ISRIC SoilGrids


Soil (SoilGrids) is a static modeled dataset cached on demand. Climate is a rolling 10-year NASA POWER climatology. Soil moisture refreshes daily. Sentinel-2 zones reflect the trailing ~2 years of bare-soil imagery. Yield and price statistics (Statistics Canada, FAOSTAT) are rebuilt monthly and each /yield and /economics response reports data_as_of; crop-planning budgets and fertility tables are transcribed from the provincial guides once a year.

Figure Source Coverage Refresh
Regional yields and harvested area Statistics Canada, Tables 32-10-0002-01 (small-area regions) and 32-10-0359-01 (provinces) BC, AB, SK, MB, ON, QC regions; all provinces monthly
National yields and producer prices FAO FAOSTAT (CC BY 4.0) every country monthly
Farm-gate prices Statistics Canada, Table 32-10-0077-01 (monthly) provinces monthly
Crop budgets Saskatchewan Crop Planning Guide 2026 (page references in every response) prairie soil zones yearly
Nutrient removal Walley, Farrell & Issah (2023), University of Saskatchewan Western Canada as published
Fertility tables Manitoba Soil Fertility Guide; Canola Council; Alberta Fertilizer Guide prairies as published
Regions and soil zones Statistics Canada SAD regions; AAFC Prairie Soil Zones; Natural Earth — yearly

Statistics Canada data are used under the Statistics Canada Open Licence; FAOSTAT under CC BY 4.0; the regional layers under the Open Government Licence – Canada. Provincial guide figures are cited planning data, not endorsements.