1km メッシュ天気予報(短期予報・CSV)
概要
1km格子ごとに計算された天気予報のデータをCSV形式で提供します。 短期予報 (short range forecast) は1時間ごと72時間分の天気予報です。 短期予報で提供する天気コードは、"のち" や "時々" といった複合を含まず、ひとつの天気で表現されます。 API は秒間50リクエストの範囲でご使用いただけます。
エンドポイント
ご契約時、API Keyと共に専用のエンドポイントをご案内します。
GET https://example.com/csv/batch/xxxxxxxxxx_srf.csv
リクエスト
shell
curl -s "https://example.com/csv/batch/xxxxxxxxxx_srf.csv" \
-H "X-API-Key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" > xxxxxxxxxx_srf.csv
レスポンス
CSV
名称 | 概要 | 型 | フォーマット | 欠測時 | サンプル |
---|---|---|---|---|---|
id | リクエスト ID | string | |||
lat | 緯度 | float | |||
lon | 経度 | float | |||
meshcode | メッシュコード | int | 8桁数値 | 3次メッシュコード | |
date | 年月日 | string | 2021/6/1 | ||
hour | 時刻 | int | 0-23 | ||
wx | 天気コード | int | 100-999 | -9999 | 天気コード・アイコン(予報)参照 |
temp | 気温(℃) | float | -9999 | ||
prec | 降水量(mm/h) | float | -9999 | 後1時間の降水量 | |
arpress | 気圧(hPa) | float | -9999 | ||
wndspd | 風速(m/s) | float | -9999 | ||
wnddir | 風向 | int | 1-16 | -99 | 風向定義一覧参照 |
rhum | 相対湿度(%) | int | -99 |
リクエスト ID
提供データを分類するIDが与えられます。 市町村ごとにCSV提供する際、ここには総務省発行の5桁の市町村コードを含みます。
エラー
ステータス | エラーコード | エラーメッセージ | 内容 |
---|---|---|---|
400 | 400_001 | "key" is required | 必須パラメータ未指定 |
400 | 400_002 | "key" is invalid value | パラメータの型/フォーマット不正 |
400 | 400_003 | "key" is out of range | パラメータ範囲外 |
401 | 401_001 | "X-API-Key" is required | APIキー未指定 |
401 | 401_002 | API Key is invalid value | APIキー不正 |
401 | 401_003 | "Key" is out of range | 利用期限/場所外 |
403 | 403_001 | "key" is out of range | 取得可能範囲外のデータをリクエスト |
404 | 404_001 | Resource is not exist | 存在しないリソース(メソッド、パス)を指定 |
404 | 404_002 | Data is not found | データが存在しない地点/日付を指定 |
429 | 429_001 | Requests is too many | 秒間リクエスト数の許容値オーバー |
500 | 500_001 | an error has occurred | 不明なエラーが発生 |
サンプル
レスポンス(正常)
csv
id,lat,lon,meshcode,date,hour,wx,temp,prec,arpress,wndspd,wnddir,rhum
01101,43.062638,141.353921,64414278,2021/06/01,5,600,8,0,1016,1,12,87
01101,43.062638,141.353921,64414278,2021/06/01,6,100,8,0,1017,0,12,83
.....
レスポンス(異常)
json
{
"requestId": "xxxxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxx==",
"errors": [
{
"code": "401_001",
"message": "request is unauthorized"
}
]
}