Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Caleb King
32,777 PointsHow do API work?
I was looking for more information on APIs. Can someone help explain how they work?
5 Answers
Kevin Korte
28,149 PointsYou're basically making "calls" to api specific address,and api specific terms or data request, and in return their server responds with the data you requested. You can than use that data to display it on your application.
For instance I used weather.com's weather API for test site. It sent it a request for the weather information I was looking for and the location of that weather, and their API sent back that up-to-date weather info as json, which I used PHP to parse, and than i had the ability to use php to provide that weather information in a way that matched my site.
Caleb King
32,777 PointsThanks Kevin Korte. I appreciate the response. James Barnett I was curious on how to create an API.
James Barnett
39,199 PointsTo do what exactly?
James Barnett
39,199 PointsIn addition to Kevin Korte's answer, if you want to read up more about what APIs are you can check out Make Use Of's article What Is An API & What Are They Good For?
Jason Massey
16,635 PointsAnother good article about APIs http://readwrite.com/2013/09/19/api-defined#awesm=~oGOH4myC1KQW7i
Jess Pendley
13,128 PointsZapier also did a really good free course called "API Zero to Superhero". https://zapier.com/blog/free-api-course/
James Barnett
39,199 PointsJames Barnett
39,199 PointsAre you trying to something in specific?