Mandi API Logo
MandiAPIv1 / Open Ag-Data
OverviewPlaygroundDocsStatusBlog
API Live (66ms)

Documentation Nav

API Documentation (v1)

Complete reference for endpoints, query parameters, response envelopes, and rate limits.

Base URL & Authentication

All requests are keyless and free to use. Prefix all routes with /v1. Rate limited to 100 requests per 15 minutes per IP address.

Base URL: https://mandi-api.onrender.com/v1

Build With AI (ChatGPT, Claude, Gemini)

Feed this complete API Markdown Spec to any AI coding assistant to generate integration code instantly.

GET/v1/states

Returns a list of the 5 supported Indian states for Mandi prices.

curl -X GET "https://mandi-api.onrender.com/v1/states" \ -H "Accept: application/json"
GET/v1/commodities

Returns a list of distinct commodities/crops. Optionally scoped to a specific state or market.

ParameterTypeRequiredDescription
stateStringOptionalFilter commodities by state name (e.g. Maharashtra)
marketStringOptionalFilter commodities by specific APMC market (e.g. Katol APMC)
curl -X GET "https://mandi-api.onrender.com/v1/commodities?state=Maharashtra" \ -H "Accept: application/json"
GET/v1/markets

Returns list of all active mandis/markets in a state.

ParameterTypeRequiredDescription
stateStringYesRequired state name (e.g. Uttar Pradesh)
curl -X GET "https://mandi-api.onrender.com/v1/markets?state=Uttar Pradesh" \ -H "Accept: application/json"
GET/v1/prices

Query daily mandi prices. Requires either state OR commodity.

curl -X GET "https://mandi-api.onrender.com/v1/prices?state=Maharashtra&commodity=Onion" \ -H "Accept: application/json"
GET/v1/prices/history

Retrieve price history trends over date ranges. If market is omitted, returns average state-wide modal prices per date.

curl -X GET "https://mandi-api.onrender.com/v1/prices/history?state=Maharashtra&commodity=Onion" \ -H "Accept: application/json"

Errors & Rate Limits

The API uses standard HTTP response codes and a uniform error envelope format.

Response Body (JSON)
{
  "success": false,
  "error": {
    "code": "MISSING_PARAM",
    "message": "At least one of query parameters 'state' or 'commodity' is required."
  }
}

© 2026 Mandi Price API — Open Agricultural Data Infrastructure for Developers.

Data sourced directly from Ministry of Agriculture and Farmers Welfare (data.gov.in)