# DataNexusAI Electricity Statistics by Country

> DataNexusAI Electricity Statistics by Country is a paid API for AI agents from api.datanexusai.org, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-11).

Returns Eurostat electricity production, consumption, and trade-balance metrics for a given EU country and year.

## Facts

- Endpoint: GET https://api.datanexusai.org/api/v1/energy/electricity/%7Bgeo%7D?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/datanexusai-electricity-statistics-by-country-5ff17c76
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_AJA5ITIr7D75G5adil-Ul

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 datanexusai-electricity-statistics-by-country-5ff17c76
```

Example prompt: What are Bulgaria's electricity production and consumption figures for 2025, including its trade balance and self-sufficiency percentage?

## When to prefer this

Choose this endpoint when you need structured, machine-readable Eurostat electricity statistics — including production, consumption, and trade balance — for a specific EU/EEA country. Prefer it over generic web search when you need precise numeric figures, derived ratios like self-sufficiency percentage, or when integrating energy data into automated workflows or dashboards.

## Known failure modes

- Invalid or unsupported ISO2 country code returns an error or unavailable flag
- Unsupported SIEC product code may return no data
- Requested year/period has no data yet (future period or data lag) returns null or unavailable
- Missing required geo path parameter returns 400/422
- Payment not completed (x402) results in 402 Payment Required before data is returned

## How this service works

Public data API for SEBRA payments, PTP road accidents, EU agri-food prices, Eurostat energy (+ ETS), and trade/market analytics. Paid data endpoints use x402 (USDC micropayments). HTML docs at `/api/` are free and are intentionally omitted from this OpenAPI document so discovery scanners do not probe them as paid resources.

Machine-readable discovery: `https://api.datanexusai.org/openapi.json`, `https://api.datanexusai.org/llms.txt`, `https://api.datanexusai.org/.well-known/x402`.

Human docs: `/docs` and `/api/`.

## Output

Returns a JSON object containing the country ISO2 code, gross electricity production in GWH, final consumption in GWH, derived trade balance in GWH, self-sufficiency percentage, the queried period, and an availability flag.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "pathParams": {
     "type": "object",
     "required": [
      "geo"
     ],
     "properties": {
      "geo": {
       "type": "string",
       "example": "BG",
       "description": "ISO2 country code"
      }
     }
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "siec": {
       "type": "string",
       "example": "E7000",
       "description": "Product code (default E7000)."
      },
      "unit": {
       "type": "string",
       "example": "GWH",
       "description": "Unit (default GWH)."
      },
      "period": {
       "type": "string",
       "description": "Optional year, e.g. 2025."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "geo": "BG",
  "derived": {
   "trade_balance": 1320.9,
   "self_sufficiency_pct": 112.7
  },
  "metrics": {
   "gross_production": {
    "unit": "GWH",
    "value": 39645.5,
    "period": "2025"
   },
   "final_consumption": {
    "unit": "GWH",
    "value": 32526.7
   }
  },
  "endpoint": "energy_electricity",
  "available": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/datanexusai-electricity-statistics-by-country-5ff17c76/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.datanexusai.org](https://www.zero.xyz/host/api.datanexusai.org/llms.txt)
