jQuery and APIs

Hi all, hope everyone’s having a great New Year! I’m loving FCC so far and have been breezing past everything so far up till the API projects. Can anyone point me to any good resources with regards to using jQuery/AJAX to access APIs?

Great sets of videos - though I haven’t watched it all yet, quick Intro to jQuery and quick Intro to Ajax .

I’d start by the two Intros then the videos.

1 Like

Thanks! I’ll definitely check them out.


also, make sure to check your console when working with api’s as you will sometimes get a cross origin error. good luck and keep up the good work :slight_smile:

Although it doesn’t really address APIs, I found the Codecademy jQuery course very helpful for just understanding what was going on in jQuery.

1 Like

Aaaa thanks everyone, finally got it working. Just a quick question, originally I was using http://api.forismatic.com/api/1.0/?method=getQuote&format=json&lang=en as my api but I couldn’t get the JSON from there (it worked when I put in a different API). I was wondering why this link doesn’t work?

are you trying to call the API from codepen ?

Yup, haven’t tried it without yet but I’ll have a look to see if it’s working.

Also when using AJAX I get 2/3 different JSON objects back, is there a way to restrict it to just 1?

Nevermind I just changed the order of the code and it works now for some reason.