curl --request GET \
--url https://api.aisa.one/apis/v1/openmeteo/forecast \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/openmeteo/forecast"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/openmeteo/forecast', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/openmeteo/forecast",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/openmeteo/forecast"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aisa.one/apis/v1/openmeteo/forecast")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/openmeteo/forecast")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"latitude": 52.52,
"longitude": 13.419998,
"generationtime_ms": 0.19,
"utc_offset_seconds": 7200,
"timezone": "Europe/Berlin",
"timezone_abbreviation": "CEST",
"elevation": 38,
"current_units": {
"time": "iso8601",
"interval": "seconds",
"temperature_2m": "°C",
"weather_code": "wmo code"
},
"current": {
"time": "2024-01-01T12:00",
"interval": 900,
"temperature_2m": 4.5,
"weather_code": 3
},
"hourly_units": {
"time": "iso8601",
"temperature_2m": "°C",
"precipitation": "mm",
"wind_speed_10m": "km/h"
},
"hourly": {
"time": [
"2024-01-01T00:00",
"2024-01-01T01:00"
],
"temperature_2m": [
2.1,
1.9
],
"precipitation": [
0,
0.1
],
"wind_speed_10m": [
11.2,
10.4
]
},
"daily_units": {
"time": "iso8601",
"temperature_2m_max": "°C",
"temperature_2m_min": "°C",
"precipitation_sum": "mm"
},
"daily": {
"time": [
"2024-01-01"
],
"temperature_2m_max": [
5.2
],
"temperature_2m_min": [
1.1
],
"precipitation_sum": [
0.4
]
}
}Open-Meteo Forecast
16-day hourly/daily/current weather forecast by coordinates.
curl --request GET \
--url https://api.aisa.one/apis/v1/openmeteo/forecast \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/openmeteo/forecast"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/openmeteo/forecast', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/openmeteo/forecast",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/openmeteo/forecast"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aisa.one/apis/v1/openmeteo/forecast")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/openmeteo/forecast")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"latitude": 52.52,
"longitude": 13.419998,
"generationtime_ms": 0.19,
"utc_offset_seconds": 7200,
"timezone": "Europe/Berlin",
"timezone_abbreviation": "CEST",
"elevation": 38,
"current_units": {
"time": "iso8601",
"interval": "seconds",
"temperature_2m": "°C",
"weather_code": "wmo code"
},
"current": {
"time": "2024-01-01T12:00",
"interval": 900,
"temperature_2m": 4.5,
"weather_code": 3
},
"hourly_units": {
"time": "iso8601",
"temperature_2m": "°C",
"precipitation": "mm",
"wind_speed_10m": "km/h"
},
"hourly": {
"time": [
"2024-01-01T00:00",
"2024-01-01T01:00"
],
"temperature_2m": [
2.1,
1.9
],
"precipitation": [
0,
0.1
],
"wind_speed_10m": [
11.2,
10.4
]
},
"daily_units": {
"time": "iso8601",
"temperature_2m_max": "°C",
"temperature_2m_min": "°C",
"precipitation_sum": "mm"
},
"daily": {
"time": [
"2024-01-01"
],
"temperature_2m_max": [
5.2
],
"temperature_2m_min": [
1.1
],
"precipitation_sum": [
0.4
]
}
}授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
查询参数
Grid-cell preference for the coordinate. Default land.
land, sea, nearest Comma-separated list of current-condition variables to return. Common values: temperature_2m, relative_humidity_2m, apparent_temperature, is_day, precipitation, weather_code, wind_speed_10m, wind_direction_10m.
"temperature_2m,weather_code"
Comma-separated list of daily aggregation variables to return. Requires timezone. Common values: temperature_2m_max, temperature_2m_min, temperature_2m_mean, precipitation_sum, rain_sum, snowfall_sum, weather_code, sunrise, sunset, sunshine_duration, wind_speed_10m_max, uv_index_max.
"temperature_2m_max,temperature_2m_min,precipitation_sum"
Manual elevation (meters) for statistical downscaling. Defaults to a 90m DEM. Use nan to disable downscaling.
"38"
End of the interval, yyyy-mm-dd (ISO 8601).
"2024-01-07"
Number of forecast days to return (0-16). Default 7.
7
Limit the forecast to a given number of hours from now.
Comma-separated list of hourly variables to return. Common values: temperature_2m, relative_humidity_2m, dew_point_2m, apparent_temperature, precipitation, rain, showers, snowfall, weather_code, pressure_msl, cloud_cover, wind_speed_10m, wind_direction_10m, wind_gusts_10m, shortwave_radiation, visibility.
"temperature_2m,precipitation,wind_speed_10m"
WGS84 latitude of the location. Multiple coordinates can be comma-separated.
"52.52"
WGS84 longitude of the location (negative for the Americas). Multiple coordinates can be comma-separated.
"13.41"
Comma-separated 15-minutely variables (Central Europe & North America high-resolution models only).
"temperature_2m,precipitation"
Comma-separated forecast models to use. Default auto selects the best model mix per location.
"auto"
Number of past days to include (0-92). Default 0.
Include a given number of past hours.
Precipitation unit. Default mm.
mm, inch Start of the interval, yyyy-mm-dd (ISO 8601).
"2024-01-01"
Temperature unit. Default celsius.
celsius, fahrenheit Time output format. Default iso8601.
iso8601, unixtime IANA time zone name (e.g. Europe/Berlin) or auto to resolve from coordinates. Defaults to GMT.
"Europe/Berlin"
Wind speed unit. Default kmh.
kmh, ms, mph, kn 响应
Requested weather forecast for the coordinate.
The response is of type object.