# DataNexusAI Energy Rankings

> DataNexusAI Energy Rankings 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 ranked EU country energy metric scores (e.g. import dependency percentage) with rank, value, and percentile for each country.

## Facts

- Endpoint: GET https://api.datanexusai.org/api/v1/energy/rankings?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-energy-rankings-c0598a78
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_25fEo_4qlx0elrHQcaHVo

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-energy-rankings-c0598a78
```

Example prompt: Show me the EU country rankings for import_dependency_pct — include only Bulgaria, Romania, Greece, and Germany, and limit the results to 4 rows.

## When to prefer this

Use this endpoint when you need cross-country comparative energy rankings from Eurostat data — particularly import dependency or similar EU energy indicators — and want pre-computed rank and percentile values rather than raw time-series figures. It is especially useful when building policy briefings, investment research, or dashboards that require quick country-level comparisons. Prefer this over raw Eurostat APIs when you want ranked, normalized output in a single call with micropayment access rather than navigating complex SDMX queries.

## Known failure modes

- Invalid or unrecognized metric ID returns an error or empty rankings list
- Unrecognized ISO2 country codes in the geos parameter may silently filter those countries out
- Payment failure (x402) if USDC micropayment is not properly authorized returns HTTP 402
- Rate limiting or quota errors if too many calls are made in quick succession
- Network timeout for large result sets if limit is very high

## 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

A JSON object containing the metric name queried, the endpoint label, and a ranked list of country entries each with geo (ISO2 code), rank (integer), value (numeric metric score), and percentile (0–100). Results are sorted by rank ascending.

## 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"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "metric"
     ],
     "properties": {
      "geos": {
       "type": "string",
       "example": "BG,RO,EL,DE",
       "description": "Optional comma-separated ISO2 list (default EU27)."
      },
      "limit": {
       "type": "integer",
       "example": 27,
       "description": "Max rows (default 40)."
      },
      "metric": {
       "type": "string",
       "example": "import_dependency_pct",
       "description": "Ranking metric id"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "metric": "import_dependency_pct",
  "endpoint": "energy_rankings",
  "rankings": [
   {
    "geo": "MT",
    "rank": 1,
    "value": 97.5,
    "percentile": 100
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/datanexusai-energy-rankings-c0598a78/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)
