Agriflux API · v1.0

Agriflux API

Location-specific agricultural intelligence for Nigeria — climate, pest risk, yield forecasts, and produce routing built on Maiaddy Loccodes.

Version

v1.0

Base URL

https://api.maiaddy.com/agriflux

Protocol

REST / JSON

Auth

Bearer token (API key)

Built on

Maiaddy Loccode location intelligence

Overview

The Agriflux API gives developers access to location-specific agricultural intelligence across Nigeria. It is built for farmers, agribusinesses, cooperatives, and government agricultural agencies.

Every request is built around a Loccode — a unique identifier from the Maiaddy platform that pinpoints a specific geographic area at postcode-level precision. Send a loccode, and the API returns data for that exact location: climate conditions, pest risk, yield forecasts, or supply chain routing.

The four endpoints

EndpointMethodPathWhat it returns
Get ClimateGET/data/climate/by-loccode?loccode=...Temperature, humidity, rainfall, and soil data with plain-language farmer interpretations.
Get PestsGET/monitoring/pests/by-loccode?loccode=...&crop=...Pest and disease risk for a crop at a location. It works with or without a crop name.
Get Crop YieldGET/predict/yield/by-loccode?loccode=...&crop=...Yield prediction in bags, kilograms, and tonnes, with growing advice.
Supply Farm ProducePOST/logistics/supplyOptimal transport route between two locations, with a crop survival breakdown.

NOTE

You must include Content-Type: application/json in every request header.

The Loccode

Every request requires at least one loccode. Understanding how to use it correctly will save you from the most common errors.

What is a loccode?

A loccode is a structured alphanumeric code that maps to a specific postcode-level area in Nigeria. It is generated and validated by the Maiaddy location intelligence platform, which links GPS-confirmed coordinates to a unique code for that location.

Think of it like a postcode, except it maps to a real, GPS-confirmed area rather than a general postal district. Each loccode resolves to a specific state, city, and set of coordinates.

Examples of loccodes used in this document:

  • KD10A 4SE
  • OY6A 1EZ
  • LA11A 2TQ
  • LA5A 2YM
  • LG01B 2AA
  • ABJ 900107

The Loccode must be exact

A loccode must be submitted exactly as it was issued, with correct characters and correct spacing. The API does not correct or guess. Any mistake will cause the request to fail.

There are two types of loccode errors, and they return different status codes:

  • 400 Bad Request: The loccode field is missing entirely from the request body.
  • 404 Not Found: A loccode was submitted, but it is either formatted incorrectly or, if correctly formatted, does not exist in the database.

In short: 400 means you forgot to include it. 404 means something about the loccode itself is wrong or unregistered.

IMPORTANT

If you are unsure of the exact format for a Loccode, retrieve it from the Maiaddy app. Do not guess or construct one manually.

The Loccode echoed back in a response may look slightly different from what you sent; for example, KD10A 4SE may return as KD10A-4SE. This is only a display difference in the response output. It does not mean the API accepts both formats as input.

Authentication & Requests

API key

An API key is required for every request. Include it in the authorisation header:

Authorization: Bearer YOUR_API_KEY

Create an API Key here.

WARNING

Never put your API key in the client-side code or any publicly visible location (including GitHub). Always make Agriflux API calls from your server. Store your key in an environment variable; never hardcode it.

Request format

Every request to the Agriflux API must include the following headers.

HeaderRequiredValue
AuthorizationYesBearer YOUR_API_KEY
Content-TypeYesapplication/json

The request body must be valid JSON. Field names and string values are case-sensitive unless otherwise stated.

Response format

A successful request returns HTTP 200 OK with a JSON body. The response always echoes back the Loccode that was sent. If something goes wrong, the API returns a non-200 status code with an error body. See Error reference for cross-endpoint HTTP semantics and the error JSON envelope. For machine-readable codes per route, see Get Climate errors, Get Pests errors, Get Crop Yield errors, and Supply errors.

Endpoint details

Get Climate by Loccode

Returns current climate and soil conditions for a location; temperature, humidity, rainfall, and soil data along with a plain-language interpretation of each reading written for farmers. The interpretation is ready to display directly to end users.

POST
https://api.maiaddy.com/agriflux/api/v1/data/climate/by-loccode?loccode=KD10A 4SE

Headers

HeaderRequiredValue
AuthorizationYesBearer YOUR_API_KEY
Content-TypeYesapplication/json

