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

JavaScript AJAX Basics (retiring) AJAX and APIs What Is an API?

kabir k
PLUS
kabir k
Courses Plus Student 18,036 Points

Third-party web service

In the video, What is an API?, they said....."An application programming interface provides the method for connecting your site to a third-party web service like YouTube, Dropbox, or Flickr."

In this context, what do they mean by a third-party web service?

1 Answer

A statement from Stack Exchange:

An API is an interface for other programs to interact with your program without having direct access.

YouTube's servers run software. Your app can interact with YouTube's software. YouTube's API controls how your app interacts with their software, and, for example, it can limit usage and visibility over data. YouTube is a third party. You don't own YouTube.

Windows and Linux have APIs. If you wanted to write an app that plays sound through your computer's speakers, you can do it through the operating system's API. Your app won't have access to the entire OS's internals (for security reasons), but it will have some access.

An API is separate from your app, but your app can still use it.

Good! For a second I felt like my answer was too confusing.