[{"data":1,"prerenderedAt":173},["ShallowReactive",2],{"term-a\u002Fapi":3,"related-a\u002Fapi":154},{"id":4,"title":5,"acronym":6,"body":7,"category":133,"description":134,"difficulty":135,"extension":136,"letter":137,"meta":138,"navigation":139,"path":140,"related":141,"seo":147,"sitemap":148,"stem":151,"subcategory":152,"__hash__":153},"terms\u002Fterms\u002Fa\u002Fapi.md","API","Application Programming Interface",{"type":8,"value":9,"toc":127},"minimark",[10,15,19,23,26,30,116,120,123],[11,12,14],"h2",{"id":13},"eli5-the-vibe-check","ELI5 — The Vibe Check",[16,17,18],"p",{},"An API is like a menu at a restaurant. The kitchen (server) can do a bunch of things, but you can only order what's on the menu. The API is the list of things you're allowed to ask for and exactly how to ask.",[11,20,22],{"id":21},"real-talk","Real Talk",[16,24,25],{},"An API is a defined set of rules and protocols that allows different software applications to communicate with each other. It specifies what requests can be made, how to make them, and what responses to expect, abstracting away the underlying implementation.",[11,27,29],{"id":28},"show-me-the-code","Show Me The Code",[31,32,37],"pre",{"className":33,"code":34,"language":35,"meta":36,"style":36},"language-javascript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F Calling a weather API\nconst res = await fetch('https:\u002F\u002Fapi.weather.com\u002Fv1\u002Fcurrent?city=London');\nconst data = await res.json();\n","javascript","",[38,39,40,49,90],"code",{"__ignoreMap":36},[41,42,45],"span",{"class":43,"line":44},"line",1,[41,46,48],{"class":47},"sHwdD","\u002F\u002F Calling a weather API\n",[41,50,52,56,60,64,68,72,75,78,82,84,87],{"class":43,"line":51},2,[41,53,55],{"class":54},"spNyl","const",[41,57,59],{"class":58},"sTEyZ"," res ",[41,61,63],{"class":62},"sMK4o","=",[41,65,67],{"class":66},"s7zQu"," await",[41,69,71],{"class":70},"s2Zo4"," fetch",[41,73,74],{"class":58},"(",[41,76,77],{"class":62},"'",[41,79,81],{"class":80},"sfazB","https:\u002F\u002Fapi.weather.com\u002Fv1\u002Fcurrent?city=London",[41,83,77],{"class":62},[41,85,86],{"class":58},")",[41,88,89],{"class":62},";\n",[41,91,93,95,98,100,102,105,108,111,114],{"class":43,"line":92},3,[41,94,55],{"class":54},[41,96,97],{"class":58}," data ",[41,99,63],{"class":62},[41,101,67],{"class":66},[41,103,104],{"class":58}," res",[41,106,107],{"class":62},".",[41,109,110],{"class":70},"json",[41,112,113],{"class":58},"()",[41,115,89],{"class":62},[11,117,119],{"id":118},"when-youll-hear-this","When You'll Hear This",[16,121,122],{},"\"We need to integrate the Stripe API for payments.\" \u002F \"What does the API return when the user doesn't exist?\"",[124,125,126],"style",{},"html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":36,"searchDepth":51,"depth":51,"links":128},[129,130,131,132],{"id":13,"depth":51,"text":14},{"id":21,"depth":51,"text":22},{"id":28,"depth":51,"text":29},{"id":118,"depth":51,"text":119},"backend","An API is like a menu at a restaurant. The kitchen (server) can do a bunch of things, but you can only order what's on the menu.","beginner","md","a",{},true,"\u002Fterms\u002Fa\u002Fapi",[142,143,144,145,146],"REST","GraphQL","Endpoint","Request","Response",{"title":5,"description":134},{"changefreq":149,"priority":150},"weekly",0.7,"terms\u002Fa\u002Fapi",null,"REBtmhhxNWyr4Jo588nqsp-XRJruafv_skduJy4NUCs",[155,158,162,166,169],{"title":144,"path":156,"acronym":152,"category":133,"difficulty":135,"description":157},"\u002Fterms\u002Fe\u002Fendpoint","An endpoint is a specific URL that your API listens on for requests.",{"title":143,"path":159,"acronym":152,"category":133,"difficulty":160,"description":161},"\u002Fterms\u002Fg\u002Fgraphql","intermediate","GraphQL is like ordering food where YOU specify exactly what you want on your plate.",{"title":145,"path":163,"acronym":152,"category":164,"difficulty":135,"description":165},"\u002Fterms\u002Fr\u002Frequest","networking","A request is what your browser (or app) sends to a server when it wants something. 'Give me the homepage.' 'Give me that image.",{"title":146,"path":167,"acronym":152,"category":164,"difficulty":135,"description":168},"\u002Fterms\u002Fr\u002Fresponse","A response is what the server sends back after receiving a request.",{"title":142,"path":170,"acronym":171,"category":133,"difficulty":135,"description":172},"\u002Fterms\u002Fr\u002Frest","Representational State Transfer","REST is a set of rules for how APIs should behave. Think of it as the etiquette guide for servers and clients talking to each other.",1776518249386]