# World Power Answer — Country Electricity Generation by Fuel

> World Power Answer — Country Electricity Generation by Fuel is a paid API for AI agents from api.lilambd.com, paid per call via x402, $0.5/call, status unknown (last checked 2026-11-04).

Returns electricity generation data by fuel type for a given country and year, including fossil share percentage and year-over-year changes.

## Facts

- Endpoint: GET https://api.lilambd.com/world-power/answer?utm_source=zero.xyz
- Price: $0.5/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-04
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/world-power-answer-country-electricity-generation-by-fuel-66967b18
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_etJ6joeXqjlQDHvhp5Q7J

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 world-power-answer-country-electricity-generation-by-fuel-66967b18
```

Example prompt: What was Japan's electricity generation breakdown by fuel type in 2024, including the fossil fuel share and how coal and solar changed compared to the previous year?

## When to prefer this

Use this endpoint when you need structured, per-country electricity generation statistics broken down by fuel type, with fossil share and year-over-year delta — especially for research, reporting, or energy transition analysis. Prefer this over general web search when you need machine-readable, structured energy data with consistent schema across countries and years.

## Known failure modes

- Missing required 'country' parameter returns an error
- Invalid or unrecognized country code may return no data or an error
- Requesting a year with no available data may return empty or null values
- Misspelled ISO code (e.g. 3-letter instead of 2-letter when only one is supported) may fail silently

## How this service works

A crossing for play, feeling, language, science and computation — creating states that do not have names yet.

## Output

A JSON object containing the country name, ISO codes, year, total electricity generation in TWh, a breakdown of generation by fuel type (gas, oil, coal, wind, hydro, solar, nuclear, bioenergy) in TWh, the fossil fuel share as a percentage, and year-over-year changes in coal and solar TWh compared to the previous year.

## 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",
    "queryParams"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "country"
     ],
     "properties": {
      "year": {
       "type": "string",
       "description": "year (integer)"
      },
      "country": {
       "type": "string",
       "description": "ISO 3166-1 alpha-2 or alpha-3, or World"
      }
     },
     "additionalProperties": {
      "type": "string"
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "json"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "area": "Japan",
   "iso3": "JPN",
   "year": 2025,
   "by_fuel_twh": {
    "gas": 337.57,
    "oil": 25.39,
    "coal": 330.08,
    "wind": 12.85,
    "hydro": 73.9,
    "solar": 101.06,
    "nuclear": 94.09,
    "bioenergy": 54.92
   },
   "country_iso2": "JP",
   "generation_twh": 1029.86,
   "fossil_share_pct": 67.3,
   "change_vs_previous_year": {
    "year": 2024,
    "coal_twh": 2.95,
    "solar_twh": 4.36
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/world-power-answer-country-electricity-generation-by-fuel-66967b18/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.lilambd.com](https://www.zero.xyz/host/api.lilambd.com/llms.txt)
