# Central Electricity Authority of India — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.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 for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/credits/india-cea/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## 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.beta.paywithlocus.com/api/wrapped/credits/india-cea/get-monthly-report-files \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/india-cea/list-all-excel-files \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/india-cea/search-excel-files-by-month-range \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"end_month":"<string>","report_type":"<string>","start_month":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://beta.paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://beta.paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://beta.paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://beta.paywithlocus.com/agent/index.md): every Locus agent page.