FCC weather api doesnt work

i noticed that FCC weather api stopped working.

https://fcc-weather-api.glitch.me/api/current?lat=51.509865&lon=-0.118092

those are lat and long for london, but whatever you will pass, it always will show this:

{“coord”:{“lon”:139,“lat”:35},“weather”:[{“id”:803,“main”:“Clouds”,“description”:“broken clouds”}],“base”:“stations”,“main”:{“temp”:28.23,“pressure”:1011,“humidity”:74,“temp_min”:26,“temp_max”:31},“visibility”:10000,“wind”:{“speed”:3.6,“deg”:230},“clouds”:{“all”:75},“dt”:1499396400,“sys”:{“type”:1,“id”:7616,“message”:0.0043,“country”:“JP”,“sunrise”:1499369792,“sunset”:1499421666},“id”:1851632,“name”:“Shuzenji”,“cod”:200}

never mind, it works again…

1 Like

Hi! I just completed the challenge, but had the same problem. I used this workaround:

if (result.name !="Shuzenji"){//Weather API has a bug that shows this location sometimes
              //Code to insert API data into HTML
            }

I’m based in Barcelona but still got Shuzenji as location sometimes. The example project also has that problem, it’s probably an API bug.

YES I found the Free Code Camp Weather API to be very buggy :bug::bug::anger::cry:
What I did is just use the OpenWeather.org API and that worked great for me You have to open an account and get an API key but it’s totally free and good practice for what you normally do on a project :smile::+1:

1 Like

That’s probably a better option, since if you were to be in Shuzenji my app would never work :sweat_smile: