From the course: JavaScript: Ajax and Fetch

Unlock this course with a free trial

Join today to access over 25,600 courses taught by industry experts.

Solution: Research an API and create a request URL

Solution: Research an API and create a request URL - JavaScript Tutorial

From the course: JavaScript: Ajax and Fetch

Solution: Research an API and create a request URL

The National Park Service API is free for a reasonable volume of requests, but it requires use of an API key. I'll start by clicking the link to sign up for one, and there's a form to complete, so I'll complete that. And click Sign up. And I'll check my email for that API key. And when I receive it I'll copy that and put it in my password manager. I checked my email and it got the API key that the National Park Service sent me, and I saved it in my password manager as a secure note. And so now I have that API key saved and ready to make a request. Next, I need to learn about what data the API offers, and scrolling up to the top I see documentation. So I'm going to open that up. And as I scroll down there's a list of endpoints and each one describes the data that it returns. Now I'm looking for a list of parks in a specific state. So scrolling through this list I notice that there's a slash parks endpoint, and when I look at the description, it says that it provides parks related data.…

Contents