The BlueSky API uses the REST
framework and returns
JSON
-encoded response bodies with standard HTTP
response codes.
The following sections give an overview of
authentication methods and endpoints.
The endpoints below are given relative to this URL:
Install the blueskyapi
package:
pip install blueskyapi
You can find detailed documentation for it here.
The BlueSky API uses API keys for authentication. You can manage these in the API keys section of the user menu.
To authenticate an API call set the Authorization
header to Bearer [your-key]
(replace [your-key]
with one of your API keys).
This endpoint gives you access to the latest forecast.
The latitude of the location for which you need forecast data. Values range from -90 (southpole) to 90 (northpole).
The longitude of the location for which you need forecast data. Values range from 0 to 360.
Format: Comma separated list of integers
The forecast distances is the period between the forecast moment to the moment for which the forecast is made.
By default, forecasts for all available distances are returned.
Which variables you need forecasts for. By default, all available variables are returned.
For a list of available variables see the data documentation.
Which dataset to query (only for users on the Professional plan). Defaults to the dataset available on the free plan.
The response is a JSON object that can be directly read by pandas.read_json
. All timestamps are in UTC.
This endpoint gives you access to current and past forecasts.
This endpoint shares all parameters of the Latest Forecast endpoint and adds two more to specify the range of historical data:
Timestamp of the first forecast moment you want to retrieve, in UTC. The forecast moment is the point in time at which the forecast was made. We provide four forecast moments per day, at 0:00, 6:00, 12:00, and 18:00 UTC.
By default, all forecasts from the first available date are returned.
Timestamp of the last forecast moment you want to retrieve, in UTC.
By default, all forecasts up to the latest one are returned.
The response is a JSON object that can be directly read by pandas.read_json
. All timestamps are in UTC.