Getting Started
From zero to your first electricity price in ~10 minutes. Loxone users: continue to the Loxone overview. Everyone else: same REST API via cURL, Python, or Home Assistant. Community: 120 requests/day, free, no credit card.
This page walks you from zero to your first working API call in about ten minutes. You need a web browser and a terminal with curl (or any tool that can send HTTP requests). No electricity-market knowledge required.
What is this?
SpotpriceAPI is a web service. You ask it βwhat will power cost?β and it answers with a list of hours and prices in cent per kilowatt-hour (ct/kWh). Austriaβs wholesale market (EPEX AT) sets those prices once per day; our forecast fills in the rest of the week.
Everyday example
You run a small script every morning. It reads todayβs cheapest three hours and tells your wallbox to charge only then. That script calls GET /v1/forecast once and picks the lowest prices from the list.
When to use this page
- First time using SpotpriceAPI
- Setting up Loxone, Home Assistant, or a custom script
- Checking whether your free Community account is active
When not: You already have a key and want field-level detail β go straight to Forecast or Decision.
What you need
- Email address for a free account (optional for a 48 h trial without login)
curlor similar HTTP client- About 10 minutes
Step by step
1. Sign up β open Register, enter email and password. Company name is optional. 2. Confirm email β click the link in your inbox. Your account becomes Community tier automatically: 7-day forecast, Decision API, 120 requests/day. No credit card. 3. Copy your API key β dashboard shows sf_live_β¦. Store it in a password manager. It is shown in plain text only once. 4. Send your first request β put the key in the header X-API-Key, never in the URL:
curl https://api.spotpriceapi.com/v1/forecast \
-H "X-API-Key: sf_live_YOUR_KEY"
Python (stdlib, no extra packages):
import urllib.request
req = urllib.request.Request(
"https://api.spotpriceapi.com/v1/forecast",
headers={"X-API-Key": "sf_live_YOUR_KEY"},
)
print(urllib.request.urlopen(req, timeout=30).read().decode())
Loxone: put the key only in the Virtual Output HTTP header β see Loxone overview, never inside PicoC source.
5. Read the JSON β look at access first. It tells you your tier and how many hours you get. 6. Try Hours Demand β with plant profile + telemetry, call POST /v1/decision/hours-demand (see also Hours and [Quick start](/code-samples?scenario=hours)). 7. Try Decision / Forecast β GET /v1/decision for charge/hold/discharge; GET /v1/forecast for the price list.
Try without a key (Basic tier)
No account needed β 48 hours only, no Decision:
curl https://api.spotpriceapi.com/v1/forecast
Example response (short)
{
"api_version": "v1",
"market": "EPEX_AT",
"generated_at": "2026-08-01T06:05:00+02:00",
"timezone": "Europe/Vienna",
"access": {
"tier": "community",
"label": "Community",
"full_version_available": true
},
"horizon_hours": 168,
"forecast_status": "ok",
"forecast": [
{ "start": "2026-08-01T07:00:00+02:00", "price_ct_kwh": 8.42, "price_source": "day_ahead" }
]
}
In plain words: forecast_status: ok means the price list is usable. Each item in forecast[] is one hour. price_ct_kwh: 8.42 means about 8.4 cents per kWh for that hour.
Important fields
| Field | What it means |
|---|---|
access.tier | Your plan: basic, community, full_trial, or full_active |
access.full_version_available | true = full 168 h + Decision features |
horizon_hours | How many hours are actually in this response |
forecast_status | ok = good data; degraded = old cache; missing = no prices |
forecast[].price_ct_kwh | Price for that hour in ct/kWh |
forecast[].start | Start of that hour |
forecast[].price_source | Where the price came from (day_ahead, forecast_d2, etc.) |
forecast[].dump_risk_pct | Always present, 0β¦100 β dump-risk percent; 0 when there is no risk |
forecast[].dump_scenario_ct_kwh | Always usable: dump price when pct > 0, else point price β no null check required |
Common mistakes
- Key in the URL β does not work. Header only:
X-API-Key. - Trusting HTTP status alone β Forecast returns 200 even when access is limited. Read
accessandforecast_status. - Expecting 168 h without a key β anonymous/Basic gets 48 h only.
Next steps
- Authentication β tiers and key safety
- Forecast API β full price endpoint
- Decision API β charge/discharge signals
- Decision Windows β pick N cheapest hours
- Code Samples β snippets with your own key
Register for Community or code samples with your personal key.