5 Weather Forecast API for developing apps

http://blog.superdevresources.com/weather-forecast-api-for-developing-apps/

weather forecast apiPlanning a new weather app? Looking for free or premium Weather API that can power your apps? Here is a list of 5 different Weather Forecast API that you can use in your apps.

1. Open Weather Map

The OpenWeatherMap service provides free weather data and forecast API suitable for any cartographic services like web and smartphones applications.

Ideology is inspired by OpenStreetMap and Wikipedia that make information free and available for everybody.

OpenWeatherMap provides wide range of weather data such as map with current weather, week forecast, precipitation, wind, clouds, data from weather Stations and many others. Weather data is received from global Meteorological broadcast services and more than 40 000 weather stations.

You can receive any weather data for your application by using JSON / XML API

Price:  Free (See pricing details)

API: OpenWeatherMap API Docs

Apps using this API627 AM for Windows Phone


2. AccuWeather

AccuWeather provides premium weather forecasting services worldwide. The AccuWeather API provides subscribers access to location based weather data via a simple RESTful web interface. Data is available in more than 40languages and dialects. Data responses are returned in JSON and JSONP. SSL encryption is also available for secure communication.

Access to the AccuWeather API requires an API key.  Contactsales@accuweather.com to receive an API key.

Price: Premium (Contact sales@accuweather.com)

API: AccuWeather API docs

Apps using this API: Weather4MeBright Weather Free for Windows Phone


3. The Weather Channel

The Weather Channel is an American satellite television channel providing weather forecast for more than 30 years. The Weather Channel and Weather Underground, Inc partnered to provide weather API with global coverage in 80 languages.

You can receive weather data for your application in JSON or XML. GIF, PNG or SWF format is also offered.

Price: Premium – Free 500 API calls per day for developing. (See pricing details)

API: The Weather Channel API docs

Apps using this API: LockieVieather for Windows Phone. Weather Puppy for iPhone


4. WeatherBug

WeatherBug – Earth Networks operates the largest networks of real-time weather and lightning sensors in the world. Their API, called Pulse API, delivers real-time weather and lightning information, forecasts utilizing forecast models with the lowest margin of error.

Data requests are made to a REST API, enabling quick and easy integration.

Price: Premium (See pricing details)

API: WeatherBug Pulse API docs

Apps using this API: Whats the Weather for Windows Phone.


5. Forecast.io

Developers behind Forecast.io provide a developer friendly global weather forecast API with up to 1000 API calls per day for free.

The API uses a simple, JSON interface. Community-provided API wrappers enable you to integrate with just a couple lines of code.

You can use the API in both commercial and non-commercial applications. A credit with a “Powered by Forecast” badge that links to http://forecast.io/ is required wherever you display data from the API.

Price: Free for 1000 API calls daily, $1 per 10,000 API calls after that.

API: Forecast.io API docs

Apps using this API: Dark Sky for iPhone


There are many other weather forecast API that we could have included in our list above. However we wanted to keep this list short with the most popular weather forecast APIs having easy to find pricing and API details.

If you have used any other Weather Forecast API in your app that you found great, let us know in comments along with your app details. Also do let us know of your experience in using the Weather Forecast API’s listed above.


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
这个问题可能是由于`python-weather-api`库已经不再维护,因此无法从PyPi上下载到库的源代码导致的。为了解决这个问题,你可以考虑使用其他的天气API,例如OpenWeatherMap、AccuWeather等等。这些API都提供了Python SDK,可以方便地在Python中使用。 以OpenWeatherMap为例,你可以按照以下步骤使用它的API: 1. 在OpenWeatherMap的官网上注册一个账号,并获取你的API Key。 2. 安装`pyowm`库,这是OpenWeatherMap的Python SDK,可以使用pip命令安装: ``` pip install pyowm ``` 3. 使用以下代码获取上个月的天气情况: ```python import pyowm import datetime # 获取当前时间 now = datetime.datetime.now() # 获取上个月的时间 last_month = now.replace(month=now.month-1) # 初始化OpenWeatherMap对象 owm = pyowm.OWM('your-api-key') # 把'your-api-key'替换成你的API Key # 获取上个月的天气情况 mgr = owm.weather_manager() observation = mgr.weather_at_place('北京') # 这里以北京为例 date_obj = datetime.datetime(last_month.year, last_month.month, 1) one_call = mgr.one_call(lat=observation.weather.location.lat, lon=observation.weather.location.lon, dt=date_obj.timestamp(), exclude='current,minutely,hourly,alerts') condition = one_call.forecast_daily[0].status print('上个月的天气情况是:', condition) ``` 这里需要把`'your-api-key'`替换成你在OpenWeatherMap官网上获取到的API Key,同时你也需要把`observation = mgr.weather_at_place('北京')`中的`北京`替换成你所在的城市。最后打印出上个月的天气情况。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值