Body — Request parameters

FieldTypeRequiredDescription
loccodestringYesThe Loccode for the target location. Must be exactly as issued. See The Loccode. Example: KD10A 4SE

Example request body

{"loccode": "KD10A 4SE"}

Full curl command

curl -X POST \
  "https://api.maiaddy.com/agriflux/api/v1/data/climate/by-loccode" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"loccode": "KD10A 4SE"}'

Response — 200 OK

{
  "loccode": "KD10A 4SE",
  "climate_data": [
    {
      "loccode": "KD10A 4SE",
      "state": "Kaduna",
      "city": "Kaduna South",
      "latitude": 10.814,
      "longitude": 7.427,
      "temperature_2m": 29.4,
      "relative_humidity_2m": 40.0,
      "precipitation": 0.0,
      "soil_moisture_0_10cm": 0.031,
      "soil_moisture_10_40cm": 0.115,
      "soil_temperature_0cm": 36.5,
      "soil_temperature_6cm": 29.5,
      "event_timestamp": "2026-04-09T09:15",
      "farmer_interpretation": {
        "temperature": "29.4°C — Favourable for rice, vegetables, and legumes.",
        "humidity": "40.0% — Dry air. Watch for spider mites and thrips.",
        "rainfall": "No rainfall recorded. Irrigation required for any active crop.",
        "soil_moisture": "0.031 m³/m³ — Dry soil. Irrigate immediately.",
        "soil_temperature": "36.5°C — Very hot topsoil. Mulch to retain moisture.",
        "overall_outlook": "Challenging",
        "outlook_summary": "Heat stress or severely dry soil. Prioritise irrigation."
      }
    }
  ]
}

Response fields

FieldTypeDescription
loccodestringThe Loccode echoed on the response root (matches the loccode you sent).
climate_dataarrayArray of climate records for the location. Typically contains one object.
climate_data[].statestringNigerian state for this Loccode.
climate_data[].citystringCity or Local Government Area.
climate_data[].latitudenumberLatitude of the Loccode area.
climate_data[].longitudenumberLongitude of the Loccode area.
climate_data[].temperature_2mnumberAir temperature 2 m above ground, in °C.
climate_data[].relative_humidity_2mnumberRelative humidity 2 m above ground, as a percentage (0–100).
climate_data[].precipitationnumberTotal rainfall in mm: 0.0 means no rainfall recorded.
climate_data[].soil_moisture_0_10cmnumberSoil water content at 0–10 cm depth, in m³/m³.
climate_data[].soil_moisture_10_40cmnumberSoil water content at 10–40 cm depth, in m³/m³.
climate_data[].soil_temperature_0cmnumberSoil surface temperature at 0 cm depth, in °C.
climate_data[].soil_temperature_6cmnumberSoil temperature at 6 cm depth, in °C.
climate_data[].event_timestampstringISO 8601 timestamp of when the data was recorded.
climate_data[].farmer_interpretationobjectPlain-language explanations of each reading, written for farmers. See sub-fields below.
farmer_interpretation.temperaturestringWhat the temperature means for crops.
farmer_interpretation.humiditystringHumidity reading with pest and irrigation implications.
farmer_interpretation.rainfallstringRainfall status and irrigation recommendation.
farmer_interpretation.soil_moisturestringSoil moisture level and what action to take.
farmer_interpretation.soil_temperaturestringSoil surface temperature and management recommendation.
farmer_interpretation.overall_outlookstringOne-word summary: Challenging, Favourable, or Moderate.
farmer_interpretation.outlook_summarystringOne sentence on the most urgent action given current conditions.

Errors

HTTP statusError codeWhat it meansWhat to do
400LOCCODE_REQUIREDThe loccode field is missing from the request body.Add the loccode field. See The Loccode.
401UnauthorizedThe request is not authenticated. The API key is invalid or missing.Check the API key. It should be a valid API key issued by Maiaddy.
404LOCCODE_NOT_FOUNDThe Loccode is formatted incorrectly or does not match any registered location.Check the loccode. Retrieve the exact format from the Maiaddy app.
500INTERNAL_SERVER_ERRORAn unexpected server error occurred.Retry the request. If it continues, contact Agriflux support with the timestamp.
503SERVICE_UNAVAILABLEThe climate data source is temporarily unavailable.Wait and retry. Use exponential backoff if retrying programmatically.

