curl --request POST \
--url https://api.aisa.one/apis/v1/api-weather-gc-ca/weather/climate-stations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "toronto city"
}
'import requests
url = "https://api.aisa.one/apis/v1/api-weather-gc-ca/weather/climate-stations"
payload = { "query": "toronto city" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: 'toronto city'})
};
fetch('https://api.aisa.one/apis/v1/api-weather-gc-ca/weather/climate-stations', 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/api-weather-gc-ca/weather/climate-stations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query' => 'toronto city'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/api-weather-gc-ca/weather/climate-stations"
payload := strings.NewReader("{\n \"query\": \"toronto city\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/api-weather-gc-ca/weather/climate-stations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"toronto city\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/api-weather-gc-ca/weather/climate-stations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"toronto city\"\n}"
response = http.request(request)
puts response.read_body{
"attribution": "Data Source: Environment and Climate Change Canada",
"count": 3,
"lang": "en",
"licence_url": "https://eccc-msc.github.io/open-data/licence/readme_en/",
"next_offset": null,
"observed_at_ms": 1792969237514,
"offset": 0,
"source_url": "https://api.weather.gc.ca/collections/climate-stations/items?f=json&STATION_NAME=TORONTO+CITY&sortby=STATION_NAME&limit=25&offset=0",
"stations": [
{
"climate_id": "6158355",
"daily_first_date": "2002-06-04",
"daily_last_date": "2026-10-23",
"distance_km": null,
"elevation_m": 112.5,
"first_date": "2002-06-04",
"has_hourly": true,
"has_monthly_summary": true,
"has_normals": false,
"hourly_first_date": "2002-06-04",
"hourly_last_date": "2026-10-23",
"last_date": "2026-10-23",
"latitude": 43.666666666666664,
"longitude": -79.4,
"monthly_first_date": "2003-07-01",
"monthly_last_date": "2006-12-01",
"name": "TORONTO CITY",
"operator": "Environment and Climate Change Canada - Meteorological Service of Canada",
"province": "ON",
"province_name": "ONTARIO",
"station_id": 31688,
"tc_id": "XTO",
"timezone": "EST",
"wmo_id": "71508"
},
{
"climate_id": "6158667",
"daily_first_date": "2006-01-01",
"daily_last_date": "2014-07-22",
"distance_km": null,
"elevation_m": 76.8,
"first_date": "2006-01-01",
"has_hourly": true,
"has_monthly_summary": true,
"has_normals": false,
"hourly_first_date": "2006-01-01",
"hourly_last_date": "2010-03-02",
"last_date": "2014-07-22",
"latitude": 43.62861111111111,
"longitude": -79.395,
"monthly_first_date": "2006-04-01",
"monthly_last_date": "2006-12-01",
"name": "TORONTO CITY CENTRE",
"operator": null,
"province": "ON",
"province_name": "ONTARIO",
"station_id": 30247,
"tc_id": "YTZ",
"timezone": "EST",
"wmo_id": "71265"
},
{
"climate_id": "6158359",
"daily_first_date": "2010-02-02",
"daily_last_date": "2026-10-23",
"distance_km": null,
"elevation_m": 76.8,
"first_date": "2009-12-10",
"has_hourly": true,
"has_monthly_summary": true,
"has_normals": false,
"hourly_first_date": "2009-12-10",
"hourly_last_date": "2026-10-23",
"last_date": "2026-10-23",
"latitude": 43.6275,
"longitude": -79.39611111111111,
"monthly_first_date": null,
"monthly_last_date": null,
"name": "TORONTO CITY CENTRE",
"operator": "NAV Canada",
"province": "ON",
"province_name": "ONTARIO",
"station_id": 48549,
"tc_id": "YTZ",
"timezone": "EST",
"wmo_id": "71265"
}
],
"total": 3
}Climate stations
Find the Climate ID for climate_daily, climate_monthly or climate_normals, or see which stations have data for a period.
curl --request POST \
--url https://api.aisa.one/apis/v1/api-weather-gc-ca/weather/climate-stations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "toronto city"
}
'import requests
url = "https://api.aisa.one/apis/v1/api-weather-gc-ca/weather/climate-stations"
payload = { "query": "toronto city" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: 'toronto city'})
};
fetch('https://api.aisa.one/apis/v1/api-weather-gc-ca/weather/climate-stations', 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/api-weather-gc-ca/weather/climate-stations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query' => 'toronto city'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/api-weather-gc-ca/weather/climate-stations"
payload := strings.NewReader("{\n \"query\": \"toronto city\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/api-weather-gc-ca/weather/climate-stations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"toronto city\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/api-weather-gc-ca/weather/climate-stations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"toronto city\"\n}"
response = http.request(request)
puts response.read_body{
"attribution": "Data Source: Environment and Climate Change Canada",
"count": 3,
"lang": "en",
"licence_url": "https://eccc-msc.github.io/open-data/licence/readme_en/",
"next_offset": null,
"observed_at_ms": 1792969237514,
"offset": 0,
"source_url": "https://api.weather.gc.ca/collections/climate-stations/items?f=json&STATION_NAME=TORONTO+CITY&sortby=STATION_NAME&limit=25&offset=0",
"stations": [
{
"climate_id": "6158355",
"daily_first_date": "2002-06-04",
"daily_last_date": "2026-10-23",
"distance_km": null,
"elevation_m": 112.5,
"first_date": "2002-06-04",
"has_hourly": true,
"has_monthly_summary": true,
"has_normals": false,
"hourly_first_date": "2002-06-04",
"hourly_last_date": "2026-10-23",
"last_date": "2026-10-23",
"latitude": 43.666666666666664,
"longitude": -79.4,
"monthly_first_date": "2003-07-01",
"monthly_last_date": "2006-12-01",
"name": "TORONTO CITY",
"operator": "Environment and Climate Change Canada - Meteorological Service of Canada",
"province": "ON",
"province_name": "ONTARIO",
"station_id": 31688,
"tc_id": "XTO",
"timezone": "EST",
"wmo_id": "71508"
},
{
"climate_id": "6158667",
"daily_first_date": "2006-01-01",
"daily_last_date": "2014-07-22",
"distance_km": null,
"elevation_m": 76.8,
"first_date": "2006-01-01",
"has_hourly": true,
"has_monthly_summary": true,
"has_normals": false,
"hourly_first_date": "2006-01-01",
"hourly_last_date": "2010-03-02",
"last_date": "2014-07-22",
"latitude": 43.62861111111111,
"longitude": -79.395,
"monthly_first_date": "2006-04-01",
"monthly_last_date": "2006-12-01",
"name": "TORONTO CITY CENTRE",
"operator": null,
"province": "ON",
"province_name": "ONTARIO",
"station_id": 30247,
"tc_id": "YTZ",
"timezone": "EST",
"wmo_id": "71265"
},
{
"climate_id": "6158359",
"daily_first_date": "2010-02-02",
"daily_last_date": "2026-10-23",
"distance_km": null,
"elevation_m": 76.8,
"first_date": "2009-12-10",
"has_hourly": true,
"has_monthly_summary": true,
"has_normals": false,
"hourly_first_date": "2009-12-10",
"hourly_last_date": "2026-10-23",
"last_date": "2026-10-23",
"latitude": 43.6275,
"longitude": -79.39611111111111,
"monthly_first_date": null,
"monthly_last_date": null,
"name": "TORONTO CITY CENTRE",
"operator": "NAV Canada",
"province": "ON",
"province_name": "ONTARIO",
"station_id": 48549,
"tc_id": "YTZ",
"timezone": "EST",
"wmo_id": "71265"
}
],
"total": 3
}请求规范
- 方法与路径: POST /apis/v1/api-weather-gc-ca/weather/climate-stations
- 可用状态: enabled
- 请求 URL 模板:
https://api.aisa.one/apis/v1/api-weather-gc-ca/weather/climate-stations
{
"operationId": "api-weather-gc-ca.weather.climate-stations",
"method": "POST",
"path": "/apis/v1/api-weather-gc-ca/weather/climate-stations",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"examples": {
"provider": {
"summary": "Official provider example; checked against AIsa request constraints",
"value": {
"query": "toronto city"
}
}
},
"schema": {
"additionalProperties": true,
"properties": {
"climate_id": {
"description": "ECCC Climate ID of a climate station (7 characters, e.g. 6158355 TORONTO CITY, 6158350 TORONTO, 1108447 VANCOUVER INTL A). Find ids with climate_stations. Pattern: ^[0-9A-Za-z]+$.",
"type": "string",
"x-alexandria-option-metadata": {
"in": "body"
}
},
"has_hourly": {
"description": "has_hourly",
"type": "boolean",
"x-alexandria-option-metadata": {
"in": "body"
}
},
"has_normals": {
"description": "has_normals",
"type": "boolean",
"x-alexandria-option-metadata": {
"in": "body"
}
},
"lang": {
"default": "en",
"description": "Language of names and texts: en (English) or fr (French). Numbers are the same in both.\n\nProvider reference: allowed values [\"en\", \"fr\"]; default \"en\".",
"type": "string",
"x-alexandria-option-metadata": {
"in": "body",
"oneOf": [
"en",
"fr"
]
}
},
"lat": {
"description": "Latitude in decimal degrees (Canada spans about 41 to 84). Give with lon.\n\nProvider reference: minimum -90; maximum 90.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"max": 90,
"min": -90
}
},
"limit": {
"default": 25,
"description": "limit\n\nProvider reference: minimum 1; maximum 100; default 25.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"max": 100,
"min": 1
}
},
"lon": {
"description": "Longitude in decimal degrees, west negative (Canada spans about -142 to -52). Give with lat.\n\nProvider reference: minimum -180; maximum 180.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"max": 180,
"min": -180
}
},
"offset": {
"default": 0,
"description": "offset\n\nProvider reference: minimum 0; maximum 10000; default 0.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"max": 10000,
"min": 0
}
},
"province": {
"description": "Two-letter province or territory code. Pattern: ^[A-Za-z]{2}$.",
"type": "string",
"x-alexandria-option-metadata": {
"in": "body"
}
},
"query": {
"description": "Part of the station name, e.g. toronto city, vancouver intl.",
"type": "string",
"x-alexandria-option-metadata": {
"in": "body"
}
},
"radius_km": {
"default": 25,
"description": "radius_km\n\nProvider reference: minimum 1; maximum 200; default 25.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"max": 200,
"min": 1
}
}
},
"type": "object"
}
}
},
"required": false
},
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
费用与请求规则
按实际用量收费。 默认请求预估费用:$0.0005 USD。 最终费用以实际用量为准。 账户适用价格可能不同;支持报价的接口可按实际请求获取报价。授权
请求体
响应
Search ECCC climate stations (the station list behind climate.weather.gc.ca historical data and normals): by climate_id, by part of the station name (query), by province, near lat/lon within radius_km (sorted by distance), and only stations with 1981-2010 normals (has_normals) or hourly data (has_hourly). Returns Climate ID, station id, coordinates, elevation and the first/last dates of daily, monthly and hourly data. An unknown climate_id is not_found; a search with no match is an empty list.
The response contains the tool result directly.
| Documented field | Provider type | Description |
|---|---|---|
attribution | string | Attribution the ECCC Data Servers End-use Licence requires when the data is republished. |
count | number | |
lang | string | Language of the texts. |
licence_url | string | The ECCC Data Servers End-use Licence. |
next_offset | number | |
observed_at_ms | number | When this program read the source, epoch milliseconds. |
offset | number | |
source_url | string | The api.weather.gc.ca request this answer was read from. |
stations | object[] | |
total | number |
These are the provider's documented fields. Field requiredness, nullability and nested object structures are specified only where the descriptions explicitly say so.