Get Started with the NPS API

https://www.nps.gov/subjects/developer/get-started.htm

The National Park Service application program interface (NPS API) provides authoritative NPS data that you can use in your apps, maps, and websites. To access that data, you need an API key.

The process is free and easy. Just fill out the following form.

Your API key for asawin.krongprasert@gmail.com is:

YqrfhSKgJomJG1s4F1ND4NVbtHBHOJyg0TmPZ7Ya

You can start using this key to make web service requests. Simply pass your key in the URL when making a web request. Here’s an example:

https://developer.nps.gov/api/v1/parks?parkCode=acad&api_key=YqrfhSKgJomJG1s4F1ND4NVbtHBHOJyg0TmPZ7Ya

https://developer.nps.gov/api/v1/parks?stateCode=hi&api_key=YqrfhSKgJomJG1s4F1ND4NVbtHBHOJyg0TmPZ7Ya

Thank you for registering to use the NPS API. To get started using the NPS API for your apps, maps, and websites, please visit the NPS API guides.

For additional support, please contact us. When contacting us, please tell us what API you’re accessing and provide the following account details so we can quickly find you:

Account Email: asawin.krongprasert@gmail.com
Account ID: 9da3948a-b6ca-4483-8e00-5ca5c918b67c

Once you obtain your API key, you may begin making API requests.

Each API request contains:

  • Resource Endpoint
  • Query String Parameters
  • HTTP Request Header with an API Key

For example, consider the following URL:
https://developer.nps.gov/api/v1/alerts?parkCode=acad,dena

In the above request, two of the three necessary components are represented.

  • Resource Endpoint – https://developer.nps.gov/api/v1/alerts
  • Query String Parameters – parkCode=acad,dena

However, just pasting that URL in a browser address bar won’t return any results as you also need to send your API key in the HTTP request header. In order to learn more about that, be sure to read the API Guides page about authentication. Also, test out queries and learn more about the API in the API Documentation section of this website.

Good luck with your programming project and thanks for using NPS data.

Leave a Comment