{"id":331907,"date":"2021-08-29T15:00:00","date_gmt":"2021-08-29T12:00:00","guid":{"rendered":"https:\/\/en.buradabiliyorum.com\/what-is-an-api-and-how-do-developers-use-them\/"},"modified":"2022-10-09T13:33:49","modified_gmt":"2022-10-09T10:33:49","slug":"what-is-an-api-and-how-do-developers-use-them","status":"publish","type":"post","link":"https:\/\/buradabiliyorum.com\/en\/what-is-an-api-and-how-do-developers-use-them\/","title":{"rendered":"#What Is an API, and How Do Developers Use Them?"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_84 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a2e3ffa0377b\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #dd3333;color:#dd3333\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #dd3333;color:#dd3333\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a2e3ffa0377b\" checked aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/buradabiliyorum.com\/en\/what-is-an-api-and-how-do-developers-use-them\/#What_Is_an_Application_Programming_Interface\" >What Is an Application Programming Interface<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/buradabiliyorum.com\/en\/what-is-an-api-and-how-do-developers-use-them\/#APIs_Make_Life_Easier_for_Developers\" >APIs Make Life Easier for Developers<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/buradabiliyorum.com\/en\/what-is-an-api-and-how-do-developers-use-them\/#APIs_Control_Access_to_Resources\" >APIs Control Access to Resources<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/buradabiliyorum.com\/en\/what-is-an-api-and-how-do-developers-use-them\/#APIs_Are_Used_For_Communication_Between_Services\" >APIs Are Used For Communication Between Services<\/a><\/li><\/ul><\/nav><\/div>\n<figure style=\"width: 1200px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2018\/03\/api-defined-as-application-program-interface.jpeg?width=1198&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1\" width=\"1200\" height=\"675\" \/><figcaption class=\"wp-caption-text\">patpitchaya\/Shutterstock.com<\/figcaption><\/figure>\n<p>You\u2019ve likely seen the term \u201cAPI\u201d come up. Operating system, web browser, and <a href=\"https:\/\/buradabiliyorum.com\/en\/category\/download-scripts-themes-apps\/\" data-internallinksmanager029f6b8e52c=\"9\" title=\"Download Scripts &amp; Themes &amp; Apps\" target=\"_blank\" rel=\"noopener\">app<\/a> updates often announce new APIs for developers. But what is an API and how do developers utilize them?<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"What_Is_an_Application_Programming_Interface\"><\/span>What Is an Application Programming Interface<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The term API is an acronym, and it stands for \u201cApplication Programming Interface.\u201d<\/p>\n<p>Think of an API like a menu in a restaurant. The menu provides a list of dishes you can order, along with a description of each dish. When you specify what menu items you want, the restaurant\u2019s kitchen does the work and provides you with some finished dishes. You don\u2019t know exactly how the restaurant prepares that food, and you don\u2019t really need to.<\/p>\n<div class=\"future_hybrid_paragraph_first\"><\/div>\n<p>Similarly, an API lists a bunch of operations that developers can use, along with a description of what they do. The developer doesn\u2019t necessarily need to know how, for example, an operating system builds and presents a \u201cSave As\u201d dialog box. They just need to know that it\u2019s available for use in their app.<\/p>\n<p>This isn\u2019t a perfect metaphor, as developers may have to provide their own data to the API to get the results, so perhaps it\u2019s more like a fancy restaurant where you can provide some of your own ingredients the kitchen will work with.<\/p>\n<p>But it\u2019s broadly accurate. APIs allow developers to save time by taking advantage of a platform\u2019s implementation to do the nitty-gritty work. This helps reduce the amount of code developers need to create, and also helps create more consistency across apps for the same platform. APIs can control access to hardware and software resources.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"APIs_Make_Life_Easier_for_Developers\"><\/span>APIs Make Life Easier for Developers<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Let\u2019s say you want to develop an app for an iPhone. Apple\u2019s iOS operating system provides a large number of\u00a0<a href=\"https:\/\/developer.apple.com\/api-changes\/\" target=\"_blank\" rel=\"noopener\">APIs<\/a>\u2014as every other operating system does\u2014to make this easier on you.<\/p>\n<p>If you want to embed a web browser to show one or more web pages, for example, you don\u2019t have to program your own web browser from scratch just for your application. You use the\u00a0<a href=\"https:\/\/developer.apple.com\/documentation\/webkit\/wkwebview\" target=\"_blank\" rel=\"noopener\">WKWebView<\/a>\u00a0API to embed a WebKit (Safari) browser object in your application.<\/p>\n<p>If you want to capture photos or video from the iPhone\u2019s camera, you don\u2019t have to write your own camera interface. You use the camera API to embed the iPhone\u2019s built-in camera in your app. If APIs didn\u2019t exist to make this easy, app developers would have to create their own camera software and interpret the camera hardware\u2019s inputs. But Apple\u2019s operating system developers have done all this hard work so the developers can just use the camera API to embed a camera, and then get on with building their app. And, when Apple improves the camera API, all the apps that rely on it will take advantage of that improvement automatically.<\/p>\n<p>This applies to every platform. For example, do you want to create a dialog box on Windows?\u00a0<a href=\"https:\/\/click.linksynergy.com\/deeplink?id=2QzUaswX1as&amp;mid=24542&amp;u1=htg\/343877|xid:fr1665311220aaa&amp;murl=https%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fwindows%2Fdesktop%2Fff818516%28v%3Dvs.85%29.aspx\" target=\"_blank\" rel=\"noopener sponsored\" data-trxnetwork=\"ls\">There\u2019s an API for that<\/a>. Want to support fingerprint authentication on Android?\u00a0<a href=\"https:\/\/developer.android.com\/about\/versions\/marshmallow\/android-6.0.html#fingerprint-authentication\" target=\"_blank\" rel=\"noopener\">There\u2019s an API for that<\/a>, too, so you don\u2019t have to test every different Android manufacturer\u2019s fingerprint sensor. Developers don\u2019t have to reinvent the wheel over and over.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"APIs_Control_Access_to_Resources\"><\/span>APIs Control Access to Resources<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>APIs are also used to control access to hardware devices and software functions that an application may not necessarily have permission to use. That\u2019s why APIs often play a big role in security.<\/p>\n<p>For example, if you\u2019ve ever visited a website and seen a message in your browser that the website is\u00a0asking to see your precise location, that website is attempting to use the geolocation API in your web browser. Web browsers expose APIs like this to make it easy for web developers to access your location\u2014they can just ask \u201cwhere are you?\u201d and the browser does the hard work of accessing GPS or nearby Wi-Fi networks to find your physical location.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-346192 size-full\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2018\/03\/img_5aaafd75266c7.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"The Google Maps website asking for location permission\" width=\"650\" height=\"355\" \/><\/p>\n<p>However, browsers also expose this information via an API because it\u2019s possible to control access to it. When a website wants access to your exact physical location, the only way they can get it is via the location API. And, when a website tries to use it, you\u2014the user\u2014can choose to allow or deny this request. The only way to access hardware resources like the GPS sensor is through the API, so the browser can control access to the hardware and limit what apps can do.<\/p>\n<p>This same principle is used on modern mobile operating systems like iOS and Android, where mobile apps have permissions that can be enforced by controlling access to APIs. For example, if a developer tries to access the camera via the camera API, you can deny the permission request and the app has no way of accessing your device\u2019s camera.<\/p>\n<p>File systems that use permissions\u2014as they do on Windows, Mac, and Linux\u2014have those permissions enforced by the file system API. A typical application doesn\u2019t have direct access to the raw physical hard disk. Instead, the app must access files through an API.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"APIs_Are_Used_For_Communication_Between_Services\"><\/span>APIs Are Used For Communication Between Services<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>APIs are used for all kinds of other reasons, too. For example, if you\u2019ve ever seen a Google Maps object embedded on a website, that website is using the Google Maps API to embed that map. Google exposes APIs like this to web developers, who can then use the APIs to plop complex objects right on their website. If APIs like this didn\u2019t exist, developers might have to create their own maps and provide their own map data just to put a little interactive map on a website.<\/p>\n<p>And, because it\u2019s an API, Google can control access to Google Maps on third-party websites, ensuring they use it in a consistent way rather than attempting to messily embed a frame that shows the Google Maps website, for example.<\/p>\n<p>This applies to many different online services. There are APIs for requesting text translation from Google Translate, or embedding <a href=\"https:\/\/buradabiliyorum.com\/en\/category\/social-mediaa\/\" data-internallinksmanager029f6b8e52c=\"1\" title=\"Social Media\" target=\"_blank\" rel=\"noopener\">Facebook<\/a> comments or tweets from Twitter on a website.<\/p>\n<p>The\u00a0OAuth standard\u00a0also defines a number of APIs that allow you to sign into a website with another service\u2014for example, to use your Facebook, Google, or Twitter accounts to sign into a new website without creating a new user account just for that site. APIs are standard contracts that define how developers communicate with a service, and the kind of output those developers should expect to receive back.<\/p>\n<hr \/>\n<p>If you\u2019ve gotten through this, you\u2019ll have a better idea of what an API is. Ultimately, you don\u2019t really need to know what an API is unless you\u2019re a developer. But, if you see a software platform or service has added new APIs for various hardware or services, it should be easier for developers to take advantage of such features.<\/p>\n<p><strong>REVIEWED BY JUSTIN DUINO<\/strong><\/p>\n<p><strong>Related article :\u00a0\u00a0<a href=\"https:\/\/nocodeapi.com\" target=\"_blank\" rel=\"noopener\">The easiest way to connect with APIs<\/a><\/strong><\/p>\n<blockquote><p><strong><span style=\"color: #ff6600;\">If you liked the article, do not forget to share it with your friends. Follow us on\u00a0<span style=\"color: #ff0000;\"><a style=\"color: #ff0000;\" href=\"https:\/\/news.google.com\/publications\/CAAqBwgKMLG0nwswvr63Aw\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Google News<\/a><\/span>\u00a0too, click on the star and choose us from your favorites.<\/span><\/strong><\/p><\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\">For forums sites go to <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/forum.buradabiliyorum.com\/\" target=\"_blank\" rel=\"noopener\">Forum.BuradaBiliyorum.Com<\/a><\/span><\/p>\n<\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\"><strong>If you want to read more like this article, you can visit our <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/en.buradabiliyorum.com\/technology\/\" target=\"_blank\" rel=\"noopener\">Technology category.<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<p><span style=\"color: black;\"><a style=\"color: #ff9900;\" href=\"https:\/\/www.howtogeek.com\/343877\/what-is-an-api\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>You\u2019ve likely seen the term \u201cAPI\u201d come up. Operating system, web browser, and app updates often announce new APIs for developers. But what is an API and how do developers utilize them? What Is an Application Programming Interface The term API is an acronym, and it stands for \u201cApplication Programming Interface.\u201d Think of an API&#8230;<\/p>\n","protected":false},"author":1,"featured_media":331908,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2018\/03\/api-defined-as-application-program-interface.jpeg?height=200p&trim=2,2,2,2","fifu_image_alt":"#What Is an API, and How Do Developers Use Them?","footnotes":""},"categories":[18],"tags":[134012,134011,134010,134007,134008,134009],"class_list":["post-331907","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology","tag-apis-are-used-for-communication-between-services","tag-apis-control-access-to-resources","tag-apis-make-life-easier-for-developers","tag-the-easiest-way-to-connect-with-apis","tag-what-is-an-api-and-how-do-developers-use-them","tag-what-is-an-application-programming-interface"],"_links":{"self":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/331907","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/comments?post=331907"}],"version-history":[{"count":0,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/331907\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media\/331908"}],"wp:attachment":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media?parent=331907"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/categories?post=331907"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/tags?post=331907"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}