---
title: "Api Sector Benchmarks"
method: GET
path: "/api/sector-benchmarks"
---

# Api Sector Benchmarks

`GET /api/sector-benchmarks`

## Request

- Base URL: `https://www.oxfordledge.com` (the document declares no server; this is the origin it was published from)
- URL: `https://www.oxfordledge.com/api/sector-benchmarks`
- Auth: none declared

Return sector-level KPI benchmarks from sector_kpis.db.

Queries the sector_kpis table (EAV schema) and pivots the metric_key /
value rows into a per-sector dict.  If no data exists yet (the KPI loader
has not been run), returns an empty benchmarks object with the sector
metadata so callers can still render labels.

The SECTOR_METRICS catalogue in tools/sector_kpi_db.py defines every
recognised sector key and the human-readable labels for each metric.

## Query parameters

- `sector` string, nullable: Sector name (e.g. Technology). Omit to return all sectors.

## Response `200`

Successful Response

- StockAnalysisResponse: Loose response_model for /api/fundamentals, /api/segments, /api/exec-comp, /api/sensitivity, /api/proxy, /api/chart-data, and similar analysis routes in routes_analysis_fastapi/stock.py. Multi-shape responses with deeply nested company/financial/chart data; loose contract since the FE consumers are typed via the typed-client wrappers, not directly off these schemas.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/oxfordledge/apis/oxford-ledge-api.md) · [All operations](https://skmtc.dev/oxfordledge/apis/oxford-ledge-api/llms.txt) · [OpenAPI document](https://skmtc.dev/oxfordledge/apis/oxford-ledge-api/revisions/e832a1260f0b?raw)
