Electricity price forecasts
Use the price forecast API to get the most recent Tensor AI forecast of JEPX electricity prices in all grid zones of Japan. New day-ahead forecasts are available from 6:00 JST daily.
Base URL: https://api.tensorenergy.jp/v1
Path: /price-forecast
Method: GET
Query parameters
If no query parameters are provided as part of the request, the default interval will be [today, today + 3 days].
Field | Type | Description | Required |
---|---|---|---|
from | string | Starting time for the interval to retrieve forecast from, expressed in the following format: 2006-01-02T15:04:05Z . | false |
to | string | Ending time for the interval to retrieve forecasts to, expressed in the following format: 2006-01-02T15:04:05Z . The interval between from and to cannot exceed 31 days. | false |
Response
The response is a non-nullable JSON object with the following fields:
Field | Type | Description |
---|---|---|
data | [PriceForecastSet] | null | Returned data from the query. If error is non-null, then this value will be null. |
error | Error | null | Any error returned from the query. If data is non-null, then this value will be null. |
PriceForecastSet object
Field | Type | Description |
---|---|---|
datetime | string | Timestamp of the JEPX time slot, expressed as an ISO 8601 compliant UTC timestamp. |
prices | ZonePrices | Object that contains all grid zone prices. All zones are expressed in JPY/kWh. |
ZonePrices object
All fields in this object are nullable.
Field | Type | Description |
---|---|---|
chugoku | float | null | Price for Chugoku Denryoku utility grid zone in JPY/kWh. |
chubu | float | null | Price for Chubu utility grid zone in JPY/kWh. |
kyushu | float | null | Price for Kyushu utility grid zone in JPY/kWh. |
hokkaido | float | null | Price for Hokkaido utility grid zone in JPY/kWh. |
hokuriku | float | null | Price for Hokuriku utility grid zone in JPY/kWh. |
tokyo | float | null | Price for Tokyo utility grid zone in JPY/kWh. |
kansai | float | null | Price for Kansai utility grid zone in JPY/kWh. |
tohoku | float | null | Price for Tohoku utility grid zone in JPY/kWh. |
shikoku | float | null | Price for Shikoku utility grid zone in JPY/kWh. |
okinawa | float | null | Price for Okinawa utility grid zone in JPY/kWh. |
system | float | null | System price in JPY/kWh. |
Error object
Field | Type | Description |
---|---|---|
message | string | Message that explains what went wrong. |
code | internal_server_error | invalid_query_parameter | Error code that occurred. |
Example request
- cURL
- Python
- Typescript
curl --request GET \
--url https://api.tensorenergy.jp/v1/price-forecast \
--header "authorization: Bearer ${API_TOKEN}"
import requests
API_URL = 'https://api.tensorenergy.jp/v1/price-forecast'
API_TOKEN = 'YOUR_API_KEY'
headers = {
'authorization': f'Bearer {API_TOKEN}',
}
response = requests.get(API_URL, headers=headers)
print(response.json())
const API_URL = 'https://api.tensorenergy.jp/v1/price-forecast'
const API_TOKEN = 'YOUR_API_KEY'
const fetchData = async () => {
try {
const response = await fetch(API_URL, {
method: 'GET',
headers: {
'authorization': `Bearer ${API_TOKEN}`
}
})
console.log(response)
} catch (error) {
console.error(error)
}
};
fetchData()
Example responses
No error occurs during operation
{
"data": [
{
"datetime": "2022-01-01T15:00:00Z",
"prices": {
"chugoku": 10.1,
"chubu": 10.1,
"kyushu": 10.1,
"hokkaido": 10.1,
"hokuriku": 10.1,
"tokyo": 10.1,
"kansai": 10.1,
"tohoku": 10.1,
"shikoku": 10.1,
"okinawa": null,
"system": 10.1
}
},
{
"datetime": "2022-01-01T15:30:00Z",
"prices": {
"chugoku": 10.1,
"chubu": 10.1,
"kyushu": 10.1,
"hokkaido": 10.1,
"hokuriku": 10.1,
"tokyo": 10.1,
"kansai": 10.1,
"tohoku": 10.1,
"shikoku": 10.1,
"okinawa": null,
"system": 10.1
}
}
],
"error": null
}
Error occurs during operation
{
"data": null,
"error": {
"message": "something went wrong during the process",
"code": "internal_server_error"
}
}
No forecasts exist within desired interval
{
"data": [],
"error": null
}