Get current weather, hourly forecast, daily forecast for 7 days, and 7 day weather icons for your city. No authentication or API key required... Simple and fast and free weather API
Get current weather, daily forecast for 7 days and weather icons for your city. No authentication or API key required... Simple, easy and free weather API.
Our mission is to provide free, good quality weather data to anyone, anywhere. Join us today
https://weatherdbi.herokuapp.com/data/weather/{location}
Replace {location}
with the required location.
For example: london, newyork, us, papuanewguinea, sanmarino, elsalvador
https://weatherdbi.herokuapp.com/data/weather/{lat,long}
Here lat=latitude and long=longitude. Note that order is important. Remember that only decimal format of coordinates is supported.
Replace {lat,long}
with your desired coordinates like 28.539143,-81.403076
, 41.601418,-87.617012
, 58.756622,-94.083054
, etc. Try to avoid spaces and other unwanted characters. See possible errors below.
GET request with valid query
https://weatherdbi.herokuapp.com/data/weather/london
OR
https://weatherdbi.herokuapp.com/data/weather/41.601418,-87.617012
View response of the above API calls:
GET request with invalid query: This error occurs when the specified location does not exists, weather data for that location is not available, there is a spelling error or there is any other popular name for that location.
https://weatherdbi.herokuapp.com/data/weather/hello
OR
https://weatherdbi.herokuapp.com/data/weather/58.756622,-94.08hj3054mk
Error Response (200 - OK):
{
"status": "fail",
"message": "invalid query",
"query": "hello", // or "58.756622,-94.08hj3054mk" for coordinates
"code": 0,
"visit": "https://weatherdbi.herokuapp.com/documentation/v1"
}
GET request with invalid query: This error occurs when possible harmful characters are present in the query. To avoid this, do not put anything other than A-Z, a-z, 0-9, hyphen, comma, plus, space, &, full stop in the query.
https://weatherdbi.herokuapp.com/data/weather/l*)$o@nd'o%20n
Error Response (400 - Bad Request):
{
"status": "fail",
"message": "Rejected characters in query",
"query": "l*)$o@nd'o n",
"rejected": "*)$@'",
"code": 1
}
GET request with invalid query: This error occurs only when using coordinates. Make minimum number of requests with coordinates to avoid this error. Please remember that this is a free service and use accordingly.
https://weatherdbi.herokuapp.com/data/weather/41.601418,-87.617012
Error Response (503 - Service Unavailable):
{
"status": "fail",
"message": "Search by coordinates not available due to excessive use of this feature. Try after sometime or avail other methods available",
"query": "41.601418,-87.617012",
"code": 2,
}
If you like our idea, please support us by sharing words about our api with others. Write about us in your blog and create youtube tutorial using our api. Don't forget to star ✨ this repository. Your support is our reward and our source of enthusiasm and encouragement. Share new idea for this API in the Discussions.
Mail us for feature requests, improvement, bug, issue, help, ect...
Email: [email protected]
You can send us a message from our website: Talk to us Section
Want to contribute to this API? You are welcome. Send an email to [email protected] mentioning your skills. We will reach out to you as soon as possible.
We are looking for front-end developers with sufficient knowledge of html, css and Javascript.