Logo Weather API

Logo Weather API

Description
- CORS is enabled allowing Javascript make requests across domain boundaries
- API URL => https://api.codetabs.com/v1/weather/
- JSON format is used by default. To get data in XML set up format=xml .
- Limit : 5 requests per second. 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 actual temp based on your public IP geolocation.
http Request : GET https://api.codetabs.com/v1/weather
parameter "&format=" values are json(by default or if parameter is empty) or xml
examples :
https://api.codetabs.com/v1/weather
https://api.codetabs.com/v1/weather?format=xml

response :
{
  "city": "paris",
  "country": "FR",
  "lat": "48.8600",
  "lon": "2.3500",
  "tempC": 21.62,
  "tempF": 53.62,
}       
      
Endpoint - Get temp from any location
This endpoint retrieves actual temp from the city passed as a parameter.
http Request : GET https://api.codetabs.com/v1/weather?city=paris
parameter "&format=" values are json(by default or if parameter is empty) or xml
parameter "&city=" city i want to know the temperature.
https://api.codetabs.com/v1/weather?city=london
https://api.codetabs.com/v1/weather?city=london&format=xml

response :
{
  "city ": "london ",
  "country ": "GB ",
  "lat ": "51.5100 ",
  "lon ": "-0.1300 ",
  "tempC ": "9.18 ",
  "tempF ": "48.52 "
}