apis may sound like Tech jargon but they're really the secret sauce behind everything that you do on the internet every day in this video I'm breaking down apis so simply that anyone can understand them and then we're going to hop into nadn and go through some examples by the end you'll see how apis can transform your workflows even if you're a complete beginner let's dive in okay so today we're going to be understanding apis and we're going to have a specific tailor towards understanding apis within naden naden has a ton of Integrations so a lot
of times you won't even need to use an API because they have built-in Integrations for all the apps that you may use every day like email calendar um Twitter LinkedIn all that kind of stuff but if you do need to access some sort of third party API you'll see how to do it in this video first things first what is an API API stands for application programming interface and it's just a set of rules and protocols that allows different software applications to communicate with each other and send data back and forth that sort of thing
simply put an API is what allows nadn to talk to your email or for calendar to talk to your nadn so a quick real world analogy because everything's better with a real world analogy let's pretend this guy right here is you and you want to order food at a restaurant so think of the API as the waiter in a restaurant you tell the waiter what you want the waiter then communicates your order to the kitchen or to the restaurant and then the restaurant prepares the information that you wanted or the dish that you asked for
and then it takes the request back all the way to you and Returns the food to you or not returns but gives you the food so that's sort of the real world analogy hopefully that made sense so we have two entities we have View and then we have the kitchen and we just need a method for the two entities to be able to exchange information that's an API now why are apis useful apis enable seamless integration between different software systems like we talked about and this allows them to share data and functionalities between each other
so this is important for Building Systems or applications because it allows us to leverage existing Services rather than having to build things from scratch so let's say we wanted to convert miles to kilom instead of having to build out that calculation we could just leverage a different third party API that already does that we could just send information to it and then wait for the response back rather than having to you know build out that whole infrastructure from scratch okay so if the concept hasn't stuck yet let's look at some real world examples so weather
data integration many websites and apps display current weather information by leveraging apis provided by weather services so for example a travel app may show you real-time weather updates because it's fetching data from a weather API then we have social media sharing so when you share a news article directly to Facebook or X from a website you're using that social media platform's API the API allows the website to communicate with the social media platform to post on your behalf then we have stuff like Payment Processing you know e-commerce sites often use payment gateways like PayPal or
stripe and these Services provide apis that handle the complexities of payment processing these enable the e-commerce site to securely process your transactions without handling sensitive payment information directly because they just use the API to talk to each other then our last real world example third party logins something you've done probably a million times websites often allow users to log in using their Google or Facebook accounts and this is facilitated by the respective platforms API which authenticates the user grants access without having to create a new account okay moving on to API methods this stuff may
look like it's going to get a little technical but it's really not you've got different methods here and I wanted to point out that get and post are underlined this is because 99% of the time that you are accessing some sort of API endpoint you're going to be using a git or a post um but let's break down all of them just in case so a git is when you want to retrieve data so an action for this could be like give me the current weather when you're reaching out to a weather API and an
analogy for this is just reading a book you're just getting information then we have a post which is you're sending data to um you know create something or get something back you're sending information so an action would be here's policy information and an analogy for this would be you're sending a letter then we've got put which is if you want to update existing data so you would be replacing this completely and that would be like replacing Pages within a book we've got patch which is partially updating data you know just kind of patching it you'd
be tweaking this part and that would be like editing a single word within a book or within a page then we've got delete which is to remove data obviously the action here would just be erase this it would be like tearing out a page out of a book and so those are pretty much the main five methods of rest apis which I'll talk about rest apis okay so so rest API stands for representational State transfer API and it's just a way for different software systems to communicate over the web using a standard HTTP request like
get post put and delete so it organizes its data into resources which is accessible through a unique URL and this will make a lot more sense once we get into naden and we actually look at these URLs but basically for every action you have there's going to be a different API endpoint which is just the URL that you would see up top when you're like typing something into Google there's going to be different parameters at the end of them based on what type of action you want to take like I said it'll make more sense
when we get into it anyways rest apis are stateless which just means that each request is independent they follow consistent patterns which makes them really simple and scalable and also they're widely supported for different Integrations across various platforms now we're going to get into some examples within nadn and this is really crucial because apis play such an important role when you're sort of automating workflows for example you could have a workflow that triggers when you receive an email which would be using the email services apii to get information back from that email provider then you
could process the content and then if you want to store it into a database you would be sending a post request to that database's API in order to send information to the database from Ann so this inner connectedness allows for efficient automation integrating different services and really removing the manual touch point out of that process so like I said understanding apis is very fundamental for creating effective workflows and once you get a good understanding of it the possibilities of what you can do in NN are truly endless okay so for example number one we're going
to be sending a git request to open weather map API so we're going to be asking for information back about the current weather in some sort of city so in NN when you want to access an API endpoint you're going to do that through an HTTP request node so you can see that we have that right here if you come into the plus button and type in HTTP you can see HTTP request so that's what we've got set up right here if we click into it we can see that we have a method so our
method here is get because like I said we want to access this URL of open weather map and we want to get information back so anytime that you're accessing a third party API you want to look at the documentation for that API the documentation are going to show you the different endpoints it's going to show you the different parameters and it's going to show you the way that you can make the request to either get the information you want or send the information you want so what we're looking at right here is the open weather
map apis documentation so as you can see what we want to do is call current weather data this is showing us how to make an API call this is the API endpoint that we need and then it's showing us parameters to send off in our request so the first thing you notice is that we have three required parameters we have the latitude the longitude and the app ID which is just we need to enter in an API key basically to um let open weather map know that we have access to this information so um you
can see this is the the information that we need so we copy this link we put this within our URL and you can see I filled in the latitude the LA longitude and I filled in the API key so based on this information that's the stuff that's required and then we also see that there's optional Fields so you could um select the mode you could select the units and so what I did was I grabbed the units it's a parameter that we're putting in and I wanted the units to be shown Imperial so in here
you can see we have um here actually let me just make this a little bigger so we have lat right there 41 we have longitude which is 87 we have units which I put Imperial and then we have our app ID which is just our API key and so if you want to follow along you'll go to open Weather make an account um and then when you go to your account up here you'll click on my API keys and then you'll copy this value right here and that is what's going to go in the API
key section of this endpoint request so now that I filled in this information we will hit test step and you can see that we get um the information back and this is all the information I put in the latitude and longitudes of Chicago and so this was our request it successfully went through we sent that off to open weather map and then it came back to us with information so then all I did was I just hooked up a message a model to um summarize that information we're getting um just so we can show it
in a clean format so basically we sent off that request and then we end up getting hello there in Lovely Chicago today the sky is draped in cozy overcast clouds um calm and soft Vibe um about 48.9 de fhe the air is humid 53% gentle breeze blah blah blah so um that's that's all that's going on here real quick just wanted to say that this workflow as you can see we're going to be running through some different examples but this workflow will be available for download in my free school Community Link for that will be
down in the description if you want to go a little farther with nadn you want to hop on live weekly calls with me and members of the community check out my paid Community also will be linked down below and then if you're looking for me to help you build out this sort of stuff in your business or AI Consulting then book a call on my website which is also linked down below but let's get back to the video um so what I wanted to show you here is yes we just accessed open weather API and
we got the weather but what's really cool is that NN obviously has a ton of Integrations so they actually have an integration for open weather map API You' come in here um this is where you put your API key you create a credential um our operation is we're looking for weather we have a format we can select the location so this is doing the exact same thing that we just did within our HTTP request as you can see we're getting back the exact same information for Chicago but it just made it a lot easier because
we have like Dragon drop fields or not Dragon drop we have collapsible fields that we can just choose information from rather than having to configure an HTTP request with different parameters and different credentials so most of the time um NN is going to have a lot of Integrations but that's why I said if you need to access some sort of third party API you'll go to the docs and then you'll just have to read about how you configure your request okay example number two we're going to do another git request and we're using Json placeholder
API which is just a free rest API online where you can just you know test out how it works when you want to get information back so if we go to Json placeholder documentation we can see um you know the specs that we need so this is the um this is the API endpoint we're accessing https Json placeholder.svg test step and we're going to get a ton of random HTML that's just not very um readable or important to us so as you remember in here we can see there's different resources we can access within Json
placeholder so if we want to grab SL posts we throw this at the end of our API endpoint that we're trying to access now we have a new unique um rest API we'll hit test step and now we can see we got 100 items and we basically just got 100 posts of gibberish as you can see this is all just fake information back into the placeholder we can see that if we did a different one we did SL comments we're going to get 500 comments back we'll hop back into here change our API endpoint that
we're accessing and now we're getting comments back we're getting 500 comments back from Json placeholder so this is just an example of you know another way that you can set up your url different ways that you have different endpoints to access um in this case we didn't really have to fill in any parameters but a lot of times you will have to do that usually something with like an API key or um different information information you'll see in this next example we're going to be sending information with a post request to get articles back now
in this final example I said we were going to be doing a post request so we're going to be sending a request to tavali which is just kind of a super cool search API we'll be sending information over as far as what we want to look for and then it's going to go out get that information based on the information we send it and then bring back some articles for us so um I'll hit this test workflow we can see it happen real quick we just sent off a query it's going to search the internet
based on our query and then summarize the articles for us so we can read it better but let's hop into the actual post request so if we go back into Tav um we can see the documentation for API reference for the rest API of course um this is the base URL as you can see the tabl search and extract rest API can be accessed through this base URL so we put this base URL right here into our tavali and then all we had to do was add the endpoint of Slash search because we are searching
for a specific information so we added that endpoint which is a post request and now we can see the different parameters that we need so the two required parameters are query which is the search query that you want to execute within Tav so if you were to go to Google and you were to type in something that's the query that we're sending to Tavy and then of course we need an API key and that's also required and then we have optional things so we have like Max results if you only want to get Five results
back if you only want to get three results back if you want to include images all this kind of stuff um we also did did where is it topic so for topic we could put general or news and so I went in there and put news and I'll show you guys this so query API key topic and I think we also maybe include Max results but here is our post request so we're sending over our API key of course that just basically gives us access to hit this third party API if I didn't put this
in it would just deny our request the query we're looking for top trends in AI we wanted to put topic equals news and then we also put Max equals three so we're going to be getting really relevant news articles from tavali and it's also going to only give us three results because this is the information we're sending it to actually go make that request and then it's going to send us the results back so um as you can see we already got we already had this executed so then we had open a take those articles
and summarize them for us just so it's easier for us to read as you can see we got three articles back actually let me show you in here it's a little easier to see right here we have URL one UR URL 2 URL 3 so those are the three articles we got back and then we just had it summarize it for us so um the Articles collectively EMP emphasize the pervasive impact of artificial intelligence across various sectors highlighting its transformative role the first article explains blank the second article discusses blank The Third Article lastly The
Third Article previews the BL blah blah okay so as you can see it took those three articles and summarized them but the main point was just that we sent off this request about AI um we wanted news and we wanted three results and that's how it came back for us now that we understand what apis are I just wanted to touch on how cool it is that naden has so many Integrations so something like Gmail if we wanted to send a message we have this right here that we can configure all we have to do
is set up the two the subject the message and the operation rather than setting up an HTTP request where we're accessing Gmail and then within Gmail we're accessing an endpoint to send a message and then within that endpoint we're setting up parameters of who's going to what's the subject what's it going to say um all that kind of stuff same thing with air table sheets calendar and all of these other apps that you can take action in in nadn which there's just a ton of Integrations all of these if they didn't have these Integrations where
you could just go in and really easily configure what you're looking for you'd have to set up an HTTP request with different endpoints and different parameters so it's really cool that they have all these Integrations but it's good to understand that when you're doing these things all you're doing is you're making an HTTP request to or sorry you're making an a request to an endpoint an API endpoint so it's really good to understand that and the three main benefits here are these are really easy to use it's going to save you a lot of time
and it's going to save you a lot of Errors because you know when you get into the documentation of looking at API endpoints you may have a few headaches as far as um your API key had an extra space in it so it didn't work or your parameters weren't configured correctly stuff like that so these Integrations are um really Lifesavers anyways that's going to be it for this video like I said if you want to get in here and just play around with these examples I made the workflow will be available for download in the
free schol Community Linked In the description but I really appreciate you guys making it all the way to the end of this one if you enjoyed the video please give it a like definitely helps me out and I will see you guys in the next one thanks