Get Climate Data
curl --request GET \
--url https://solarmoney.up.railway.app/api/climate/{township_code}import requests
url = "https://solarmoney.up.railway.app/api/climate/{township_code}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://solarmoney.up.railway.app/api/climate/{township_code}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Terrain & Climate
Get Climate Data
回傳指定鄉鎮市的氣候資料:
- annual:年均統計(GHI、氣溫、風速、濕度、地理中心)
- monthly:12 個月典型 GHI/溫度/風速/濕度
township_code 為內政部 7 碼鄉鎮市代碼,例如 6300100(台北市中正區)。 若資料庫尚未匯入(需先執行 scripts/import_climate.py),回傳 404。
GET
/
api
/
climate
/
{township_code}
Get Climate Data
curl --request GET \
--url https://solarmoney.up.railway.app/api/climate/{township_code}import requests
url = "https://solarmoney.up.railway.app/api/climate/{township_code}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://solarmoney.up.railway.app/api/climate/{township_code}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Path Parameters
Response
Successful Response