Get Pests for Crop by Loccode

Returns pest and disease risk information for a location. This endpoint works in two modes depending on whether you include a crop name in the query string.

  • With a crop name: Returns a crop-specific pest profile, dominant pests, climate conditions affecting pest activity, and a targeted management recommendation.
  • Without a crop name: Returns a general location-level pest overview, active climate conditions, any active pests at the site, and a prompt to add a crop for deeper analysis.

Both modes use the same URL and return 200 OK on success. The difference is in what you send and what you get back.

GET
https://api.maiaddy.com/agriflux/api/v1/monitoring/pests/by-loccode?loccode=OY6A 1EZ

Headers

HeaderRequiredValue
AuthorizationYesBearer YOUR_API_KEY
Content-TypeYesapplication/json

Query parameters

FieldTypeRequiredDescription
loccodestringYesThe loccode for the target location. Must be exactly as issued. See The Loccode. Example: OY6A 1EZ
cropstringNoThe crop to assess pest risk for. When included, the response is tailored to that crop. When omitted, the API returns a general location overview. Example: millet

Mode A — With a crop name

Example query string

?loccode=OY6A 1EZ&crop=millet

Full curl command

curl -G \
  "https://api.maiaddy.com/agriflux/api/v1/monitoring/pests/by-loccode" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "loccode=OY6A 1EZ" \
  --data-urlencode "crop=millet"

Example response — 200 OK

{
  "loccode": "OY6A 1EZ",
  "crop": "millet",
  "location": "Ibadan North Oyo",
  "risk_level": "medium",
  "dominant_pests": ["Stalk borer", "Aphids", "Millet head miner"],
  "climate_conditions_affecting_pests": ["none currently detected"],
  "recommended_action": "Pearl millet is drought-tolerant. Thin to proper spacing to reduce stalk borer."
}

Response fields

FieldTypeDescription
loccodestringThe Loccode queried.
cropstringThe crop name as submitted.
locationstringHuman-readable location name (e.g. Ibadan North Oyo).
risk_levelstringPest risk level for this crop at this location. Values: low, medium, high.
dominant_pestsarray of stringsMost prevalent pests for this crop and location.
climate_conditions_affecting_pestsarray of stringsClimate factors driving or suppressing pest activity. Returns "none currently detected" when conditions are safe.
recommended_actionstringPractical management recommendation for this crop and pest profile.

Mode B — Without a crop name

Example query string

?loccode=OY6A 1EZ

Full curl command

curl -G \
  "https://api.maiaddy.com/agriflux/api/v1/monitoring/pests/by-loccode" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "loccode=OY6A 1EZ"

Example response — 200 OK

{
  "loccode": "OY6A 1EZ",
  "location": "Ibadan North Oyo",
  "state": "Oyo",
  "zone": "southwest",
  "risk_level": "low",
  "active_climate_conditions": [
    "high_humidity"
  ],
  "climate_risk_notes": [
    "High humidity (>75% RH) favours aphids, whitefly and fungal disease — IITA/NIMET threshold."
  ],
  "dominant_pests_in_location": [
    "Aphids (Aphis gossypii)",
    "Fungal pathogens (black pod, blight)",
    "Whitefly (Bemisia tabaci)",
    "Yam beetle (Heteroligus meles)",
    "Cutworms (Agrotis spp.)",
    "Mango fruit fly (Ceratitis cosyra)",
    "Aphids"
  ],
  "crops_at_risk": [
    "pepper", "tomato", "cocoa", "maize", "rice", "plantain"
  ],
  "seasonal_alert": "Yam beetle peak. Mango ripening — fruit fly critical.",
  "seasonal_key_pests": [
    "Yam beetle (Heteroligus meles)",
    "Cutworms (Agrotis spp.)",
    "Mango fruit fly (Ceratitis cosyra)",
    "Aphids"
  ],
  "data_sources": "IITA Pest Management Guides 2023-2025, NIMET, CRIN, NIHORT, FAO Nigeria, ARCN",
  "tip": "Include 'crop' for crop-specific IPM advice and risk assessment."
}

Response fields (location mode)

