{"id":54,"date":"2026-11-04T12:28:48","date_gmt":"2026-11-04T12:28:48","guid":{"rendered":"https:\/\/definitionofthe.com\/blog\/?page_id=54"},"modified":"2026-11-04T12:28:48","modified_gmt":"2026-11-04T12:28:48","slug":"api","status":"publish","type":"page","link":"https:\/\/definitionofthe.com\/blog\/tech-explained\/api\/","title":{"rendered":"What is an API?"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">An API (application programming interface) is a set of rules that lets one piece of software ask another for information or for a task to be done. It works like a menu: it lists what you can request and how to ask, without showing you how the kitchen works.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How it works<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Most apps are built from many separate pieces of software that need to talk to each other. An API is the agreed way of doing that. One program, often called the client, sends a request. The other program, often called the server, reads the request, does the work and sends back a response.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The API spells out exactly which requests are allowed. For each one it says what to send, such as a city name or a product number, and what will come back, such as a weather forecast or a price. If the request follows the rules, the answer comes back in a predictable format that the client can read. If it doesn&#8217;t, the client gets an error message instead.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">On the web, many APIs use the same technology as websites. The app sends a request to a web address, and the reply comes back as structured text, often in a format called JSON, which is easy for programs to read. Many APIs also ask for a key, a bit like a password, so the provider knows who is asking and can limit how often each app makes requests.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The important idea is separation. The app asking for data doesn&#8217;t need to know how the other system stores it or works it out. It only needs to know how to ask. That means either side can change how it works inside, as long as it keeps answering the same requests in the same way.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">An everyday example<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Think about a travel booking site that shows flights from several airlines on one page. The booking site doesn&#8217;t own those airlines&#8217; computers. Instead, it sends a request to each airline&#8217;s API: &#8220;Which flights go from London to Paris on this date, and how much do they cost?&#8221; Each airline&#8217;s system sends back a list, and the booking site puts the answers together on one screen.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The same thing happens when a shopping site lets you pay with a separate payment service, when an app shows a map from a mapping service, or when you sign in to a website using an account you already have somewhere else. In each case, one service is quietly asking another for something through an API.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why it matters<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">APIs are a big reason modern apps can be built quickly. Instead of writing everything from scratch, developers can plug in services that already exist, such as payments, maps, messaging or translation. That saves time and often gives better results, because each service is run by people who specialise in it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">APIs also let different companies&#8217; systems work together safely. The provider decides exactly what is shared and what stays private, and it can switch off access for any app that misuses it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For everyday users, APIs are mostly invisible. But they are why your banking app can show your balance, why the weather widget on your phone updates, and why so many services seem to connect to each other.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Common questions<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Is an API the same as a website?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">No. A website is designed for people to read. An API is designed for programs to read. Some companies offer both: a website for you and an API for other software.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Do I need to know how to code to use an API?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To build something with one directly, usually yes. But you use APIs all the time without coding, every time an app fetches information from somewhere else.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Are APIs safe?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A well-designed API only shares what its owner chooses to share and checks who is asking, often with keys or sign-in tokens. Like any software, it is only as safe as the way it is built and looked after.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Related terms<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Server<\/li>\n\n<li>Client<\/li>\n\n<li>JSON<\/li>\n\n<li>Cloud computing<\/li>\n\n<li>Authentication<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>An API (application programming interface) is a set of rules that lets one piece of software ask another for information or for a task to be done. It works like a menu: it lists what you can request and how to ask, without showing you how the kitchen works. How it works Most apps are [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":53,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"class_list":["post-54","page","type-page","status-publish","hentry"],"_hostinger_reach_plugin_has_subscription_block":false,"_hostinger_reach_plugin_is_elementor":false,"_links":{"self":[{"href":"https:\/\/definitionofthe.com\/blog\/wp-json\/wp\/v2\/pages\/54","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/definitionofthe.com\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/definitionofthe.com\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/definitionofthe.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/definitionofthe.com\/blog\/wp-json\/wp\/v2\/comments?post=54"}],"version-history":[{"count":1,"href":"https:\/\/definitionofthe.com\/blog\/wp-json\/wp\/v2\/pages\/54\/revisions"}],"predecessor-version":[{"id":65,"href":"https:\/\/definitionofthe.com\/blog\/wp-json\/wp\/v2\/pages\/54\/revisions\/65"}],"up":[{"embeddable":true,"href":"https:\/\/definitionofthe.com\/blog\/wp-json\/wp\/v2\/pages\/53"}],"wp:attachment":[{"href":"https:\/\/definitionofthe.com\/blog\/wp-json\/wp\/v2\/media?parent=54"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}