Gov APIupag.gov.in ↗
Access India crop production estimates, MSP trends, APY time series, crop calendars, and agricultural reports from upag.gov.in via a structured JSON API.
What is the Gov API?
This API exposes 9 endpoints covering India's Unified Portal for Agricultural Statistics (upag.gov.in), returning structured data on crop production estimates, Minimum Support Price trends, area/production/yield time series, domestic and international crop calendars, and report listings. The get_commodity_msp endpoint, for example, returns per-crop MSP values with season, fiscal year, and unit of measure fields across a configurable year range.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/bae68c4f-d759-4052-a12a-ccaf0d71cbb5/get_homepage_summary' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace upag-gov-in-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""
UPAG India Agricultural Data API - Usage Example
Get your API key from: https://parse.bot/settings
"""
from parse_apis.upag_india_agricultural_data_api import (
UPAG, CropName, CropEstimate, ReportSearchResult, MSPRecord, Release, NotFoundError
)
upag = UPAG()
# Get crop production estimates for Rice across Indian states
for estimate in upag.crop(CropName.RICE).estimates(limit=5):
print(estimate.state_name, estimate.metric_value, estimate.percentage_variation)
# Search reports for wheat-related publications
first_result = upag.reports.search(query="wheat", limit=1).first()
if first_result:
print(first_result.name, first_result.category, first_result.url)
# Get MSP (Minimum Support Price) data for crops
for msp in upag.msprecords.list(from_year="2024-25", to_year="2025-26", limit=5):
print(msp.crop, msp.value, msp.season)
# Get latest releases (CWWG reports, crop situation reports)
for release in upag.releases.list(limit=3):
print(release.title, release.published_date, release.tab_name)
# Demonstrate typed error handling
try:
summary = upag.homepagesummaries.get()
print(summary.estimation_summary[0].crop_category, summary.estimation_summary[0].production)
except NotFoundError as exc:
print(f"Data not available: {exc}")
print("exercised: crop.estimates / reports.search / msprecords.list / releases.list / homepagesummaries.get")
Returns a composite homepage summary combining latest crop production advance estimates by state (map data for a default crop), estimation summaries by crop category (food grains, cereals, pulses, oilseeds, etc.), and the latest release report titles. Each sub-section is fetched from a separate upstream API and merged into one response.
No input parameters required.
{
"type": "object",
"fields": {
"map_summary": "array of state-level crop production records",
"latest_releases": "array of latest release report objects",
"estimation_summary": "array of crop category estimation summaries"
},
"sample": {
"data": {
"map_summary": [
{
"geoID": 3,
"cropName": "Rice",
"stateName": "Punjab",
"metricName": "Production",
"seasonName": "Total",
"metricValue": 125.3278,
"cropYearCode": 2025,
"percentageVariation": -12.73
}
],
"latest_releases": [
{
"id": 129,
"link": "https://storage.googleapis.com/upag-10-128-23-3/MIR-Reports-Crop-Outlook/I_17809167900490682_Crop,_Rainfall,_Reservoir_Situation_as_on_08_June_2026.pdf",
"title": "Crops, Rainfall, Reservoir Situation as on 08 June 2026",
"tab_name": "Crop Weather Watch Group Reports",
"published_date": "2026-06-08"
}
],
"estimation_summary": [
{
"fiscalYear": 2025,
"production": 3765.63,
"cropCategory": "Food Grains",
"productionUom": "Lakh Tonnes",
"agricultureYear": "2025 - 26",
"estimateTypeName": "Third Advance Estimates"
}
]
},
"status": "success"
}
}About the Gov API
Crop Production and APY Data
The get_crop_production_estimates endpoint accepts an optional crop_name parameter (e.g. Rice, Wheat, Sugarcane) and returns state-level production records including cropName, stateName, metricValue, and percentageVariation relative to the prior year, along with the cropYear and estimationTypeName (first or second advance estimate). For all-India aggregate trends, get_all_india_crop_apy_timeseries returns a flat array of records covering multiple crop years, each with Crop, Season, Crop Category, Metric, Value, and Unit Of Measure fields — useful for constructing multi-year yield or area-harvested series across major commodities.
MSP and Price Trends
get_commodity_msp returns Minimum Support Price data filterable by from_year and to_year (format: YYYY-YY, e.g. 2023-24). Each record includes Crop, Crop Category, Season, Year, Value, UOM, and Metric fields. This makes it straightforward to track MSP changes for a specific commodity across consecutive Kharif or Rabi seasons.
Crop Calendars
Two calendar endpoints cover distinct geographies. get_domestic_crop_calendar returns a records object with a primaryCategory array and a records array containing state, crop, and month-wise schedule data with color-coded sowing/harvest indicators for Indian states. get_international_crop_calendar follows the same structure but organizes records by country rather than state, covering sowing and harvest windows for crops in international markets.
Reports and Search
get_latest_releases returns report metadata including id, title, tab_name, published_date (YYYY-MM-DD), and a direct link to the PDF — covering CWWG weekly reports, crop situation reports, and related publications. get_reports_list returns the full portal report index organized as nested category objects. search_reports accepts a query string and matches against report names, category names, URLs, and nested submenu crop names, returning name, category, url, and reportid for each match.
The Gov API is a managed, monitored endpoint for upag.gov.in — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when upag.gov.in changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official upag.gov.in API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Track year-over-year MSP changes for Kharif and Rabi commodities using
get_commodity_mspwith from_year and to_year filters. - Build state-level crop production dashboards using
get_crop_production_estimateswith percentageVariation fields to highlight underperforming states. - Construct multi-year area, production, and yield trend lines for major Indian crops from the
get_all_india_crop_apy_timeseriesresponse. - Generate automated alerts when new CWWG weekly reports or crop situation reports appear via
get_latest_releasespublished_date tracking. - Map sowing and harvest windows for international commodity sourcing using
get_international_crop_calendarcountry and month data. - Search the full report catalog by crop keyword using
search_reportsto locate specific dashboards and their direct URLs. - Display homepage agricultural summary widgets using
get_homepage_summaryestimation_summary and map_summary fields.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does upag.gov.in have an official developer API?+
What does `get_commodity_msp` return, and how do I scope it to a specific year range?+
Crop, Crop Category, Season, Year, Value, UOM, and Metric. Pass from_year and to_year as strings in YYYY-YY format (e.g. from_year=2020-21, to_year=2024-25) to limit the result set. Omitting both parameters returns the full available range.Can I retrieve district-level or sub-state crop production data?+
get_crop_production_estimates, get_all_india_crop_apy_timeseries, get_homepage_summary) return data at the state level. You can fork this API on Parse and revise it to add a district-level endpoint if the portal exposes that granularity.What report types does `get_latest_releases` cover?+
tab_name indicating the report category, and a published_date in YYYY-MM-DD format. Historical report archives beyond the latest releases are not currently included, but you can fork this API on Parse and revise it to target the full archive listing.Does the API expose import/export trade data or commodity price data beyond MSP?+
get_commodity_msp and production/yield statistics, but does not currently include trade volumes, wholesale market prices (mandi rates), or export figures. You can fork it on Parse and revise to add endpoints for those data categories if the portal surfaces them.