If you've tried to pull daily mandi (wholesale market) prices programmatically from India's official sources — Agmarknet or the data.gov.in Open Government Data (OGD) platform, you've likely run into the same friction every developer in this space hits.

The friction with the official sources

  • A registration key is required. data.gov.in's OGD API needs a free account and an API key before you can make a single request — an extra step for a quick prototype or hackathon project.
  • Inconsistent field names. Response schemas vary across resources and have changed over time, which is why community wrapper packages exist just to normalize them.
  • Pagination quirks. Large date ranges or state-wide pulls require manually paging through results rather than a single clean response.
  • No built-in trend/history endpoint. Getting a price history for a specific commodity means stitching together multiple daily pulls yourself.

None of this is a knock on Agmarknet — it's the authoritative national source, covering over 3,000 regulated markets across India, and nothing else comes close to that scope. But if you specifically need Maharashtra, Uttar Pradesh, Punjab, Madhya Pradesh, or Karnataka and want something you can hit from a terminal in under a minute, there's a lighter option.

A keyless alternative for 5 states

Mandi Price API wraps the same underlying government data for these five states into a free REST API with no signup, no API key, and normalized JSON — sourced daily from data.gov.in and re-synced every day at 8:30 PM IST.

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

That's the entire integration — one HTTP request, JSON back, no auth header.

What's covered

  • GET /v1/states — list of supported states
  • GET /v1/commodities — list of tracked crops, optionally filtered by state
  • GET /v1/markets — mandi/market list per state
  • GET /v1/prices — current wholesale prices by state, market, and commodity
  • GET /v1/prices/history — historical price trend data for charting

When to use which

If you need nationwide coverage or commodities outside the 5 supported states, Agmarknet/data.gov.in directly is still the right call. If your use case is scoped to Maharashtra, UP, Punjab, MP, or Karnataka and you want to skip the registration step, Mandi Price API is built exactly for that.

Full endpoint reference is in the docs, or try live requests in the interactive playground before writing any code.