How to get precipitation/rainfall through weather api?
Question: I tired [Open Weather Map](http://openweathermap.org/current) because the docs
say it has "rain", but when I call it it doesn't. So I tried [Python Weather
API](https://code.google.com/p/python-weather-api/wiki/Examples) but none of
those options from weather.com, noaa, or yahoo weather have rainfall or
precipitation. So I tried
[Wunderground](http://www.wunderground.com/weather/api/d/docs?d=index&MR=1)
but that only seems to work for US cities, and on top of that I can't be
bothered buying a key.

Anyone know where to go from here?

On open weather map it says it has rain, but I don't get that in the results:

Example of JSON call

    
    
    {"coord":{"lon":139,"lat":35},
    "sys":{"country":"JP","sunrise":1369769524,"sunset":1369821049},
    "weather":[{"id":804,"main":"clouds","description":"overcast clouds","icon":"04n"}],
    "main":{"temp":289.5,"humidity":89,"pressure":1013,"temp_min":287.04,"temp_max":292.04},
    "wind":{"speed":7.31,"deg":187.002},
    "rain":{"3h":0},                      # on this line
    "clouds":{"all":92},
    "dt":1369824698,
    "id":1851632,
    "name":"Shuzenji", 
    "cod":200}
    

However, when I call it like so

    
    
    from pprint import pprint
    import requests
    r = requests.get('http://api.openweathermap.org/data/2.5/weather?q=Vancouver')
    pprint(r.json())
    

I get something with no rainfall/precipitation.

    
    
    {u'base': u'cmc stations',
     u'clouds': {u'all': 0},
     u'cod': 200,
     u'coord': {u'lat': 49.25, u'lon': -123.12},
     u'dt': 1406042326,
     u'id': 6173331,
     u'main': {u'humidity': 77,
               u'pressure': 862,
               u'temp': 289.33,
               u'temp_max': 290.93,
               u'temp_min': 288.15},
     u'name': u'Vancouver',
     u'sys': {u'country': u'CA',
              u'message': 0.1867,
              u'sunrise': 1406032353,
              u'sunset': 1406088323},
     u'weather': [{u'description': u'Sky is Clear',
                   u'icon': u'01d',
                   u'id': 800,
                   u'main': u'Clear'}],
     u'wind': {u'deg': 104.001, u'speed': 2.75}}
    


Answer: According to the [documentation](http://openweathermap.org/weather-data),
`weather`, `rain.3h`, and `snow.3h` are all `optional` parameters, suggesting
that they will not always be included in the result.

I interpret that to mean that rain and snow won't be reported if there was no
rain or snow at the time in question -- such as in your example where it says
"Sky is clear" -- but it's also possible that it means they just don't
guarantee rain/snow data.

