Weather logo Weather API

Weather logo Weather API

Description
- CORS is enabled allowing JavaScript to make requests across domain boundaries
- API URL => /v1/weather
- JSON format is used by default. To get data in XML set up format=xml (root element <output>).
- Limit : 30 requests per minute. Once reached subsequent requests will result in error 429 (too many requests) until your quota is cleared.
Endpoint - Get your local temp
This endpoint retrieves the actual temperature based on your public IP geolocation.
HTTP Request: GET /v1/weather
parameter "&format=" values are json(by default or if parameter is empty) or xml
examples :
/v1/weather
/v1/weather?format=xml

response :
{
  "tempC": 21.6,
  "tempF": 70.9,
  "city": "Paris",
  "country": "France",
  "latitude": 48.8566,
  "longitude": 2.3522
}
      
Endpoint - Get temp from any location
This endpoint retrieves the actual temperature from the city passed as a parameter.
HTTP Request: GET /v1/weather?city=paris
parameter "&format=" values are json(by default or if parameter is empty) or xml
parameter "&city=" the city you want to know the temperature of.
/v1/weather?city=london
/v1/weather?city=london&format=xml

response :
{
  "tempC": 9.2,
  "tempF": 48.6,
  "city": "London",
  "country": "United Kingdom",
  "latitude": 51.5085,
  "longitude": -0.1257
}
          
Try it live