OpenWeatherMap API
OpenWeatherMap API is an API to get weather forecast in the World.
There was also a free plan to use this API, so I tried it.
https://openweathermap.org/api
To get the city ID, we have to search in following.
http://bulk.openweathermap.org/sample/
Current weather data
$ curl "http://api.openweathermap.org/data/2.5/weather?id=1858033&appid=xxxx" | jq . { "coord": { "lon": 135.78, "lat": 33.47 }, "weather": [ { "id": 801, "main": "Clouds", "description": "few clouds", "icon": "02n" } ], "base": "stations", "main": { "temp": 277.305, "pressure": 1013.35, "humidity": 94, "temp_min": 277.305, "temp_max": 277.305, "sea_level": 1034.23, "grnd_level": 1013.35 }, "wind": { "speed": 3.38, "deg": 327.004 }, "clouds": { "all": 20 }, "dt": 1487948082, "sys": { "message": 0.0055, "country": "JP", "sunrise": 1487885446, "sunset": 1487926182 }, "id": 1858033, "name": "Kushimoto", "cod": 200 }
5 day / 3 hour forecast
$ curl 'http://api.openweathermap.org/data/2.5/forecast?id=1858033&appid=xxxx' | jq . { "city": { "id": 1858033, "name": "Kushimoto", "coord": { "lon": 135.783325, "lat": 33.466671 }, "country": "JP", "population": 0, "sys": { "population": 0 } }, "cod": "200", "message": 0.0071, "cnt": 40, "list": [ { "dt": 1487959200, "main": { "temp": 276.97, "temp_min": 276.97, "temp_max": 277.43, "pressure": 1013.07, "sea_level": 1034.06, "grnd_level": 1013.07, "humidity": 99, "temp_kf": -0.46 }, "weather": [ { "id": 801, "main": "Clouds", "description": "few clouds", "icon": "02n" } ], "clouds": { "all": 12 }, "wind": { "speed": 4.5, "deg": 320.502 }, "sys": { "pod": "n" }, "dt_txt": "2017-02-24 18:00:00" }, { "dt": 1487970000, "main": { "temp": 276.86, "temp_min": 276.86, "temp_max": 277.168, "pressure": 1013.83, "sea_level": 1034.88, "grnd_level": 1013.83, "humidity": 95, "temp_kf": -0.31 }, "weather": [ { "id": 800, "main": "Clear", "description": "clear sky", "icon": "01n" } ], "clouds": { "all": 0 }, "wind": { "speed": 4.35, "deg": 325.003 }, "sys": { "pod": "n" }, "dt_txt": "2017-02-24 21:00:00" }, { "dt": 1487980800, "main": { "temp": 279.32, "temp_min": 279.32, "temp_max": 279.47, "pressure": 1014.87, "sea_level": 1035.93, "grnd_level": 1014.87, "humidity": 85, "temp_kf": -0.15 }, "weather": [ { "id": 800, "main": "Clear", "description": "clear sky", "icon": "01d" } ], "clouds": { "all": 0 }, "wind": { "speed": 3.67, "deg": 327.501 }, "sys": { "pod": "d" }, "dt_txt": "2017-02-25 00:00:00" }, { "dt": 1487991600, "main": { "temp": 282.501, "temp_min": 282.501, "temp_max": 282.501, "pressure": 1013.68, "sea_level": 1034.77, "grnd_level": 1013.68, "humidity": 69, "temp_kf": 0 }, "weather": [ { "id": 800, "main": "Clear", "description": "clear sky", "icon": "02d" } ], "clouds": { "all": 8 }, "wind": { "speed": 3.61, "deg": 308.001 }, "sys": { "pod": "d" }, "dt_txt": "2017-02-25 03:00:00" }, { "dt": 1488002400, "main": { "temp": 283.23, "temp_min": 283.23, "temp_max": 283.23, "pressure": 1011.6, "sea_level": 1032.5, "grnd_level": 1011.6, "humidity": 60, "temp_kf": 0 }, "weather": [ { "id": 800, "main": "Clear", "description": "clear sky", "icon": "01d" } ], "clouds": { "all": 0 }, "wind": { "speed": 3.97, "deg": 313.001 }, "sys": { "pod": "d" }, "dt_txt": "2017-02-25 06:00:00" }, { "dt": 1488013200, "main": { "temp": 280.992, "temp_min": 280.992, "temp_max": 280.992, "pressure": 1012.87, "sea_level": 1033.53, "grnd_level": 1012.87, "humidity": 70, "temp_kf": 0 }, "weather": [ { "id": 801, "main": "Clouds", "description": "few clouds", "icon": "02n" } ], "clouds": { "all": 12 }, "wind": { "speed": 3.26, "deg": 308.001 }, "sys": { "pod": "n" }, "dt_txt": "2017-02-25 09:00:00" }, { "dt": 1488024000, "main": { "temp": 278.739, "temp_min": 278.739, "temp_max": 278.739, "pressure": 1014.17, "sea_level": 1035.08, "grnd_level": 1014.17, "humidity": 87, "temp_kf": 0 }, "weather": [ { "id": 803, "main": "Clouds", "description": "broken clouds", "icon": "04n" } ], "clouds": { "all": 56 }, "wind": { "speed": 2.3, "deg": 328.502 }, "sys": { "pod": "n" }, "dt_txt": "2017-02-25 12:00:00" }, { "dt": 1488034800, "main": { "temp": 278.333, "temp_min": 278.333, "temp_max": 278.333, "pressure": 1014.55, "sea_level": 1035.35, "grnd_level": 1014.55, "humidity": 92, "temp_kf": 0 }, "weather": [ { "id": 803, "main": "Clouds", "description": "broken clouds", "icon": "04n" } ], "clouds": { "all": 80 }, "wind": { "speed": 3.01, "deg": 340.002 }, "sys": { "pod": "n" }, "dt_txt": "2017-02-25 15:00:00" }, { "dt": 1488045600, "main": { "temp": 278.501, "temp_min": 278.501, "temp_max": 278.501, "pressure": 1014.18, "sea_level": 1035.07, "grnd_level": 1014.18, "humidity": 89, "temp_kf": 0 }, "weather": [ { "id": 803, "main": "Clouds", "description": "broken clouds", "icon": "04n" } ], "clouds": { "all": 68 }, "wind": { "speed": 3.16, "deg": 338 }, "sys": { "pod": "n" }, "dt_txt": "2017-02-25 18:00:00" }, { "dt": 1488056400, "main": { "temp": 276.547, "temp_min": 276.547, "temp_max": 276.547, "pressure": 1014.56, "sea_level": 1035.37, "grnd_level": 1014.56, "humidity": 98, "temp_kf": 0 }, "weather": [ { "id": 800, "main": "Clear", "description": "clear sky", "icon": "01n" } ], "clouds": { "all": 0 }, "wind": { "speed": 2.46, "deg": 334.501 }, "sys": { "pod": "n" }, "dt_txt": "2017-02-25 21:00:00" }, { "dt": 1488067200, "main": { "temp": 281.526, "temp_min": 281.526, "temp_max": 281.526, "pressure": 1015.31, "sea_level": 1036.08, "grnd_level": 1015.31, "humidity": 72, "temp_kf": 0 }, "weather": [ { "id": 800, "main": "Clear", "description": "clear sky", "icon": "01d" } ], "clouds": { "all": 0 }, "wind": { "speed": 2.02, "deg": 342.5 }, "sys": { "pod": "d" }, "dt_txt": "2017-02-26 00:00:00" }, { "dt": 1488078000, "main": { "temp": 284.764, "temp_min": 284.764, "temp_max": 284.764, "pressure": 1014.03, "sea_level": 1034.76, "grnd_level": 1014.03, "humidity": 65, "temp_kf": 0 }, "weather": [ { "id": 800, "main": "Clear", "description": "clear sky", "icon": "01d" } ], "clouds": { "all": 0 }, "wind": { "speed": 2.92, "deg": 308.002 }, "sys": { "pod": "d" }, "dt_txt": "2017-02-26 03:00:00" }, { "dt": 1488088800, "main": { "temp": 285.049, "temp_min": 285.049, "temp_max": 285.049, "pressure": 1011.91, "sea_level": 1032.72, "grnd_level": 1011.91, "humidity": 59, "temp_kf": 0 }, "weather": [ { "id": 800, "main": "Clear", "description": "clear sky", "icon": "02d" } ], "clouds": { "all": 8 }, "wind": { "speed": 3.58, "deg": 310.002 }, "sys": { "pod": "d" }, "dt_txt": "2017-02-26 06:00:00" }, { "dt": 1488099600, "main": { "temp": 282.772, "temp_min": 282.772, "temp_max": 282.772, "pressure": 1013.65, "sea_level": 1034.32, "grnd_level": 1013.65, "humidity": 65, "temp_kf": 0 }, "weather": [ { "id": 801, "main": "Clouds", "description": "few clouds", "icon": "02n" } ], "clouds": { "all": 24 }, "wind": { "speed": 3.81, "deg": 320.004 }, "sys": { "pod": "n" }, "dt_txt": "2017-02-26 09:00:00" }, { "dt": 1488110400, "main": { "temp": 281.27, "temp_min": 281.27, "temp_max": 281.27, "pressure": 1015.3, "sea_level": 1036.06, "grnd_level": 1015.3, "humidity": 79, "temp_kf": 0 }, "weather": [ { "id": 803, "main": "Clouds", "description": "broken clouds", "icon": "04n" } ], "clouds": { "all": 64 }, "wind": { "speed": 3.91, "deg": 335.504 }, "sys": { "pod": "n" }, "dt_txt": "2017-02-26 12:00:00" }, { "dt": 1488121200, "main": { "temp": 279.057, "temp_min": 279.057, "temp_max": 279.057, "pressure": 1015.85, "sea_level": 1036.79, "grnd_level": 1015.85, "humidity": 94, "temp_kf": 0 }, "weather": [ { "id": 801, "main": "Clouds", "description": "few clouds", "icon": "02n" } ], "clouds": { "all": 20 }, "wind": { "speed": 3.42, "deg": 336.501 }, "sys": { "pod": "n" }, "dt_txt": "2017-02-26 15:00:00" }, { "dt": 1488132000, "main": { "temp": 278.034, "temp_min": 278.034, "temp_max": 278.034, "pressure": 1015.72, "sea_level": 1036.69, "grnd_level": 1015.72, "humidity": 92, "temp_kf": 0 }, "weather": [ { "id": 801, "main": "Clouds", "description": "few clouds", "icon": "02n" } ], "clouds": { "all": 12 }, "wind": { "speed": 3.77, "deg": 337.502 }, "sys": { "pod": "n" }, "dt_txt": "2017-02-26 18:00:00" }, { "dt": 1488142800, "main": { "temp": 276.669, "temp_min": 276.669, "temp_max": 276.669, "pressure": 1016.25, "sea_level": 1037.26, "grnd_level": 1016.25, "humidity": 95, "temp_kf": 0 }, "weather": [ { "id": 800, "main": "Clear", "description": "clear sky", "icon": "01n" } ], "clouds": { "all": 0 }, "wind": { "speed": 3.47, "deg": 330.501 }, "sys": { "pod": "n" }, "dt_txt": "2017-02-26 21:00:00" }, { "dt": 1488153600, "main": { "temp": 280.927, "temp_min": 280.927, "temp_max": 280.927, "pressure": 1017.27, "sea_level": 1038.43, "grnd_level": 1017.27, "humidity": 81, "temp_kf": 0 }, "weather": [ { "id": 800, "main": "Clear", "description": "clear sky", "icon": "01d" } ], "clouds": { "all": 0 }, "wind": { "speed": 2.56, "deg": 328.502 }, "sys": { "pod": "d" }, "dt_txt": "2017-02-27 00:00:00" }, { "dt": 1488164400, "main": { "temp": 284.661, "temp_min": 284.661, "temp_max": 284.661, "pressure": 1016.67, "sea_level": 1037.79, "grnd_level": 1016.67, "humidity": 62, "temp_kf": 0 }, "weather": [ { "id": 800, "main": "Clear", "description": "clear sky", "icon": "01d" } ], "clouds": { "all": 0 }, "wind": { "speed": 2.01, "deg": 344.501 }, "sys": { "pod": "d" }, "dt_txt": "2017-02-27 03:00:00" }, { "dt": 1488175200, "main": { "temp": 284.87, "temp_min": 284.87, "temp_max": 284.87, "pressure": 1015.44, "sea_level": 1036.62, "grnd_level": 1015.44, "humidity": 58, "temp_kf": 0 }, "weather": [ { "id": 802, "main": "Clouds", "description": "scattered clouds", "icon": "03d" } ], "clouds": { "all": 44 }, "wind": { "speed": 1.22, "deg": 302.505 }, "sys": { "pod": "d" }, "dt_txt": "2017-02-27 06:00:00" }, { "dt": 1488186000, "main": { "temp": 282.909, "temp_min": 282.909, "temp_max": 282.909, "pressure": 1016.63, "sea_level": 1037.75, "grnd_level": 1016.63, "humidity": 63, "temp_kf": 0 }, "weather": [ { "id": 803, "main": "Clouds", "description": "broken clouds", "icon": "04n" } ], "clouds": { "all": 68 }, "wind": { "speed": 1.62, "deg": 338.502 }, "sys": { "pod": "n" }, "dt_txt": "2017-02-27 09:00:00" }, { "dt": 1488196800, "main": { "temp": 280.242, "temp_min": 280.242, "temp_max": 280.242, "pressure": 1018.23, "sea_level": 1039.45, "grnd_level": 1018.23, "humidity": 74, "temp_kf": 0 }, "weather": [ { "id": 802, "main": "Clouds", "description": "scattered clouds", "icon": "03n" } ], "clouds": { "all": 36 }, "wind": { "speed": 2.41, "deg": 7.00537 }, "sys": { "pod": "n" }, "dt_txt": "2017-02-27 12:00:00" }, { "dt": 1488207600, "main": { "temp": 277.005, "temp_min": 277.005, "temp_max": 277.005, "pressure": 1018.69, "sea_level": 1040, "grnd_level": 1018.69, "humidity": 91, "temp_kf": 0 }, "weather": [ { "id": 802, "main": "Clouds", "description": "scattered clouds", "icon": "03n" } ], "clouds": { "all": 32 }, "wind": { "speed": 2.36, "deg": 352.506 }, "sys": { "pod": "n" }, "dt_txt": "2017-02-27 15:00:00" }, { "dt": 1488218400, "main": { "temp": 274.866, "temp_min": 274.866, "temp_max": 274.866, "pressure": 1018.83, "sea_level": 1040.04, "grnd_level": 1018.83, "humidity": 94, "temp_kf": 0 }, "weather": [ { "id": 801, "main": "Clouds", "description": "few clouds", "icon": "02n" } ], "clouds": { "all": 20 }, "wind": { "speed": 2.61, "deg": 349.506 }, "sys": { "pod": "n" }, "dt_txt": "2017-02-27 18:00:00" }, { "dt": 1488229200, "main": { "temp": 273.165, "temp_min": 273.165, "temp_max": 273.165, "pressure": 1019.39, "sea_level": 1040.77, "grnd_level": 1019.39, "humidity": 100, "temp_kf": 0 }, "weather": [ { "id": 800, "main": "Clear", "description": "clear sky", "icon": "01n" } ], "clouds": { "all": 0 }, "wind": { "speed": 2.82, "deg": 348.004 }, "sys": { "pod": "n" }, "dt_txt": "2017-02-27 21:00:00" }, { "dt": 1488240000, "main": { "temp": 278.897, "temp_min": 278.897, "temp_max": 278.897, "pressure": 1020.28, "sea_level": 1041.53, "grnd_level": 1020.28, "humidity": 73, "temp_kf": 0 }, "weather": [ { "id": 800, "main": "Clear", "description": "clear sky", "icon": "01d" } ], "clouds": { "all": 0 }, "wind": { "speed": 2.46, "deg": 346.001 }, "sys": { "pod": "d" }, "dt_txt": "2017-02-28 00:00:00" }, { "dt": 1488250800, "main": { "temp": 283.907, "temp_min": 283.907, "temp_max": 283.907, "pressure": 1018.82, "sea_level": 1039.99, "grnd_level": 1018.82, "humidity": 53, "temp_kf": 0 }, "weather": [ { "id": 800, "main": "Clear", "description": "clear sky", "icon": "01d" } ], "clouds": { "all": 0 }, "wind": { "speed": 2.31, "deg": 321.502 }, "sys": { "pod": "d" }, "dt_txt": "2017-02-28 03:00:00" }, { "dt": 1488261600, "main": { "temp": 284.853, "temp_min": 284.853, "temp_max": 284.853, "pressure": 1016.43, "sea_level": 1037.61, "grnd_level": 1016.43, "humidity": 50, "temp_kf": 0 }, "weather": [ { "id": 800, "main": "Clear", "description": "clear sky", "icon": "01d" } ], "clouds": { "all": 0 }, "wind": { "speed": 3.11, "deg": 314.508 }, "sys": { "pod": "d" }, "dt_txt": "2017-02-28 06:00:00" }, { "dt": 1488272400, "main": { "temp": 282.098, "temp_min": 282.098, "temp_max": 282.098, "pressure": 1016.73, "sea_level": 1037.78, "grnd_level": 1016.73, "humidity": 54, "temp_kf": 0 }, "weather": [ { "id": 800, "main": "Clear", "description": "clear sky", "icon": "02n" } ], "clouds": { "all": 8 }, "wind": { "speed": 3.41, "deg": 327.009 }, "sys": { "pod": "n" }, "dt_txt": "2017-02-28 09:00:00" }, { "dt": 1488283200, "main": { "temp": 277.045, "temp_min": 277.045, "temp_max": 277.045, "pressure": 1017.24, "sea_level": 1038.22, "grnd_level": 1017.24, "humidity": 84, "temp_kf": 0 }, "weather": [ { "id": 801, "main": "Clouds", "description": "few clouds", "icon": "02n" } ], "clouds": { "all": 20 }, "wind": { "speed": 2.07, "deg": 341.003 }, "sys": { "pod": "n" }, "dt_txt": "2017-02-28 12:00:00" }, { "dt": 1488294000, "main": { "temp": 275.139, "temp_min": 275.139, "temp_max": 275.139, "pressure": 1017.14, "sea_level": 1038.01, "grnd_level": 1017.14, "humidity": 85, "temp_kf": 0 }, "weather": [ { "id": 800, "main": "Clear", "description": "clear sky", "icon": "02n" } ], "clouds": { "all": 8 }, "wind": { "speed": 2.06, "deg": 2.00134 }, "sys": { "pod": "n" }, "dt_txt": "2017-02-28 15:00:00" }, { "dt": 1488304800, "main": { "temp": 274.597, "temp_min": 274.597, "temp_max": 274.597, "pressure": 1015.89, "sea_level": 1036.88, "grnd_level": 1015.89, "humidity": 91, "temp_kf": 0 }, "weather": [ { "id": 800, "main": "Clear", "description": "clear sky", "icon": "01n" } ], "clouds": { "all": 0 }, "wind": { "speed": 2.27, "deg": 26.5012 }, "sys": { "pod": "n" }, "dt_txt": "2017-02-28 18:00:00" }, { "dt": 1488315600, "main": { "temp": 273.929, "temp_min": 273.929, "temp_max": 273.929, "pressure": 1015.24, "sea_level": 1036.12, "grnd_level": 1015.24, "humidity": 98, "temp_kf": 0 }, "weather": [ { "id": 800, "main": "Clear", "description": "clear sky", "icon": "02n" } ], "clouds": { "all": 8 }, "wind": { "speed": 1.5, "deg": 43.5007 }, "sys": { "pod": "n" }, "dt_txt": "2017-02-28 21:00:00" }, { "dt": 1488326400, "main": { "temp": 282.379, "temp_min": 282.379, "temp_max": 282.379, "pressure": 1015.33, "sea_level": 1036.12, "grnd_level": 1015.33, "humidity": 63, "temp_kf": 0 }, "weather": [ { "id": 802, "main": "Clouds", "description": "scattered clouds", "icon": "03d" } ], "clouds": { "all": 36 }, "wind": { "speed": 1.67, "deg": 44.0059 }, "sys": { "pod": "d" }, "dt_txt": "2017-03-01 00:00:00" }, { "dt": 1488337200, "main": { "temp": 286.318, "temp_min": 286.318, "temp_max": 286.318, "pressure": 1012.98, "sea_level": 1033.68, "grnd_level": 1012.98, "humidity": 60, "temp_kf": 0 }, "weather": [ { "id": 803, "main": "Clouds", "description": "broken clouds", "icon": "04d" } ], "clouds": { "all": 56 }, "wind": { "speed": 2.67, "deg": 131.002 }, "sys": { "pod": "d" }, "dt_txt": "2017-03-01 03:00:00" }, { "dt": 1488348000, "main": { "temp": 285.927, "temp_min": 285.927, "temp_max": 285.927, "pressure": 1009.86, "sea_level": 1030.49, "grnd_level": 1009.86, "humidity": 62, "temp_kf": 0 }, "weather": [ { "id": 500, "main": "Rain", "description": "light rain", "icon": "10d" } ], "clouds": { "all": 100 }, "wind": { "speed": 4.15, "deg": 150.001 }, "rain": { "3h": 0.01 }, "sys": { "pod": "d" }, "dt_txt": "2017-03-01 06:00:00" }, { "dt": 1488358800, "main": { "temp": 284.208, "temp_min": 284.208, "temp_max": 284.208, "pressure": 1008.55, "sea_level": 1029.13, "grnd_level": 1008.55, "humidity": 76, "temp_kf": 0 }, "weather": [ { "id": 500, "main": "Rain", "description": "light rain", "icon": "10n" } ], "clouds": { "all": 92 }, "wind": { "speed": 3.86, "deg": 148.508 }, "rain": { "3h": 0.5 }, "sys": { "pod": "n" }, "dt_txt": "2017-03-01 09:00:00" }, { "dt": 1488369600, "main": { "temp": 282.065, "temp_min": 282.065, "temp_max": 282.065, "pressure": 1007.92, "sea_level": 1028.3, "grnd_level": 1007.92, "humidity": 100, "temp_kf": 0 }, "weather": [ { "id": 501, "main": "Rain", "description": "moderate rain", "icon": "10n" } ], "clouds": { "all": 92 }, "wind": { "speed": 3.92, "deg": 157.002 }, "rain": { "3h": 6.67 }, "sys": { "pod": "n" }, "dt_txt": "2017-03-01 12:00:00" }, { "dt": 1488380400, "main": { "temp": 281.897, "temp_min": 281.897, "temp_max": 281.897, "pressure": 1005.28, "sea_level": 1025.84, "grnd_level": 1005.28, "humidity": 100, "temp_kf": 0 }, "weather": [ { "id": 502, "main": "Rain", "description": "heavy intensity rain", "icon": "10n" } ], "clouds": { "all": 92 }, "wind": { "speed": 4.16, "deg": 152 }, "rain": { "3h": 14.21 }, "sys": { "pod": "n" }, "dt_txt": "2017-03-01 15:00:00" } ] }