Nic APIcea.nic.in ↗
Access Central Electricity Authority (CEA) India reports via API. Retrieve installed capacity, fuel, hydro, generation, and outstanding dues Excel files by month.
What is the Nic API?
The CEA India API provides 3 endpoints for cataloging and retrieving Excel and PDF report files published by India's Central Electricity Authority at cea.nic.in. The list_all_excel_files endpoint scans all CEA report sections and returns a catalog with fields including url, filename, category, report_name, and source_page. Monthly and multi-month queries are also supported, covering report types such as installed capacity, fuel, hydro monitoring, renewable generation, and outstanding dues.
curl -X GET 'https://api.parse.bot/scraper/acabdc29-d173-467a-87a1-f0ab5b919b44/list_all_excel_files?report_page=installed' \ -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 cea-nic-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.
"""Walkthrough: CEA India Excel Files API — discover and catalog power sector data files."""
from parse_apis.cea_india_excel_files_api import CEA, ReportType, InvalidDateFormat
client = CEA()
# List all Excel files from the "installed" report pages
for file in client.excelfiles.list(report_page="installed", limit=3):
print(file.filename, file.category, file.month)
# Get a monthly report for a specific type and month
report = client.monthlyreports.get(report_type=ReportType.FUEL, month_year="2025-10")
print(report.report_title, report.month_year, len(report.pdf_files), "PDFs")
# Search for Excel files across a date range
result = client.monthlyexcelfiles.search(
report_type=ReportType.INSTALLED,
start_month="2025-08",
end_month="2025-10",
limit=5,
).first()
if result:
print(result.filename, result.month_year, result.file_type)
# Handle a typed error for invalid date format
try:
client.monthlyexcelfiles.search(
report_type=ReportType.HYDRO,
start_month="2025-01",
end_month="2025-03",
limit=3,
).first()
except InvalidDateFormat as exc:
print(f"Invalid input: {exc}")
print("exercised: excelfiles.list / monthlyreports.get / monthlyexcelfiles.search")
Scans report pages on the CEA website and returns a catalog of all currently available Excel files with metadata. Each file includes its download URL, filename, detected category, report name, month label, and source page slug. When report_page is provided, only pages whose slug contains the keyword are scanned; otherwise all 27+ report pages are checked. Pagination is not applicable — the full catalog is returned in one response.
| Param | Type | Description |
|---|---|---|
| report_page | string | Filter to only scan report pages whose slug contains this keyword (e.g., 'hydro', 'installed', 'fuel'). If omitted or empty, scans all report pages. |
{
"type": "object",
"fields": {
"errors": "array of error strings or null if no errors occurred",
"excel_files": "array of ExcelFile objects with url, filename, file_type, category, report_name, month, source_page",
"total_files": "integer - total number of unique Excel files found",
"pages_scanned": "integer - number of report pages successfully scanned"
},
"sample": {
"data": {
"errors": null,
"excel_files": [
{
"url": "https://cea.nic.in/wp-content/uploads/installed/2026/04/Website.xlsx",
"month": "April 2026",
"category": "installed",
"filename": "Website.xlsx",
"file_type": "xlsx",
"report_name": "Installed Capacity",
"source_page": "installed-capacity-report"
}
],
"total_files": 1,
"pages_scanned": 1
},
"status": "success"
}
}About the Nic API
What the API Returns
The CEA India API surfaces Excel and PDF report files published by the Central Electricity Authority of India across multiple electricity sector domains. Each file record includes url, filename, file_type, category, report_name, month, and source_page. The list_all_excel_files endpoint accepts an optional report_page keyword filter (e.g., 'hydro', 'installed', 'fuel') to narrow which sections are scanned, and returns total_files and pages_scanned alongside the file array.
Monthly and Range Queries
The get_monthly_report_files endpoint accepts a month_year in YYYY-MM format and a report_type identifier (e.g., installed, executive, fuel, hydro, outstanding, resd, generation, transmission). It returns both pdf_files and excel_files arrays, along with report_entries — table row objects containing cells (array of strings) and links (array of URLs) — and report_title describing the queried section. A check_excel parameter controls whether Excel URLs are derived from PDF file links when direct Excel files are not present.
Multi-Month Range Search
The search_excel_files_by_month_range endpoint iterates across a month window defined by start_month and end_month (both in YYYY-MM format, defaulting to a 3-month lookback). It returns per-file records with month_year, report_type, file_size_bytes, and a verified flag, plus aggregate counts: months_checked, months_with_data, months_with_excel, and total_excel_files. This makes it straightforward to build time-series datasets from CEA reports without manually querying each month.
Report Type Coverage
Supported report_type values span the main CEA publication categories: installed capacity, executive summary, fuel reports, hydro monitoring, outstanding dues, RESD (renewable energy), generation statistics, and transmission. The API defaults to the current month when no month_year is supplied, so queries stay current without requiring callers to track the publication calendar.
The Nic API is a managed, monitored endpoint for cea.nic.in — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when cea.nic.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 cea.nic.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?+
- Build a time-series dataset of India's installed generation capacity by querying
search_excel_files_by_month_rangewithreport_type: installedover multi-year ranges. - Monitor monthly hydro reservoir and generation data by polling
get_monthly_report_fileswithreport_type: hydroeach month. - Catalog all available CEA Excel files across every report section using
list_all_excel_filesto audit data completeness before a bulk download. - Track outstanding dues owed to electricity generators by retrieving
outstandingreport files month-over-month. - Analyze fuel consumption trends for thermal power plants by extracting
fuelreport Excel files across a date range. - Aggregate renewable energy (RESD) generation statistics across quarters using the
resdreport type insearch_excel_files_by_month_range. - Automate ingestion of CEA generation and transmission reports into a data warehouse by using
get_monthly_report_fileson a scheduled basis.
| 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 the Central Electricity Authority publish an official developer API?+
What does `get_monthly_report_files` return beyond just file links?+
pdf_files and excel_files arrays, it returns report_entries — the rows of the report table, each with a cells array (text content) and a links array (URLs found in that row). It also returns report_title, report_type, and the queried month_year. This lets you inspect the report table structure, not just download the files.How does the `verified` field work in `search_excel_files_by_month_range` results?+
verified field on each file record indicates whether the Excel file URL was confirmed to exist directly, as opposed to being derived from a corresponding PDF link. When check_excel is enabled and no direct Excel file is found, a URL is generated from the PDF path; those entries will have verified set to false.Does the API expose the actual data inside CEA Excel files, such as numeric capacity figures or generation values?+
url, filename, file_type, category, and month_year — but does not parse or extract the tabular contents of the Excel files themselves. You can fork this API on Parse and revise it to add an endpoint that downloads a specific file and returns its sheet contents as structured data.Are there any gaps in historical coverage for older CEA reports?+
pages_scanned and months_with_data response fields help identify where the source has gaps. For report types with sparse historical archives, months_with_excel may be lower than months_checked.