10.5: Working with APIs in Javascript – p5.js Tutorial

This video demonstrates how to work with an API. The example uses open weather map. How do you form an API query? How do you get an API key? How do you use the JSON data the API sends you back? Oh, and what is an API?

All examples: https://github.com/shiffman/Video-Lesson-Materials

Contact: https://twitter.com/shiffman

Next video:

JavaScript basics:

HTML/CSS basics:

Full Data playlist:

Help us caption & translate this video!



alexander krivin says:

loved this video!

Steven Arroyave says:

1 month into my Javascript coding module in university and I can say 95% of the stuff I’ve learn has been from @TheCodingTrain and the other 5% is from my lectures. Thanks dude!

Archibold Patsanza says:

Great video

Vishal Rangari says:

Sir, thank you so much for this json videos

Henny Money says:


Steve Rider says:

Good stuff and way to keep the tangents in check. I have a hard time doing that. Subscribing!

Kim says:

Not using ajax?

Ryan Grippi says:


martianpop42 says:

You are so extra!

Programming project says:

you really … wonderfull explanation

hmem hamza says:

You are a Great teacher Sir , Keep going and we will always listen to your beneficial videos 😉

Deepak Sharma says:

Hi, It was really nice explanation about api but instead of fetching the whether info. i would like to use freely available api that can merge two pdf into one. Is there any way to use such api?


how can min max temperature are same?

Geo Mukkath says:

If i had to take information from the API and put it into a div or an input in the html page, how would I do that?

Josh Lipovetsky says:

Thank you very much, Daniel!

Fun liau says:

0:45 how google

VRS says:

great work ! thank you

angela morrison says:

Oh wow its only 200,000 kelvin outside………..

A Sheth says:

I learned in 15 minutes what I’ve been trying to learn for the last 15 hours….damn your good…subscribed!

13StJimmy says:

Quick question: I’m trying to change the size of an ellipse based on a number I have in my JSON page but the number is in an array

Basically I want to change the size of the ellipse based on its position in the array

Can anyone help?

Maya Novarini says:

“You’re smart, funny and humble, awesome tutorials too!” ~your new subscriber.

Daniel Uribe says:

This helped tons as I’m just learning how to call API’s with Javascript. I’ll definitely take a look at your other videos.

John R.M says:

you are fun man! loved the video in the 1st minute

jus a treat Peejay says:

Does the data from the api query continuously update when you refresh ? Fab video, im new here!

arbaz khan says:

which is the text editor tht u r using?? plz give the link….

Vinh Le says:

Do you API bro? My new shirt i wear

Oleg Mar says:

Thanks, good example. I subscibe for u video!

Ruslan Kardashev says:

i need a teacher like this in my life!

Akshat Jain says:

Thank you so much for this video! We need more teachers like you.

Maverick says:

this is probably super late, but can someone PLEASE help me out on how to use the Oxford Dictionary API in JavaScript? All i see is examples in Java but i need JavaScript

Austin Peck says:

Just starting to use APIs and this was a great video to get started with, thank you.

ferhoba ferhoba says:

2.45 min. Quote: “First thing you wanna’ do is to click on it’. : -)

habib shirzad says:

wtf ur laughing for its annoying

Ton Tran says:

Awesome tutorial!

dominique007 says:

So helpful thanks!

Incolas says:

amazing thank you

The Odd Hikikomori says:

can I use this same method with timezones?

tuomasish says:

Very good presentation…

Оксана Давыдова says:

Surprinsingly I found a website called Codenimi, where I obtained real coupons. If you also want 100% genuine codes then type in google as “Codenimi Free”. There are n “number” of genuine codes there.

Zestyyy says:

BRO! I’ve searched and watched many videos trying to fully understand what the heck an API is, but you, sir, have made the most sense so far – “An interface-like thing for one project on a server to talk to another project on another server.” GENIUS. Anyways, thanks. Great vid. Keep up the things you do.

harsh kumar says:

thanks bro…you are awesome

Ansa Noreen says:

You are amazing. I like the energy you exude

Levin jay Tagapan says:

Great video

Morpheus says:

Your videos are the most easiest to understand thanks keep it up we need you.

Kalyan Kumar says:

I am unable to get it.

José Tobias says:

I feel like I can call you a “friend”. You’re that kind of a person.
Thank you very much for every single video.

Write a comment


Human Verification: In order to verify that you are a human and not a spam bot, please enter the answer into the following box below based on the instructions contained in the graphic.

Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!

Send this to a friend

▷ Other ReviewsVehicles▷ Show Cars▷ Motorbikes▷ Scooters▷ Bicycles▷ Rims & Tires▷ Luxury BoatsFashion▷ Sunglasses▷ Luxury Watches▷ Luxury Purses▷ Jeans Wear▷ High Heels▷ Kinis Swimwear▷ Perfumes▷ Jewellery▷ Cosmetics▷ Shaving Helpers▷ Fashion HatsFooding▷ Chef Club▷ Fooding Helpers▷ Coktails & LiquorsSports▷ Sport Shoes▷ Fitness & Detox▷ Golf Gear▷ Racquets▷ Hiking & Trek Gear▷ Diving Equipment▷ Ski Gear▷ Snowboards▷ Surf Boards▷ Rollers & SkatesEntertainment▷ DIY Guides▷ Zik Instruments▷ Published Books▷ Music Albums▷ Cine Movies▷ Trading Helpers▷ Make Money▷ Fishing Equipment▷ Paintball Supplies▷ Trading Card Games▷ Telescopes▷ Knives▷ VapesHigh Tech▷ Flat Screens▷ Tech Devices▷ Camera Lenses▷ Audio HiFi▷ Printers▷ USB Devices▷ PC Hardware▷ Network Gear▷ Cloud Servers▷ Software Helpers▷ Programmer Helpers▷ Mobile Apps▷ Hearing AidsHome▷ Home Furniture▷ Home Appliances▷ Tools Workshop▷ Beddings▷ Floor Layings▷ Barbecues▷ Aquarium Gear▷ Safe Boxes▷ Office Supplies▷ Security Locks▷ Cleaning ProductsKids▷ Baby Strollers▷ Child Car Seats▷ Remote ControlledTravel▷ Luggages & Bags▷ Airlines Seats▷ Hotel Rooms▷ Fun Trips▷ Cruise Ships▷ Mexico Tours