# National Park Service Scraper (`parseforge/nps-parks-api-scraper`) Actor

Scrapes National Park Service data for parks, alerts, campgrounds, events, and fees. Returns each record as a flat row with official NPS fields.

- **URL**: https://apify.com/parseforge/nps-parks-api-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Travel, Business, Other
- **Stats:** 2 total users, 1 monthly users, 90.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.75 / 1,000 result items

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

[![ParseForge](https://raw.githubusercontent.com/ParseForge/apify-assets/main/banner.jpg)](https://apify.com/parseforge?fpr=vmoqkp)

### National Park Service Scraper

**Scrape National Park Service data for parks, alerts, campgrounds, events, and fees, up to a million records per run.** Every record comes with its official NPS fields, ready for CSV, JSON, Excel, or XML export. No login required.

The National Park Service publishes open data on every park unit, alert, campground, event, and fee, but there is no bulk download button. This Actor reads the official NPS API directly, filters by state, park code, or free-text search, and returns each record in one flat schema. You can export the whole catalog or a single park in minutes.

| Who uses it | What they scrape National Park Service for |
|---|---|
| Travel and outdoor content teams | Build a current database of park units, alerts, and fees for trip-planning content. |
| GIS and mapping analysts | Pull park boundaries, coordinates, and campground locations for spatial analysis. |
| Researchers and journalists | Track closures, advisories, and event schedules across all NPS units. |
| App developers | Populate a park finder or camping app with official NPS data. |
| Marketing analysts | Monitor entrance fee changes and seasonal events by state or park. |

### What it does

This Actor collects records from the National Park Service API for parks, alerts, campgrounds, events, or fees, and returns each one as a flat row.

- 🏞️ **Five datasets:** parks, alerts, campgrounds, events, and entrance or activity fees.
- 🗺️ **State filter:** limit results to one US state or territory, or pull all states.
- 🔍 **Park code filter:** pass comma-separated codes like yose,grca,zion for specific units.
- 📝 **Free-text search:** find parks by name or theme, such as volcano or civil war.
- 🔑 **Optional personal key:** use your own NPS API key for higher rate limits.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

### What you can do with National Park Service data

**🗺️ Build a park finder database.**

A travel app developer runs the Actor with endpoint=parks and no filters to get every NPS unit, then loads the rows into their app's search index.

**🚧 Monitor closures and advisories.**

A park operations analyst schedules a daily run with endpoint=alerts and stateCode=CA to catch new road closures or fire advisories in California parks.

**⛺ Compile campground inventory.**

An outdoor gear retailer pulls endpoint=campgrounds for all states to create a camping guide with official site counts and reservation links.

**🎟️ Track entrance fee changes.**

A travel blogger runs endpoint=fees with searchQuery=yellowstone to update their fee table before publishing a trip budget post.

**📅 Aggregate park events.**

A regional tourism board collects endpoint=events for their state to feed a shared calendar of ranger programs and star parties.

### Why choose this scraper

|  | What you get |
|---|---|
| **Official NPS data** | Records come straight from the National Park Service API, not a third-party scrape. |
| **Five datasets in one Actor** | Switch between parks, alerts, campgrounds, events, and fees without changing tools. |
| **Flat, export-ready rows** | Every record is normalized to a single schema for CSV, JSON, Excel, or XML. |
| **No login required** | The public sample key works out of the box; add your own key for higher limits. |

### How it compares

No other Store actor targets National Park Service the same way, so the honest comparison is with the alternatives teams actually weigh.

| | National Park Service Scraper | Build it in-house | By hand |
|---|---|---|---|
| Setup | Run it now, zero config | Days of engineering | None, but hours per pull |
| When National Park Service changes | Maintained for you | You fix it | You re-learn the page |
| Proxies, retries, anti-bot | Built in | Your problem | Browser only |
| Output | Fixed JSON schema, CSV/Excel export | Whatever you build | Copy-paste |
| Cost | Pay per result | Engineering time | Analyst hours |

### Configure the run

Drive the Actor from the dataset selector, an optional state filter, park codes, and a free-text search, and filters run as each record is read so only matches reach your dataset. The Input tab lists every parameter.

A first run with the defaults:

```json
{
  "maxItems": 10,
  "endpoint": "parks"
}
```

A larger pull:

```json
{
  "maxItems": 200,
  "endpoint": "parks"
}
```

### Pricing

Pay-per-result: **$0.005 per result** collected. You pay only for the results written to your dataset.

| Results collected | Approximate cost |
|---|---|
| 100 results | $0.50 |
| 1,000 results | $5.00 |
| 10,000 results | $50.00 |

New Apify accounts start with $5 in free credit.

### Free users

Free-plan runs return up to 10 results as a preview. [Upgrade your Apify plan](https://console.apify.com/sign-up?fpr=vmoqkp) to collect up to 1,000,000 results per run.

### Run it

1. [Create a free Apify account with $5 in credit](https://console.apify.com/sign-up?fpr=vmoqkp).
2. Open the [National Park Service Scraper](https://apify.com/parseforge/nps-parks-api-scraper?fpr=vmoqkp).
3. Set your inputs and any filters, then click **Start**.
4. Export the results as CSV, Excel, JSON, or XML from the **Dataset** tab.

Run it programmatically through the [Apify API](https://docs.apify.com/api/v2) (`run-sync-get-dataset-items`) or the [ApifyClient](https://docs.apify.com/api/client/js) for JavaScript and Python.

### Use with AI agents (MCP)

Give an AI agent live access to National Park Service through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

```bash
claude mcp add --transport http apify "https://mcp.apify.com/?tools=parseforge/nps-parks-api-scraper"
```

Then prompt it in plain language to run the scraper and read back the results.

### Troubleshooting

**Why am I getting no results?**

Check your filters. If you set a stateCode and a parkCode that do not overlap, the API returns nothing. Try clearing the parkCode or searchQuery fields and run again.

**Why did the run stop before reaching maxItems?**

The NPS API may have rate limits. If you are using the public sample key, try adding your own personal key in the apiKey field for higher limits.

**Why are some fields empty in my dataset?**

Not every NPS record has every field. For example, some parks may not have entrance fees, so fee fields will be null for those rows.

**Can I get data for a park by its common name instead of code?**

Yes. Use the searchQuery field with the park name, such as 'Yosemite'. The Actor will return the matching park records.

**Why did I get an authentication error?**

If you provided a personal API key, make sure it is valid and has not expired. Otherwise, leave the apiKey field blank to use the public sample key.

### FAQ

| Question | Answer |
|---|---|
| Do I need an NPS API key? | No. The Actor uses a public sample key by default. You can optionally provide your own personal key in the apiKey field for higher rate limits. |
| Which datasets can I export? | You can choose parks, alerts, campgrounds, events, or entrance and activity fees from the endpoint dropdown. |
| Can I filter by state? | Yes. Use the stateCode dropdown to select a US state or territory, or leave it blank for all states. |
| Can I get data for specific parks only? | Yes. Enter comma-separated park codes in the parkCode field, such as yose,grca,zion. |
| What does the free-text search do? | The searchQuery field matches park names and descriptions. For example, searching volcano returns parks related to volcanic features. |
| How many records can I get per run? | You can set maxItems up to 1,000,000. The NPS API returns all matching records, so set it high enough for your use case. |
| What format is the output? | The Actor returns flat JSON rows. You can export to CSV, JSON, Excel, or XML from the Apify dataset. |
| Is the data official? | Yes. All records come directly from the National Park Service API, not from scraping a website. |
| Can I run this on a schedule? | Yes. Use Apify's scheduler to run the Actor daily or weekly, for example to track new alerts or event changes. |
| Does it work for US territories? | Yes. The state filter includes American Samoa, Guam, Northern Mariana Islands, Puerto Rico, and the U.S. Virgin Islands. |

### Related actors

Browse the full [ParseForge collection](https://apify.com/parseforge?fpr=vmoqkp) for more scrapers.

🆘 **Need help?** Email parseforge@protonmail.com with your run ID, your input, and what you expected.

⚠️ **Disclaimer.** This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by National Park Service. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

# Actor input Schema

## `maxItems` (type: `integer`):

How many parks to collect per run.

## `endpoint` (type: `string`):

Which NPS dataset to export.

## `stateCode` (type: `string`):

Optional two-letter state code filter (US states and territories). Leave blank for all states.

## `parkCode` (type: `string`):

Optional comma-separated park codes (e.g. 'yose,grca,zion'). Leave blank for all parks.

## `searchQuery` (type: `string`):

Optional free-text search keyword. Example: 'volcano', 'civil war'.

## `apiKey` (type: `string`):

Optional personal key for higher rate limits. Leave blank to use the public sample key.

## Actor input object example

```json
{
  "maxItems": 10,
  "endpoint": "parks"
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "maxItems": 10,
    "endpoint": "parks",
    "stateCode": ""
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/nps-parks-api-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "maxItems": 10,
    "endpoint": "parks",
    "stateCode": "",
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/nps-parks-api-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "maxItems": 10,
  "endpoint": "parks",
  "stateCode": ""
}' |
apify call parseforge/nps-parks-api-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parseforge/nps-parks-api-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/sfTPgbzyiLBVRFApx/builds/30q8BF6Si7oqdqjaG/openapi.json