FieldTypeDescription
loccodestringThe Loccode queried.
locationstringHuman-readable location name
statestringNigerian state for this loccode
zonestringGeopolitical zone of the location (e.g. southwest, north-central).
risk_levelstringOverall pest risk level at this location, independent of any crop. Values: low, medium, high.
active_climate_conditionsarray of stringsClimate conditions currently active at the site that may drive pest activity. Example: high_humidity.
climate_risk_notesarray of stringsPlain-language explanations of each active climate condition and its pest implications, with the data source threshold cited.
dominant_pests_in_locationarray of stringsPests currently active at this location regardless of crop, with scientific names where available.
crops_at_riskarray of stringsCrops at elevated risk under current conditions and pest pressure.
seasonal_alertstringA short, plain-language summary of the most time-sensitive pest risks for the current season.
seasonal_key_pestsarray of stringsThe pests most critical to monitor right now based on season and location.
data_sourcesstringThe research and data sources used to generate pest information for this location.
tipstringA prompt from the API to include a crop name for crop-specific IPM advice and risk assessment.

NOTE — Two response shapes

The response shape is different between the two modes, for example, dominant_pests (crop mode) versus dominant_pests_in_location (location mode). If your application supports both call types, make sure it handles both response shapes. Include crop when you know what the farmer is growing and want specific pest risks and a recommended action.

Omit crop when checking site conditions in general or building a dashboard that shows location-level pest status.

Errors

HTTP statusError codeWhat it meansWhat to do
400LOCCODE_REQUIREDThe loccode query parameter is missing.Add the loccode field. See The Loccode.
400CROP_REQUIREDThe crop field is incompleteYou added the key "crop:" with no value beside it
400INVALID_CROPA crop value was provided but is not a recognised crop name.Use a supported crop name. Full list in Quick Reference.
401UnauthorizedThe request is not authenticated. The API key is invalid or missing.Check the API key. It should be a valid API key issued by Maiaddy.
404LOCCODE_NOT_FOUNDThe Loccode is formatted incorrectly, or does not match any registered location.Check the Loccode. Retrieve the exact format from the Maiaddy app.
500INTERNAL_SERVER_ERRORAn unexpected server error occurred.Retry. Contact support if it continues.

Get Crop Yield by Loccode

Returns a yield prediction for a specific crop at a given location. The forecast is expressed in multiple units, bags (50 kg), kilograms, and tonnes, and comes with a seasonal suitability note and location-specific growing advice.

GET
https://api.maiaddy.com/agriflux/api/v1/predict/yield/by-loccode?loccode=LA11A 2TQ&crop=RICE

Request

Headers

HeaderRequiredValue
AuthorizationYesBearer YOUR_API_KEY
Content-TypeYesapplication/json

Query parameters

FieldTypeRequiredDescription
loccodestringYesThe Loccode for the target location. Must be exactly as issued. See The Loccode. Example: LA11A 2TQ
cropstringYesThe crop to forecast yield for. Not case-sensitive. Example: RICE or rice

Example query string

?loccode=LA11A 2TQ&crop=RICE

Full curl command

curl -G \
  "https://api.maiaddy.com/agriflux/api/v1/predict/yield/by-loccode" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "loccode=LA11A 2TQ" \
  --data-urlencode "crop=RICE"

Response — 200 OK

{
  "loccode": "LA11A 2TQ",
  "crop": "rice",
  "land_size_ha": 1.0,
  "location": "Ikeja Lagos",
  "yield_prediction": {
    "total_yield": "approximately 28 50kg bags from 1.0 hectare(s)",
    "unit": "50kg bags",
    "total_count": 28.0,
    "total_kg": 1400.0,
    "total_tonnes": 1.4,
    "per_hectare": "approximately 28 50kg bags per hectare",
    "tonnes_per_hectare": 1.4
  },
  "seasonal_note": "Conditions are suitable for the expected growing season.",
  "growing_advice": "Drain fields periodically to reduce planthopper breeding. Use certified seed."
}

Response fields

FieldTypeDescription
loccodestringThe Loccode queried.
cropstringThe crop name, normalised to lowercase by the API regardless of how it was submitted.
land_size_hanumberLand size in hectares used for the calculation. Currently always 1.0. All yield values are per hectare — multiply by your actual land size to calculate total yield for a larger farm.
locationstringHuman-readable location name for the Loccode.
yield_predictionobjectThe yield forecast, broken down across multiple units.
yield_prediction.total_yieldstringHuman-readable summary of total predicted yield.
yield_prediction.unitstringPrimary unit of measurement. Currently: 50kg bags.
yield_prediction.total_countnumberTotal number of 50 kg bags predicted.
yield_prediction.total_kgnumberTotal yield in kilograms.
yield_prediction.total_tonnesnumberTotal yield in metric tonnes.
yield_prediction.per_hectarestringHuman-readable per-hectare yield summary.
yield_prediction.tonnes_per_hectarenumberYield in metric tonnes per hectare.
seasonal_notestringWhether current conditions suit this crop's growing season.
growing_advicestringPractical, location-specific cultivation recommendations.

