There are two practical ways to get Indian mandi wholesale price data into your app right now: the official data.gov.in OGD API, or a keyless wrapper like Mandi Price API. Here's what each actually looks like to integrate.

Option 1: data.gov.in's official API

Steps before your first request:

  • Create a free account at data.gov.in
  • Generate an API key from your account dashboard
  • Find the correct resource ID for the mandi price dataset
  • Pass the key and resource ID as query params, and handle pagination (limit/offset) yourself for anything beyond the default page size

A request typically looks like https://api.data.gov.in/resource/<resource-id>?api-key=<your-key>&format=json&limit=100, and the response field names are the raw government schema (not always intuitive — e.g. commodity is sometimes under a different key than variety).

Option 2: Mandi Price API (keyless)

No account, no key, no resource ID lookup — for the 5 supported states:

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

Side by side

 data.gov.inMandi Price API
AuthAPI key required (free signup)None — fully keyless
State coverageNationwide, 3,000+ marketsMaharashtra, UP, Punjab, MP, Karnataka
Field namingRaw government schemaNormalized JSON envelope
History endpointManual multi-request stitchingBuilt-in /v1/prices/history
Rate limitVaries by key tier100 req / 15 min per IP

Which one should you use?

Building something nationwide, or need a commodity/state outside the five listed above? Go straight to data.gov.in/Agmarknet — it's the authoritative source and nothing beats its coverage. Prototyping, building a demo, or your use case is scoped to those five states? Mandi Price API gets you a working integration without the signup step.

See the full breakdown of what mandi/APMC data actually contains in APMC Mandi Price Data: A Developer's Guide, or jump straight to the docs and playground.