Gov APIesankhyiki.mospi.gov.in ↗
Access India's official macroeconomic data via the MoSPI eSankhyiki API: RBI indicators, NAS national accounts, PLFS labor surveys, infographics, and metadata.
What is the Gov API?
The MoSPI eSankhyiki API provides 11 endpoints covering India's official macroeconomic statistics published by the Ministry of Statistics and Programme Implementation. Using endpoints like get_rbi_records, get_nas_data, and get_plfs_data, developers can retrieve paginated time-series data for RBI trade indicators, National Accounts Statistics broken down by base year and price series, and Periodic Labour Force Survey records segmented by state, gender, sector, and age group.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/fe1984a3-bc72-400c-ac08-cc52def9103a/get_dashboard' \ -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 esankhyiki-mospi-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.
"""
MoSPI India Statistics API - Usage Example
Get your API key from: https://parse.bot/settings
"""
from parse_apis.mospi_india_statistics_api import (
MoSPI, Series, ProductId, NotFoundError
)
mospi = MoSPI()
# Fetch the dashboard overview with themes, products, and trends
dashboard = mospi.dashboards.get()
print(dashboard.infogrphicCount, "infographics published")
for theme in dashboard.themes[:3]:
print(theme.name, theme.description[:60])
# Fetch product metadata for RBI
rbi_product = mospi.products.get(product_id=ProductId.RBI)
print(rbi_product.product, rbi_product.category, rbi_product.time_period)
# List RBI indicators and drill into one indicator's trade records
indicator = mospi.rbiindicators.list(limit=1).first()
if indicator:
print(indicator.indicator_code, indicator.label)
for record in indicator.records.list(limit=3):
print(record.year, record.trade, record.value, record.unit)
# Query NAS data with a specific series
for nas_record in mospi.nasrecords.list(series=Series.CURRENT, indicator_code="1", limit=3):
print(nas_record.industry, nas_record.current_price, nas_record.unit)
# Typed error handling around a product lookup
try:
product = mospi.products.get(product_id="nas")
print(product.product, product.data_source)
except NotFoundError as exc:
print(f"Product not found: {exc}")
print("exercised: dashboards.get / products.get / rbiindicators.list / records.list / nasrecords.list")
Fetches key statistical highlights, themes, visual trends, infographic count, and the product list from the MoSPI dashboard. Returns the current state of the portal's front page data including theme classifications, trend visualizations, and all available statistical products.
No input parameters required.
{
"type": "object",
"fields": {
"themes": "array of theme objects with theme_id, name, description, sub_theme array",
"products": "array of product objects with id, product, title, category, period, url",
"visualTrends": "array of trend objects with trend_id, trend_name, description, visual_link",
"infogrphicCount": "integer total count of published infographics"
},
"sample": {
"data": {
"themes": [
{
"name": "Financial Statistics",
"isActive": 1,
"theme_id": 13,
"sub_theme": [
{
"theme_id": 13,
"product_url": "/macroindicators?product=rbi",
"product_name": "Reserve Bank of India (RBI)",
"sub_theme_id": 24
}
],
"description": "Provides information related to various financial and economic sectors.",
"theme_order": 7
}
],
"products": [
{
"id": "nss75e",
"url": "/macroindicators?product=nss75e",
"type": "Literacy Rate",
"title": "Household Social Consumption on Education in India",
"period": "July 2017 - June 2018",
"product": "NSS75E",
"category": "NSS Surveys",
"product_id": 36
}
],
"visualTrends": [
{
"trend_id": 6,
"trend_name": "Periodic Labor Force Survey",
"description": "PLFS data...",
"trend_order": 6,
"visual_link": "/macroindicators?product=plfs&tab=chart"
}
],
"infogrphicCount": 229
},
"status": "success"
}
}About the Gov API
Dashboard and Infographics
The get_dashboard endpoint returns the top-level structure of the eSankhyiki portal, including theme groupings, visual trend summaries, an infographic count, and the list of available products such as rbi, nas, plfs, and cpi. These product IDs feed directly into get_product_metadata, which returns each product's category, data source, frequency, time period coverage, and a plain-text description. The get_infographics endpoint delivers paginated infographic objects with fields for product_title, about_infographics, key_takeaways, source, and infographics_image. Keep the limit parameter at 10 or below — larger values on later pages can trigger upstream timeouts.
RBI and NAS Indicators
RBI data is accessed in two steps. First, get_rbi_indicators returns the full list of indicator codes and labels (e.g., code 1 for Direction of Foreign Trade). Then get_rbi_records accepts a required sub_indicator_code plus optional page and limit parameters, returning records with indicator, year, trade, value, and unit fields. National Accounts Statistics follow a similar pattern: get_nas_indicators exposes available base years, series types, frequency codes, and indicator codes, while get_nas_filters narrows down valid combinations. get_nas_data then returns paginated records carrying both current_price and constant_price values alongside base_year, series, year, indicator, industry, and unit.
PLFS Labour Force Data
The PLFS endpoints cover India's Periodic Labour Force Survey. get_plfs_frequency lists available frequency codes (Annual, Quarterly, Monthly). get_plfs_indicators accepts a frequency_code and returns the relevant indicator list with codes and visualization hints. get_plfs_data is the most granular endpoint, returning records with year, indicator, state, gender, sector, AgeGroup, value, and unit fields. The year filter expects a four-digit calendar year (e.g., 2023), not a fiscal year range. Pagination is controlled via page and limit parameters, with meta_data in the response providing totalRecords, totalPages, and recordPerPage.
The Gov API is a managed, monitored endpoint for esankhyiki.mospi.gov.in — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when esankhyiki.mospi.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 esankhyiki.mospi.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 India's trade direction trends over time using RBI indicator records filtered by
sub_indicator_code. - Compare GDP components at current and constant prices using
get_nas_datawithseriesset to 'Current' or 'Constant'. - Analyze state-level labor force participation by gender and sector using PLFS records from
get_plfs_data. - Build a statistical dashboard overview by combining
get_dashboardthemes with metadata fromget_product_metadata. - Populate an economics research tool with infographic summaries and key takeaways from
get_infographics. - Filter NAS data by frequency (annual vs. quarterly) using
get_nas_filtersto scope time-series analysis. - Monitor monthly employment indicators by querying
get_plfs_datawith frequency code3and a specificindicator_code.
| 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 MoSPI's eSankhyiki portal have an official developer API?+
What demographic breakdowns does `get_plfs_data` return?+
state, gender, sector (rural/urban), and AgeGroup fields alongside the indicator, year, value, and unit. You can filter results by frequency_code (Annual, Quarterly, Monthly) and indicator_code, and further narrow by a four-digit calendar year.Are there any pagination limitations I should know about?+
get_infographics endpoint is the most sensitive to pagination parameters — setting limit above 10 on later pages can cause upstream timeouts. For all other paginated endpoints (get_rbi_records, get_nas_data, get_plfs_data), the response includes a meta_data object with totalRecords, totalPages, and recordPerPage to help you navigate result sets safely.Does the API cover CPI or other MoSPI products beyond RBI, NAS, and PLFS?+
get_dashboard lists all available products (including cpi), and get_product_metadata returns metadata for any product ID. Dedicated data-record endpoints currently cover RBI, NAS, and PLFS. Endpoints for pulling CPI time-series records directly are not included in the current API. You can fork it on Parse and revise to add the missing endpoint.Can I retrieve NAS data for a specific industry or base year through filtering?+
get_nas_filters accepts series, frequency_code, and indicator_code to scope the valid filter combinations before querying. get_nas_data then returns records with an industry field and a base_year field in each row, but direct filtering by industry or base_year as query parameters is not exposed in the current API. You can fork it on Parse and revise to add those filter parameters.