Official AGMARKNET / DMI Agricultural Market Intelligence
Base URL: https://mandibhavaajka.com/api/v1

MandiBhavAajKa REST API Reference (v1)

Programmatic access to Indian APMC mandi prices, commodity master taxonomy, arrivals, and historical time-series data. Responses are standard JSON with complete provenance declarations.

Live API Playground

Execute live requests directly against the production API.

Interactive API Playground

Test live endpoints directly in your browser.

Need a key? Generate a free key in 30 seconds.

commodity
state
limit
Response
// Press "Send Request" to test /api/v1/prices/latest
// Example response will appear here formatted with metadata.

Authentication & Keys

All endpoints under /api/v1/* require an active API key.

Pass your key in the standard HTTP Authorization header:

Authorization: Bearer mb_live_3847ab91cf8e420...

Alternatively, you may pass the key via the custom header x-api-key: mb_live_.... Supplying conflicting keys in both headers will result in a 400 AMBIGUOUS_AUTHENTICATION error.

Rate Limits & Quotas

Limits are enforced using distributed Redis token-bucket counters with atomic PostgreSQL sync.

TierBurst Limit (RPS)Monthly QuotaHistorical RangePrice
Free1 req / sec100 req / day (3,000/mo)Up to 30 days₹0
Pro10 req / sec50,000 req / monthUp to 365 days₹999 / mo
Enterprise50 req / sec500,000 req / monthMulti-year archive (1,825 days)₹4,999 / mo

Standard Rate Limit Response Headers

  • X-RateLimit-Limit: Maximum allowed requests for current window
  • X-RateLimit-Remaining: Number of requests remaining in window
  • X-RateLimit-Reset: Epoch timestamp when the current window resets
  • Retry-After: Seconds to wait before retrying (sent on HTTP 429)

Standard Error Envelopes

All errors return consistent JSON envelopes with an institutional requestId.

{ "error": { "code": "RATE_LIMIT_EXCEEDED", "message": "Rate limit exceeded for plan 'FREE'. Maximum allowed is 1 req/sec.", "requestId": "req_839f20ba81b0a9cd", "retryAfter": 1 } }

Endpoints Reference

RESTful resources for prices, historical records, mandis, and commodities.

GET/api/v1/prices/latest

Retrieves the latest available daily price records across APMC mandis.

Query Parameters:

  • state (optional): State slug or name (e.g. punjab, madhya-pradesh)
  • district (optional): District slug or name
  • mandi (optional): Mandi slug or name (e.g. indore, khanna)
  • commodity (optional): Commodity slug or name (e.g. wheat, soyabean)
  • limit (optional): Number of records (default 50, max 100 on Free, 250 on Enterprise)
  • page (optional): Page number (default 1)
GET/api/v1/prices/history

Retrieves chronological historical price series for analysis, charting, and modeling.

Query Parameters:

  • commodity or mandi (at least one required)
  • days: Number of days (Free: max 30, Pro: max 365, Enterprise: max 1,825)
  • from, to: Specific ISO date range (YYYY-MM-DD)
GET/api/v1/mandis

Master catalog of Indian APMC mandis including geo-coordinates, address, and status.

Query Parameters:

  • state (optional): Filter by state
  • district (optional): Filter by district
  • search (optional): Search across English, Hindi, and normalized aliases
GET/api/v1/commodities

Standard agricultural commodity taxonomy categorized into Cereals, Pulses, Oilseeds, Spices, Vegetables, and Fruits.

Query Parameters:

  • category (optional): e.g. cereals, pulses
  • search (optional): Search by English or Hindi name

Data Provenance & Freshness Standard

Honest data lineage and agricultural reporting cycle definitions.

In accordance with our platform transparency policy, MandiBhavAajKa never falsifies provenance claims.

Provider vs Authority

We distinguish between upstream providers (e.g. CEDA Portal at Ashoka University) and statutory reporting bodies (e.g. Agmarknet / Directorate of Marketing & Inspection). Both are recorded in the provenance block.

Market Arrival Cycles

APMC mandis conduct auctions primarily between 06:00 and 14:00 IST. Market reports for day $T$ are typically aggregated between 14:00 and 19:00 IST. The marketDate field represents the date of the auction, distinct from the retrievedAt synchronization timestamp.

© 2026 MandiBhavAajKa.com. Built with Next.js 16, PostgreSQL & Redis.