---
id: 6732a0472f52015e511f8e58
title: What Is an API, and What Are Web APIs?
challengeType: 19
dashedName: what-is-an-api-and-what-are-web-apis
---

# --description--

Let's learn about APIs and why they’re essential for web development. API stands for Application Programming Interface. APIs establish a set of rules and protocols that allow software applications to communicate with each other and exchange data efficiently.

You can think of them as constructs that allow developers to create more complex functionality based on simpler building blocks that are already implemented.

There are various types of APIs. Web APIs are specifically designed for web applications. There are different types of web APIs for client-side JavaScript development. They are not part of JavaScript itself.

These types of APIs are often divided into two main categories: browser APIs and third-party APIs.

Browser APIs expose data from the browser. As a web developer, you can access and manipulate this data using JavaScript.

They also provide access to various functionalities, such as manipulating the structure of the website, handling events, working with storage, and communicating with the network.

Some examples of commonly used Browser APIs include:

The DOM API, which you can use to manipulate HTML elements, their styles, and attributes. You will learn much more about the DOM in the coming lessons. It’s a core concept in web development.

The Storage API, to store data locally on the user’s device.

And more. 

There are various browser APIs that you can use to handle user interactions and to get more information from the browser, like the user's current location. 

You can also work with other types of elements, such as video and audio.

Browser APIs can be helpful tools for building powerful web applications. They already come built into the browser.

But you can also use third-party APIs, which are not built into the browser by default. To use them, you need to retrieve their code in some way. Typically, they come with detailed documentation explaining how to use their services.

An example is the Google Maps API, which you can use to display interactive maps on your website.

There are various types of third-party web APIs, including weather APIs, social media APIs, payment APIs, data APIs, translation APIs, and more. You just need to find the API that fits your needs.

Web APIs are essential tools for building modern web applications that can interact with various services and data sources. By learning how to leverage their power, you will expand your toolset for creating dynamic and engaging websites.

# --questions--

## --text--

What is the primary purpose of an API?

## --answers--

To create new programming languages.

### --feedback--

Think about how APIs facilitate interaction between different systems.

---

To provide a user interface for applications.

### --feedback--

Think about how APIs facilitate interaction between different systems.

---

To enable communication between different software applications.

---

To store and manage data.

### --feedback--

Think about how APIs facilitate interaction between different systems.

## --video-solution--

3

## --text--

What is the difference between a general API and a web API?

## --answers--

General APIs are only used for web applications, while web APIs can be used for any type of application.

### --feedback--

Consider the context in which APIs are used.

---

Web APIs are specifically designed for interacting with web browsers and servers.

---

There is no difference between general APIs and web APIs.

### --feedback--

Consider the context in which APIs are used.

---

General APIs are used for external communication within an application, while web APIs are used for internal communication.

### --feedback--

Consider the context in which APIs are used.

## --video-solution--

2

## --text--

How do web APIs simplify the development of web applications?

## --answers--

By providing pre-built user interfaces.

### --feedback--

Think about how APIs can streamline the development process.

---

By eliminating the need for programming languages.

### --feedback--

Think about how APIs can streamline the development process.

---

By offering standardized ways to access and manipulate data and functionality.

---

By automating the entire development process.

### --feedback--

Think about how APIs can streamline the development process.

## --video-solution--

3
