# GDP by Sector API
> Which parts of each economy are actually driving growth — real GDP growth broken down by economic sector, from the OECD's official Quarterly National Accounts as an API, live, no key. Headline GDP growth is one number, but it hides the story: whether the expansion is being carried by services, by industry, by construction or by agriculture, and which sector is dragging. Gross value added by economic activity decomposes real GDP into those sectors, so you can see, for any economy, that (say) services are growing while industry is in recession. It is the read economists and equity-sector investors use to understand the shape of the cycle, not just its size. The OECD harmonises and seasonally adjusts the real, chain-linked-volume figures so they are comparable across countries. This API computes the quarter-on-quarter and year-on-year growth of real gross value added in four sectors — services, industry (excluding construction), construction and agriculture. The country endpoint gives one economy's sector breakdown side by side and flags the leading and lagging sector. The services endpoint ranks every economy by services value-added growth (the largest sector in advanced economies); the industry endpoint ranks by industry value-added growth (the most cyclical). Each reading carries its own quarter and discontinued series are excluded, so the board is genuinely current. The sectoral-GDP / value-added cut — distinct from the headline GDP-growth board (the total), the monthly industrial-production index (a different measure, industry only), the annual IMF World Economic Outlook database, and the generic multi-provider data aggregator. Figures are quarterly, in percent.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/gdpsector-api/..."
```

## Pricing
- **Free** (Free) — 785 calls/Mo, 2 req/s
- **Starter** ($12/Mo) — 17,200 calls/Mo, 6 req/s
- **Pro** ($36/Mo) — 87,500 calls/Mo, 16 req/s
- **Business** ($80/Mo) — 492,000 calls/Mo, 40 req/s

## Endpoints

### Country

#### `GET /v1/country` — One economy's GDP growth by sector with leading/lagging sector

**Parameters:**
- `country` (query, required, string) — ISO-3 code or name Example: `DEU`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/gdpsector-api/v1/country?country=DEU"
```

**Response:**
```json
{
    "data": {
        "code": "DEU",
        "name": "Germany",
        "note": "One economy's real gross-value-added growth by sector (services, industry excluding construction, construction, agriculture), year-on-year and quarter-on-quarter, chain-linked volume, seasonally adjusted. leading_sector and lagging_sector flag which part of the economy is driving and dragging growth. Quarterly, cached a few hours.",
        "source": "OECD Quarterly National Accounts (SDMX), gross value added by activity",
        "quarter": "2026-Q1",
        "sectors": {
            "industry": {
                "qoq": 0.7,
                "yoy": 0.34
            },
            "services": {
                "qoq": 0.04,
                "yoy": 0.71
            },
            "agriculture": {
                "qoq": -1.02,
                "yoy": 0.37
            },
            "construction": {
                "qoq": -0.6,
                "yoy": -4.07
            }
        },
        "is_aggregate": false,
        "lagging_sector": {
            "yoy": -4.07,
            "sector": "Construction"
        },
        "leading_sector": {
            "yoy": 0.71,
            "sector": "Services"
        }
    },
    "meta": {
        "timestamp": "2026-06-16T07:43:01.069Z",
        "request_id": "16885d75-2306-4c57-85ef-183e2859b7d8"
    },
    "status": "ok",
    "message": "Country GDP by sector retrieved successfully",
    "success": true
}
```

### Services

#### `GET /v1/services` — Economies ranked by services value-added growth