Errors

HTTP statusError codeWhat it meansWhat to do
400LOCCODE_REQUIREDThe loccode query parameter is missing.Add the loccode query parameter. See The Loccode.
400CROP_REQUIREDThe crop query parameter is missing.Add the crop query parameter with a valid crop name.
400UNSUPPORTED_CROPThe crop value is not a recognised crop name.Use a supported crop name. Full list in Quick Reference.
401UnauthorizedThe request is not authenticated. The API key is invalid or missing.Check the API key. It should be a valid API key issued by Maiaddy.
404LOCCODE_NOT_FOUNDThe Loccode is formatted incorrectly, or does not match any registered location.Check the Loccode. Retrieve the exact format from the Maiaddy app.
500INTERNAL_SERVER_ERRORAn unexpected server error occurred.Retry. Contact support if it continues.

Supply Farm Produce by Loccode

Returns logistics information for moving produce between two locations. Send an origin Loccode and a destination Loccode, and the API returns the optimal transport route, the nearest distribution hub at the destination, estimated distance and travel time, and a breakdown of which crops will survive the journey and which will not.

POST
https://api.maiaddy.com/agriflux/api/v1/logistics/supply

Request

Headers

HeaderRequiredValue
AuthorizationYesBearer YOUR_API_KEY
Content-TypeYesapplication/json

Body — Request parameters

FieldTypeRequiredDescription
origin_loccodestringYesThe Loccode for the starting location (farm, warehouse, or collection point). Must be exactly as issued. Example: KD10A 4SE
destination_loccodestringYesThe Loccode for the destination (market, distribution centre, or port). Must be exactly as issued. Example: LA5A 2YM

Example request body

{"origin_loccode": "KD10A 4SE", "destination_loccode": "LA5A 2YM"}

Full curl command

curl -X POST \
  "https://api.maiaddy.com/agriflux/api/v1/logistics/supply" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"origin_loccode": "KD10A 4SE", "destination_loccode": "LA5A 2YM"}'

Response — 200 OK

{
  "origin_loccode": "KD10A 4SE",
  "destination_loccode": "LA5A 2YM",
  "origin": { "state": "Kaduna", "city": "Kaduna South", "latitude": 10.814, "longitude": 7.427 },
  "destination": { "state": "Lagos", "city": "Apapa", "latitude": 6.449136, "longitude": 3.325697 },
  "route": {
    "distance_km": 748.2,
    "estimated_transit_hours": 6.0,
    "transport_mode": "Warehouse/truck",
    "hub_type": "Port",
    "hub_description": "Apapa Port - largest container port in West Africa",
    "data_source": "OpenStreetMap"
  },
  "crops_that_survive_transit": ["cassava","cocoa_wet","cowpea","groundnut","kola_nut",
    "millet","pepper","plantain","rice","rubber_latex","sorghum","watermelon","yam"],
  "crops_that_will_spoil": ["leafy_veg", "tomato"]
}

Response fields

FieldTypeDescription
origin_loccodestringThe origin Loccode as submitted.
destination_loccodestringThe destination Loccode as submitted.
originobjectResolved location details for the origin.
origin.statestringState name of the origin.
origin.citystringCity or LGA name of the origin.
origin.latitudenumberLatitude of the origin.
origin.longitudenumberLongitude of the origin.
destinationobjectResolved location details for the destination.
destination.statestringState name of the destination.
destination.citystringCity or LGA name of the destination.
destination.latitudenumberLatitude of the destination.
destination.longitudenumberLongitude of the destination.
routeobjectLogistics details for the route.
route.distance_kmnumberEstimated road distance in kilometres.
route.estimated_transit_hoursnumberEstimated travel time in hours.
route.transport_modestringRecommended transport mode. Example: Warehouse/truck.
route.hub_typestringType of distribution hub at the destination. Examples: Port, Market, Warehouse.
route.hub_descriptionstringDescription of the distribution hub.
route.data_sourcestringMapping data source used to calculate the route. Example: OpenStreetMap.
crops_that_survive_transitarray of stringsCrops expected to remain viable for the full journey.
crops_that_will_spoilarray of stringsCrops expected to degrade significantly in transit. Consider special handling, refrigeration, or an alternative route.

