Problem with reading API

So i’m trying to make a weather app but can’t seem to get data out of the API.
Here is the code:
var api= “,24

$.getJSON(api, function(data){
The console is empty and i don’t know what i did wrong…

Try logging the data instead to see what is there.

Tried that aswell…
Here is the code pen:

If you look at the console it says $ is not defined, did you import jQuery?

That was the first thing i did but for me it does not even show that in the console

Seems like this is the issue

So it’s denying access to the API because of the key? Is there any way to fix that?

I would suggest you to use another API such as openweather, in fact I now remember that I faced the same issue as you when I did my project.

Search here in the forums, there are probably workarounds.

Ok thanks for the help!

the apixu api helped me with building this app

Hope it can help!