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.
- 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
examples :
https://api.codetabs.com/v1/weather
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 "&city=" city i want to know the temperature.
https://api.codetabs.com/v1/weather?city=london
response :
{
  "city ": "london ",
  "country ": "GB ",
  "lat ": "51.5100 ",
  "lon ": "-0.1300 ",
  "tempC ": "9.18 ",
  "tempF ": "48.52 "
}