Skip to main content

Introduction

The Open Electricity API provides programmatic access to Australian electricity market data, including real-time generation, demand, price information and historical data across the National Electricity Market (NEM) and Western Australian Wholesale Electricity Market (WEM).

Data Licence

Unless stated otherwise, the data provided by the Open Electricity API is licensed under CC BY-NC 4.0 (non-commercial). See the full licence for attribution requirements and commercial licensing options.

Authentication

All API endpoints require authentication using an API key. You’ll need to include your API key in the Authorization header of your requests:
Authorization: Bearer your_api_key_here
To obtain and manage your API key, please register for an account at the Open Electricity Platform.

Base URL

The base URL for all API endpoints is:
https://api.openelectricity.org.au/v4

Response Format

All responses are returned in JSON format. Successful responses will have a 2xx status code and follow this structure:
{
  "version": "4.0",
  "created_at": "2024-03-20T10:00:00Z",
  "success": true,
  "data": [
    // Response data
  ],
  "total_records": 100
}

Error Handling

Errors are returned with appropriate HTTP status codes and include detailed error messages:
{
  "error": {
    "code": "validation_error",
    "message": "Invalid parameters",
    "details": [
      {
        "loc": ["parameter_name"],
        "msg": "Error description",
        "type": "error_type"
      }
    ]
  }
}
Common error status codes:
  • 400 Bad Request - Invalid parameters or request
  • 401 Unauthorized - Missing or invalid API key
  • 403 Forbidden - Insufficient permissions
  • 422 Validation Error - Invalid input parameters
  • 500 Internal Server Error - Server-side error