weatherapi-com
4.0
WeatherAPI.com MCP Server provides tools for accessing weather and geolocation data.
WeatherAPI.com is a fully managed service offering extensive weather and geolocation APIs with up to 99.99% uptime. It supports real-time weather, forecasts, historical data, future weather predictions, global alerts, air quality, astronomy, time zone data, IP lookup, sports events, and a forthcoming map API. The service is designed to provide reliable data access for various applications.
Features
- Real-time weather updates
- 14-day weather forecasts
- Historical weather data since 2010
- Global weather alerts
- Air quality and astronomy data
MCP Tools
- Realtime Weather Tool: Provides up-to-date current weather information in JSON and XML formats.
- Forecast Weather Tool: Delivers weather forecasts for up to 14 days ahead, including alerts and astronomy data.
- History Weather Tool: Offers historical weather data starting from January 1, 2010.
- Marine Weather Tool: Supplies marine and sailing weather forecasts, including tide data.
- Future Weather Tool: Projects weather conditions in 3-hour intervals for dates between 14 and 300 days in the future.
- Search/Autocomplete Tool: Returns matching cities and towns based on search queries.
- Time Zone Tool: Provides up-to-date time zone and local time information.
- IP Lookup Tool: Offers geolocation data for IP addresses.
- Astronomy Tool: Supplies information on astronomical events like sunrise, sunset, moon phases, etc.
- Sports Tool: Lists upcoming sports events for football, cricket, and golf.
- Alerts Tool: Returns alerts and warnings from government agencies worldwide.
Usage with Different Platforms
python
python
import requests
url = 'https://api.weatherapi.com/v1/current.json'
params = {
'key': 'YOUR_API_KEY',
'q': 'London'
}
response = requests.get(url, params=params)
print(response.json())
javascript
javascript
fetch('https://api.weatherapi.com/v1/current.json?key=YOUR_API_KEY&q=London')
.then(response => response.json())
.then(data => console.log(data));
Frequently Asked Questions
What is the request limit for the free service?
The free service allows up to 10 requests per second.
Can I access historical weather data?
Yes, historical weather data is available from January 1, 2010.
Is there a map API available?
A map API is coming soon.