# IEA Energy Statistics API via SiteCheck Trade & Energy

> IEA Energy Statistics API via SiteCheck Trade & Energy is a paid API for AI agents from api.tradeenergy-api.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-29).

Fetches IEA energy statistics (e.g. CO2 emissions by fuel) for a specified country and indicator, returning the latest year(s) of data.

## Facts

- Endpoint: GET https://api.tradeenergy-api.workers.dev/api/energy/iea-energy-statistics-api?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/iea-energy-statistics-api-via-sitecheck-trade-energy-f3ee1588
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_EBojvjbZHi_2w79NIWTrx

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability iea-energy-statistics-api-via-sitecheck-trade-energy-f3ee1588
```

Example prompt: Pull the IEA CO2 emissions by source data for Germany for the last 3 years — I need the breakdown by fuel and product in MtCO2.

## When to prefer this

Use this endpoint when you need official IEA energy statistics (especially CO2 emissions by fuel/product) for a specific country, and want the latest available year(s) without building your own IEA API integration. Prefer this over raw IEA API calls when working within a pay-per-call agent framework. Not suitable for bulk multi-country queries or non-IEA data sources.

## Known failure modes

- Country code not recognized by IEA — returns error or empty records
- Indicator ID not available for the requested country — empty records array
- years parameter out of range (outside 1-5) — may return error or default
- IEA upstream API unavailable — proxy returns error
- Invalid or missing required query parameters

## How this service works

IEA (International Energy Agency) energy statistics for one country and one indicator (default CO2BySource: CO2 emissions by fuel and product, MtCO2), from the public IEA stats API. Returns the latest year(s) in the source. Indicator list is the IEA catalogue; not every indicator has data for every country.

## Output

Returns a JSON object containing the queried country code, indicator ID, list of years returned, the source IEA API URL, a checkedAt timestamp, the latest available year, and an array of records each with flow, year, units, value, and product fields.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "years": {
       "type": "string",
       "description": "How many latest years to return, 1 to 5 (default 1)"
      },
      "country": {
       "type": "string",
       "description": "IEA country code (3 letters), e.g. USA"
      },
      "indicator": {
       "type": "string",
       "description": "IEA indicator id, e.g. CO2BySource (default)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "years": [
   2024
  ],
  "source": "https://api.iea.org/stats/indicators/CO2BySource?countries=USA",
  "country": "USA",
  "records": [
   {
    "flow": "Total CO2 emissions - Fuel Combustion",
    "year": 2024,
    "units": "MtCO2",
    "value": 739.925,
    "product": "Coal"
   },
   {
    "flow": "Total CO2 emissions - Fuel Combustion",
    "year": 2024,
    "units": "MtCO2",
    "value": 1867.434,
    "product": "Oil"
   }
  ],
  "checkedAt": "2026-10-23T09:38:24.798Z",
  "indicator": "CO2BySource",
  "latestYear": 2024
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/iea-energy-statistics-api-via-sitecheck-trade-energy-f3ee1588/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.tradeenergy-api.workers.dev](https://www.zero.xyz/host/api.tradeenergy-api.workers.dev/llms.txt)
