Checking Status...
Please wait
99.9%
Uptime
30+
Countries
Quick Start
Get started with the GridLeaf API in seconds
Authentication Tiers
Public Access
Features:
- No authentication required
- Last 72 hours of data only
- Rate limit: 2 requests/hour, 5/day
- Max 100 records per request
- Perfect for testing
Limitations:
- Limited historical data
- No forecast access
- Lower rate limits
JWT Authentication
Features:
- Full historical data (1 year)
- Forecast access (24+ hours)
- Rate limit: 2 requests/hour, 5/day
- Max 1000 records per request
- Token expires in 1 hour
Limitations:
- Short-lived tokens
- Must refresh regularly
API Key (Recommended)
Features:
- Same access as JWT
- Long-lived and revocable
- Better for automation
- Client-side friendly
- Multiple keys per account
Limitations:
- Requires registration
- Same rate limits as JWT
Available Endpoints
Get CountriesGETNone
/countriesReturns list of all supported countries
Rate Limit: Public: No limit
Example:
curl https://api-dev.gridleaf.org/countriesLatest Energy DataGETOptional
/energy-data/{country}/latestGet latest N data points for a country
Rate Limit: Public: 2/hour, 5/day
Example:
curl https://api-dev.gridleaf.org/energy-data/Germany/latest?limit=24Historical/Forecast DataGETRequired
/energy-data/{country}Get data for specific time range
Rate Limit: Authenticated: 2/hour, 5/day
Example:
curl -H "X-API-Key: your-key" "https://api-dev.gridleaf.org/energy-data/Germany?start_time=2025-01-01T00:00:00Z&end_time=2025-01-15T23:59:59Z"User RegistrationPOSTNone
/api/v1/auth/registerRegister a new user account
Rate Limit: No limit
Example:
curl -X POST https://api-dev.gridleaf.org/api/v1/auth/register \
-H "Content-Type: application/json" \
-d '{"email":"user@example.com","password":"SecurePass123!","full_name":"John Doe"}'User LoginPOSTNone
/api/v1/auth/loginAuthenticate and get JWT tokens
Rate Limit: No limit
Example:
curl -X POST https://api-dev.gridleaf.org/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"user@example.com","password":"SecurePass123!"}'Generate API KeyPOSTJWT Required
/api/v1/auth/api-keysGenerate a new API key
Rate Limit: No limit
Example:
curl -X POST https://api-dev.gridleaf.org/api/v1/auth/api-keys \
-H "Authorization: Bearer your-jwt-token" \
-H "Content-Type: application/json" \
-d '{"key_name":"My Application"}'For AI Assistants & Developers
GridLeaf is optimized for AI tool integration
Structured Data
JSON-LD markup helps search engines and AI tools understand our data.
- Schema.org Dataset markup
- WebAPI documentation
- Organization metadata
Use Cases for AI Integration:
For Users:
- • "What's the carbon intensity in Germany?"
- • "When should I charge my EV?"
- • "Which countries have clean grids?"
For Developers:
- • Smart home automation
- • Carbon footprint calculators
- • Energy management systems