Register to get access to free programming courses with interactive exercises

What is the HTTP API used for HTTP API

Not every site has an API. For example Hexlet guides only have a set of static HTML pages with text. The same can be said of many other sites: company websites, information sites, directories, etc. In what case is it necessary to use an HTTP API?

Mobile applications

A significant part of mobile applications is just a window of sorts to the server (backend): booking services, transfers, maps, messengers, social networks, business applications. Such applications rarely work without the Internet and almost every action by the user means requests are sent to servers to send or receive data.

TODO: interaction picture

JavaScript frontend

When we load any site on the Internet, there are two possible ways in which the appearance of the page in the browser will be formed.

First, HTML pages are generated on the server and sent directly to the browser. Any links are processed directly by the browser and loaded by direct requests to the server, which updates the entire page. In this case, no API is used, all operations with data and HTML occurs on the server. This method works well where there's little user interaction and many pages of text, such as with Wikipedia or Google.

Secondly, the page that's loaded contains JavaScript code that monitors and intercepts all events, such as button clicks. The page, in this case, is updated by code that's loaded into the browser and makes requests to the server for the necessary data. This method is needed in places with many forms and where there's complex interaction requiring instant reactions. Booking systems, chat rooms, games, and editors are implemented this way.

Services for Services

What HTTP APIs actually do under the hood is hidden from users. Today's web services interact with many other systems to get the data or features you want. All of this happens on the server, it doesn't reach the user in their browser or mobile app. For example, no one makes the payment systems themselves, the developers use ready-made systems that allow them to take money from users.


Let's look at the big picture

The structure of the API itself doesn't depend much on what we use it for. It may well be that the same API is used for the site, the mobile app, and other services.

Hexlet Experts

Are there any more questions? Ask them in the Discussion section.

The Hexlet support team or other students will answer you.

About Hexlet learning process

For full access to the course you need a professional subscription.

A professional subscription will give you full access to all Hexlet courses, projects and lifetime access to the theory of lessons learned. You can cancel your subscription at any time.

Get access
hours of theory

Sign up

Programming courses for beginners and experienced developers. Start training for free

  • 130 courses, 2000+ hours of theory
  • 1000 practical tasks in a browser
  • 360 000 students
By sending this form, you agree to our Personal Policy and Service Conditions

Our graduates work in companies:

<span class="translation_missing" title="translation missing:">Bookmate</span>
<span class="translation_missing" title="translation missing:">Healthsamurai</span>
<span class="translation_missing" title="translation missing:">Dualboot</span>
<span class="translation_missing" title="translation missing:">Abbyy</span>
Suggested learning programs
Development of front-end components for web applications
10 months
from scratch
Start at any time

Use Hexlet to the fullest extent!

  • Ask questions about the lesson
  • Test your knowledge in quizzes
  • Practice in your browser
  • Track your progress

Sign up or sign in

By sending this form, you agree to our Personal Policy and Service Conditions
Toto Image

Ask questions if you want to discuss a theory or an exercise. Hexlet Support Team and experienced community members can help find answers and solve a problem.