REST API Reference

API Documentation

All dashboard data is available via a versioned REST API at /api/v1. All endpoints return JSON.

Base URL

url
https://your-domain.com/api/v1

For local development, replace with http://localhost:3000/api/v1

Authentication

No authentication required. All endpoints are public read-only.

Rate limiting may apply to prevent abuse. Responses include cache headers for client-side optimization.

Response Format

Success (2xx)
Returns JSON array or object with data
Bad Request (400)
Missing or invalid query parameters
Server Error (500)
Database or upstream API failure

Endpoints

Supported Parameter Values

country / EIA Code
USAUnited States
CHNChina
INDIndia
RUSRussia
SAUSaudi Arabia
DEUGermany
JPNJapan
CANCanada
AREUAE
AUSAustralia
energyType
crude-oil
natural-gas
lng
coal
electricity
direction
import
export
both
year range
2000 – 2023