Gov APItradestat.commerce.gov.in ↗
Access India's Export Import Data Bank via 5 endpoints. Query commodity-wise, country-wise, and monthly trade stats by HS code, year, and currency.
What is the Gov API?
This API provides structured access to India's Export Import Data Bank (EIDB and MEIDB) through 5 endpoints covering commodity-wise reports, country-wise summaries, HS code lookup, and monthly trade statistics. The get_commodity_wise_report endpoint alone returns HS codes at 2-, 4-, 6-, or 8-digit granularity alongside trade values, percentage share, and year-over-year growth for financial years 2018 through 2024.
curl -X GET 'https://api.parse.bot/scraper/6bc89ab4-56b1-4990-a960-086912f43fa2/get_commodity_wise_report?year=2024&values_in=US+%24+Million&trade_type=exports&commodity_level=2' \ -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 tradestat-commerce-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.
from parse_apis.india_trade_statistics_api import IndiaTradeStats, TradeType, ValuesIn, CommodityLevel, YearType
client = IndiaTradeStats()
# List available financial years
for year in client.availableyears.list():
print(year.value, year.text)
# Search HS codes for rice commodities
for hs in client.hscodes.search(description="rice"):
print(hs.code, hs.description, hs.unit)
# Get commodity-wise export report at HS-2 digit level
exports = client.trade(TradeType.EXPORTS)
for commodity in exports.commodity_report(year="2024", values_in=ValuesIn.US_DOLLAR_MILLION, commodity_level=CommodityLevel.DIGIT_2):
print(commodity.hs_code, commodity.commodity, commodity.share_percent, commodity.growth_percent)
# Get country-wise export data
for country in exports.country_report(year="2024", values_in=ValuesIn.US_DOLLAR_MILLION):
print(country.country_region, country.share_percent, country.growth_percent)
# Get monthly import data
imports = client.trade(TradeType.IMPORTS)
for row in imports.monthly_report(year="2024", month="1", values_in=ValuesIn.RUPEE_CRORE, year_type=YearType.FINANCIAL_YEAR, commodity_level=CommodityLevel.DIGIT_4):
print(row.hs_code, row.commodity, row.growth_percent)
Fetch commodity-wise trade data for a given financial year. Returns a table of commodities with HS codes, trade values for two consecutive years, percentage share, and growth rate. Paginates as a single page containing all matching rows at the requested HS-code digit level.
| Param | Type | Description |
|---|---|---|
| year | string | Financial year starting year (e.g., '2024' for 2024-2025). Available values: 2018 through 2025. |
| values_in | string | Currency or unit for values. |
| trade_type | string | Type of trade. |
| commodity_level | string | HS code digit level. |
{
"type": "object",
"fields": {
"data": "array of commodity objects with keys S.No., HSCode, Commodity, prior year value, %Share, current year value, %Growth"
},
"sample": {
"data": {
"data": [
{
"S.No.": "1",
"%Share": "0.0045",
"HSCode": "01",
"%Growth": "59.17",
"Commodity": "LIVE ANIMALS.",
"2023 - 2024": "12.37",
"2024 - 2025": "19.70"
}
]
},
"status": "success"
}
}About the Gov API
Commodity and Country Trade Reports
The get_commodity_wise_report endpoint returns a ranked table of commodities identified by HS code and description, with trade values for two consecutive financial years, percentage share of total trade, and growth rate. You can filter by trade_type (exports or imports), commodity_level (HS digits: 2, 4, 6, or 8), and express values in US dollars (millions), Indian rupees (crore), or raw quantity. The get_country_wise_report endpoint mirrors this structure at the country level, adding a total_trade option for trade_type and returning Country/Region, prior and current year values, %Share, and %Growth per row.
Monthly Data and HS Code Search
The get_meidb_report endpoint targets the Monthly EIDB, letting you pin a specific month (1–12) and year and choose between Financial Year or Calendar Year framing. Response rows carry the same HS code and commodity columns as the annual report, plus monthly values for the prior and current year, a % Growth column, and cumulative-to-date figures. The search_hs_code endpoint accepts a partial numeric code (e.g., 10) or a plain-text keyword (e.g., rice) and returns matching HSCODE, DESCRiption, and UNIT fields — useful for resolving codes before passing them to the report endpoints.
Year Coverage and Metadata
The get_available_years endpoint returns the full list of supported financial years as value (e.g., '2024') and text (e.g., '2024-2025') pairs, so you can programmatically stay in sync with whatever years the EIDB currently publishes rather than hard-coding a range. All report endpoints accept the starting year of the financial year window as their year parameter.
The Gov API is a managed, monitored endpoint for tradestat.commerce.gov.in — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when tradestat.commerce.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 tradestat.commerce.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 export growth for a specific HS-8 commodity between India and all trading partners
- Compare India's import share by country for a given financial year using get_country_wise_report
- Resolve ambiguous commodity descriptions to exact HS codes before querying trade reports via search_hs_code
- Build a monthly trade dashboard showing cumulative export values across financial year months with get_meidb_report
- Identify the top commodities by percentage share of total exports at the HS-2 chapter level
- Convert trade values between USD millions and INR crore for domestic vs. international reporting pipelines
- Enumerate all available reporting years dynamically using get_available_years to keep queries current
| 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.