weather-by-api-ninjas
3.5
Weather by API-Ninjas MCP Server provides access to the latest weather information for any city or geographic location worldwide.
Welcome to the Weather by API-Ninjas MCP Server! This server provides access to the latest weather information for any city or geographic location worldwide. With its robust features, users can retrieve real-time weather data effortlessly.
Features
- Global Coverage: Access weather data for any region around the globe.
- Multiple Input Options: Retrieve weather information using latitude and longitude, ZIP code (US only), city name, state (US only), and country name.
MCP Tools
- /v1/weather Endpoint: This endpoint allows users to access the latest weather information.
Usage with Different Platforms
python
python
import requests
url = "https://api-ninjas.com/v1/weather"
params = {
'lat': 40.7128,
'lon': -74.0060
}
response = requests.get(url, params=params)
print(response.json())
javascript
javascript
fetch('https://api-ninjas.com/v1/weather?lat=40.7128&lon=-74.0060')
.then(response => response.json())
.then(data => console.log(data));