**Parameters:**
- `countries_only` (query, optional, string) — Drop aggregate groups (true) Example: `true`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/gdpsector-api/v1/services?countries_only=true"
```

**Response:**
```json
{
    "data": {
        "note": "Economies ranked by year-on-year real growth in services gross value added (chain-linked volume, seasonally adjusted). Value added by sector decomposes GDP — it shows which part of the economy is carrying the expansion. Each row carries its own quarter; discontinued series are excluded. Quarterly, cached a few hours.",
        "board": [
            {
                "qoq": 1.07,
                "yoy": 4.25,
                "code": "CRI",
                "name": "Costa Rica",
                "quarter": "2026-Q1",
                "is_aggregate": false
            },
            {
                "qoq": 0.84,
                "yoy": 3.75,
                "code": "TUR",
                "name": "Türkiye",
                "quarter": "2026-Q1",
                "is_aggregate": false
            },
            {
                "qoq": 0.29,
                "yoy": 3.56,
                "code": "BGR",
                "name": "Bulgaria",
                "quarter": "2026-Q1",
                "is_aggregate": false
            },
            {
                "qoq": 1.27,
                "yoy": 3.55,
                "code": "DNK",
                "name": "Denmark",
                "quarter": "2026-Q1",
                "is_aggregate": false
            },
            {
                "qoq": 0.51,
                "yoy": 3.49,
                "code": "POL",
                "name": "Poland",
                "quarter": "2026-Q1",
                "is_aggregate
…(truncated, see openapi.json for full schema)
```

### Industry

#### `GET /v1/industry` — Economies ranked by industry value-added growth

**Parameters:**
- `countries_only` (query, optional, string) — Drop aggregate groups (true) Example: `true`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/gdpsector-api/v1/industry?countries_only=true"
```

**Response:**
```json
{
    "data": {
        "note": "Economies ranked by year-on-year real growth in industry gross value added (chain-linked volume, seasonally adjusted). Value added by sector decomposes GDP — it shows which part of the economy is carrying the expansion. Each row carries its own quarter; discontinued series are excluded. Quarterly, cached a few hours.",
        "board": [
            {
                "qoq": 6.72,
                "yoy": 18.2,
                "code": "DNK",
                "name": "Denmark",
                "quarter": "2026-Q1",
                "is_aggregate": false
            },
            {
                "qoq": -5.86,
                "yoy": 6.51,
                "code": "EST",
                "name": "Estonia",
                "quarter": "2026-Q1",
                "is_aggregate": false
            },
            {
                "qoq": 1.39,
                "yoy": 6.34,
                "code": "LVA",
                "name": "Latvia",
                "quarter": "2026-Q1",
                "is_aggregate": false
            },
            {
                "qoq": -0.73,
                "yoy": 4.37,
                "code": "GRC",
                "name": "Greece",
                "quarter": "2026-Q1",
                "is_aggregate": false
            },
            {
                "qoq": -1.14,
                "yoy": 4.29,
                "code": "CRI",
                "name": "Costa Rica",
                "quarter": "2026-Q1",
                "is_aggregate
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Service metadata

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/gdpsector-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "note": "services and industry take countries_only (true to drop aggregates such as OECD, G20, EU). country takes country (ISO-3 code or name, required) and returns all four sectors. meta takes no parameters. Growth figures are in percent; yoy is year-on-year, qoq is quarter-on-quarter. Quarterly data; a multi-hour protective cache fronts the OECD upstream.",
        "source": "OECD Quarterly National Accounts (DF_QNA_BY_ACTIVITY_OUTPUT, gross value added B1G by activity) via OECD SDMX API, real, seasonally adjusted, live, keyless",
        "service": "gdpsector-api",
        "economies": null,
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/country": "One economy's GDP growth by sector with leading/lagging sector (country=USA).",
            "GET /v1/industry": "Economies ranked by industry value-added growth.",
            "GET /v1/services": "Economies ranked by services value-added growth (countries_only optional)."
        },
        "description": "GDP by sector — which parts of each economy are driving growth, live from the OECD's Quarterly National Accounts (no key). It computes the quarter-on-quarter and year-on-year growth of real gross value added in services, industry, construction and agriculture. country gives one economy's sector breakdown with the leading and lagging sector; services ranks economies by services value-added growth; industry ranks by industry value-added growth. The sectoral-GDP
…(truncated, see openapi.json for full schema)
```


---
Marketplace page: https://www.oanor.com/api/gdpsector-api
OpenAPI spec: https://www.oanor.com/api/gdpsector-api/openapi.json
