NPS API

Government API · Works in USA · National parks data · Free API key required

TL;DR

The National Park Service API provides official data for all 400+ US national park units. Access park information (descriptions, directions, hours), alerts (closures, hazards, warnings), campground details and availability, visitor center information, and educational materials. Search by park code, state, or activity. JSON format. Free API key from NPS. An essential resource for outdoor recreation apps, trip planners, and environmental education platforms.

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

How to Use This API

1. Get Park Information

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

2. Current Alerts for a Park

https://developer.nps.gov/api/v1/alerts?parkCode=yell&api_key=YOUR_API_KEY

3. JavaScript — Park Details

fetch('https://developer.nps.gov/api/v1/parks?parkCode=acad&api_key=YOUR_KEY')
  .then(r => r.json())
  .then(data => {
    const park = data.data[0];
    console.log(`Park: ${park.fullName}`);
    console.log(`State: ${park.states}`);
    console.log(`Description: ${park.description}`);
    console.log(`Activities: ${park.activities.map(a => a.name).join(', ')}`);
    console.log(`Weather: ${park.weatherInfo}`);
  });

4. Python — Find Parks by State

import requests

params = {
    'stateCode': 'CA',
    'limit': 10,
    'api_key': 'YOUR_API_KEY'
}
data = requests.get(
    'https://developer.nps.gov/api/v1/parks', params=params
).json()

print(f"National Parks in California:")
for p in data['data']:
    url = p.get('url', 'N/A')
    print(f"  {p['fullName']} ({p['parkCode']})")
    print(f"    {url}")
Acadia National Park: https://developer.nps.gov/api/v1/parks?parkCode=acad

Frequently Asked Questions

What endpoints are available?
Parks, campgrounds, alerts, events, visitor centers, articles, news releases, lesson plans, people, and places. Full list in the NPS API documentation.
How do I find park codes?
Each park has a unique 4-character park code (e.g., "acad" for Acadia, "yell" for Yellowstone, "grca" for Grand Canyon). The API returns these in park listings.
What campground data is available?
Campground name, description, number of sites, amenities (water, electricity, sewer), reservation URL, fees, operating seasons, and accessibility information.
What type of alerts are available?
Closures, warnings, hazards, advisories, and seasonal notices. Each alert includes a title, description, category, and effective date range.
How do I get an API key?
Register for a free API key at the NPS Developer Portal (nps.gov/subjects/developer). Registration is free and instant via email.
Are there usage limits?
The NPS API has rate limits for free tier users. If you need higher limits, contact the NPS developer team. Caching responses is recommended.

API Details

API URL
https://developer.nps.gov/api/v1
Documentation
NPS API Documentation
Category
Government
Authentication
Free API Key
Geographic Coverage
United States — All NPS units (national parks, monuments, historic sites, seashores, etc.)

What You Can Build