In this video, I will show you how to make calls to the Foursquare API to search for venues, learn more about particular venues, and explore Foursquare users. So let's get started. Communicating with the Foursquare database is really very easy, all thanks to their RESTful API. You simply create a uniform resource identifier, or URI, and you append it with extra parameters depending on the data that you are seeking from the database. Any call request you make is composed of, we can call this base URI, which is api.foursquare.com/v2, and you can request data about venues, users, or tips. But, every time you make a call request, you have to pass your developer account credentials, which are your Client ID and Client Secret as well as what is called the version of the API, which is simply a date. It is designed to give developers the freedom to adapt to Foursquare API changes on their own schedule. In other words, you request the data to be returned to you in the format that was the latest up to the date defined by the version. In one of the previous videos, we used Foursquare.com to search for coffee shops around the Conrad Hotel. How can we do that using the Foursquare API? Well it is simple. You simply create a URI starting with the base URI, and since you're searching for venues, you use the venues group. And remember you always have to pass your Foursquare credentials along with the version of the API. Again because we're searching for a particular type of venues, we use the search endpoint and pass the address of the Conrad Hotel as its latitude and longitude coordinates along with the search query for coffee shops. This completes our URI, so we make the call to the database, and in return we get a JSON file of the venues that match our query. Remember, this is a regular call and with a personal developer account, we can make up to 99,500 similar calls. For each venue, we get mostly its name, unique ID, location, and category. Each venue added to the database is assigned a unique ID. In the same previous video, we decided to learn more about one of the coffee shops that were returned by Foursquare, namely Kaffe 1668. Now how can we do that using the Foursquare API? Again it is very simple; it's only a matter of creating a URI with all the correct parameters. In this case, we're still dealing with venues, so we append the base URI with the venues group along with our credentials and the API version and then, we simply add Kaffe 166'0s unique ID to the URI. And that's it. This completes our URI, so we make the call to the Foursquare database and in return, we receive a JSON file containing all the information the database has about Kaffe 1668. Actually with a personal account, we only get two tips and photos per venue and not the entire list of tips. And remember, that this type of call is premium so with a personal account we can only make 500 similar calls per day. When we run this query for any venue, we mostly get the venue's name, URL or website if they have an online presence, unique ID again, average rating, location, contact information,menu, and statistics in terms of the number of check-ins, and finally, tips posted about the venue. The next thing we did was check out the tips posted about Kaffe 1668. Doing that using the Foursquare API is pretty simple. You build the same exact URI as the one you built to learn more about the venue itself, but then you append the unique ID with the tips endpoint. Then you proceed as usual; you make the call to the database and in return you get a JSON file with only two tips since we have a personal account. And remember that with premium calls you're limited to 500 calls per day. Another thing we did when exploring Foursquare.com was exploring a Foursquare user. In the video, we explored the page of Jessica whose tip was the first in the tips section of Kaffe 1668. How can you get all the information about a user using the API? It's basically the same concept as querying for venues except that instead of using the venues group we use the users group. And along with our credentials and the API version, we append the user's group with the unique ID of the user. Just like venues, also each Foursquare user is assigned a unique ID, which is essentially used to retrieve all the information pertaining to them. Now calls made to retrieve information about users are regular calls, so with a personal account we can make up to 99,500 similar calls per day. The database returns a JSON file containing all the data it has about the user. For each user, we mostly get their first and last name, their gender, contact information, unique ID, any Foursquare friends they have, and their tips. In the next video, we will learn how to make calls to explore a location and how to retrieve trending venues around a given location. So I'll see you in the next video.