# Central Electricity Authority of India — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Access comprehensive electricity data from India's Central Electricity Authority, including installed capacity, fuel reports, hydro monitoring, renewable generation, and outstanding dues across all report sections. Search and retrieve monthly Excel files by date range to analyze India's power sector trends and statistics.

**Category:** Government & Public Data | **Website:** [cea.nic.in/](https://cea.nic.in/) | **Docs:** [parse.bot/marketplace/0d422d3e-a16d-44b4-900c-ea74e690ce2e/cea-nic-in-api](https://parse.bot/marketplace/0d422d3e-a16d-44b4-900c-ea74e690ce2e/cea-nic-in-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-cea-nic-in-api-0d422d3e/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_monthly_report_files

Fetches report files for a specific report type and month via the CEA AJAX endpoint. Returns the report title, any PDF files found, Excel files (either directly linked or derived from PDF URLs by replacing the .pdf extension with .xlsx), and raw table row entries from the response HTML. Useful for checking what data CEA published for a given month.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `check_excel` | string | No | Whether to generate Excel URLs from PDF file links when no direct Excel links are found. Accepted values: 'true', 'false'. |
| `month_year` | string | No | Month and year in YYYY-MM format (e.g., '2025-10'). If omitted, defaults to the current month. |
| `report_type` | string | No | Report type identifier. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-cea-nic-in-api-0d422d3e/get_monthly_report_files \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"check_excel":"<string>","month_year":"<string>","report_type":"<string>"}'
```

### list_all_excel_files

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.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `report_page` | string | No | Filter to only scan report pages whose slug contains this keyword (e.g., 'hydro', 'installed', 'fuel'). If omitted or empty, scans all report pages. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-cea-nic-in-api-0d422d3e/list_all_excel_files \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"report_page":"<string>"}'
```

### search_excel_files_by_month_range

Searches for Excel files across a range of months for a given report type. Iterates through each month in the range, queries the CEA AJAX endpoint, and collects all Excel file URLs found or derived from PDF links. Returns aggregate statistics (months checked, months with data, total files) alongside the file list. Useful for bulk discovery of historical data files.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `end_month` | string | No | End month in YYYY-MM format. If omitted, defaults to the current month. |
| `report_type` | string | No | Report type identifier. |
| `start_month` | string | No | Start month in YYYY-MM format. If omitted, defaults to 3 months before the current month. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-cea-nic-in-api-0d422d3e/search_excel_files_by_month_range \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"end_month":"<string>","report_type":"<string>","start_month":"<string>"}'
```