Errors

HTTP statusError codeWhat it meansWhat to do
400LOCCODE_REQUIREDOne or both Loccode fields are missing from the request body.Add both origin_loccode and destination_loccode. See The Loccode section.
401UnauthorizedThe request is not authenticated. The API key is invalid or missing.Check the API key. It should be a valid API key issued by Maiaddy.
400SAME_LOCATIONThe origin and destination Loccodes resolve to the same area.Provide two distinct Loccode values.
404ORIGIN_NOT_FOUNDThe origin Loccode is formatted incorrectly, or does not match any registered location.Check the origin Loccode. Retrieve the exact format from the Maiaddy app.
404DESTINATION_NOT_FOUNDThe destination Loccode is formatted incorrectly, or does not match any registered location.Check the destination Loccode. Retrieve the exact format from the Maiaddy app.
500INTERNAL_SERVER_ERRORAn unexpected server error occurred.Retry. Contact support if it continues.
503SERVICE_UNAVAILABLEThe routing data source is temporarily unavailable.Wait and retry.

Error reference

This section lists HTTP error patterns the Agriflux API can return across any endpoint. Each endpoint also documents its own error codes and remediation copy under its Errors subsection. Missing or invalid API keys typically produce 401 Unauthorized with the same JSON error envelope.

HTTP status codes — all endpoints

HTTP statusError codeWhat it meansWhat to do
400Bad RequestThe request is malformed — a required field is missing, a Loccode is incorrectly formatted, or a field value is not recognised.Check the request body. Make sure all required fields are present and the Loccode is exactly as issued (see The Loccode section).
401UnauthorizedThe request is not authenticated. The API key is invalid or missing.Check the API key. It should be a valid API key issued by Maiaddy.
404Not FoundThe endpoint URL is wrong, or a Loccode does not match any registered location in the database.Verify the URL is correct and the Loccode exists in the Maiaddy platform.
429Too Many RequestsThe request rate limit has been exceeded. Default: 60 requests per minute per API key.Reduce request frequency. Use exponential backoff when retrying programmatically.
500Internal Server ErrorAn unexpected error occurred on the server.Retry after a short delay. Contact Agriflux support if it persists — include the request details and timestamp.
503Service UnavailableThe API or a data source it depends on is temporarily offline.Wait and retry. Contact support if the issue continues.

Error response examples

When an error occurs, the API returns a JSON body alongside the error status code:

{
  "error": {
    "code": "ERROR_CODE_STRING",
    "message": "A plain-language description of what went wrong.",
    "details": "Optional: additional context, such as which field failed."
  }
}

Quick reference

Endpoints at a glance

EndpointMethodPathRequired parameters
Get ClimateGET/data/climate/by-loccode?loccode=...loccode
Get PestsGET/monitoring/pests/by-loccode?loccode=...loccode (crop optional)
Get Crop YieldGET/predict/yield/by-loccode?loccode=...&crop=...loccode, crop
Supply Farm ProducePOST/logistics/supplyorigin_loccode, destination_loccode

NOTE

All requests require Content-Type: application/json and Authorization: Bearer YOUR_API_KEY.

Supported crop names

The following crop names are accepted by the pests and yield endpoints. Values are not case-sensitive.

yam          cassava       maize         rice    groundnut    sorghum       cowpea        millet    tomato       pepper        cocoa palm     plantain     cocoyam       kola_nut      mango_green    watermelon   pineapple     onion_dried    bambara_groundnut      rubber_latex

Further Resources

Everything you need to go further with the Agriflux API.

SDK documentation

SDKs for Python and Java are available and cover all four endpoints. The SDK documentation provides installation instructions, authentication setup, and working code examples for every endpoint — as a companion to this API reference.

The Loccode

Loccodes are generated and validated by the Maiaddy location intelligence platform. Retrieve them from the Maiaddy app, do not guess or construct one manually. The API returns 404 for any Loccode that is malformed or unregistered.

Getting help

For bug reports, feature requests, or integration questions, contact the Maiaddy team directly.