# NPS Park Conditions, Alerts & Data Scraper (`jungle_synthesizer/nps-park-conditions-alerts-api-scraper`) Actor

Scrape the NPS API for parks, alerts, campgrounds, events, news, things to do, and visitor centers. Filter by state or park code. Returns unified records with coordinates, entrance fees, hours, and more. Ideal for trip planning apps and AI agents monitoring closures and danger advisories.

- **URL**: https://apify.com/jungle\_synthesizer/nps-park-conditions-alerts-api-scraper.md
- **Developed by:** [BowTiedRaccoon](https://apify.com/jungle_synthesizer) (community)
- **Categories:** Travel
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## NPS Park Conditions, Alerts & Data Scraper

Scrapes the U.S. National Park Service (NPS) API across seven resource types: parks, alerts, campgrounds, events, news releases, things to do, and visitor centers. Returns unified, flat records you can use without reading NPS API documentation.

A free NPS API key is required. You can get one instantly at [nps.gov/subjects/developer/get-started.htm](https://www.nps.gov/subjects/developer/get-started.htm) — no waiting, no approval, just an email address.

### What It Scrapes

The NPS API sits behind [developer.nps.gov/api/v1](https://developer.nps.gov/api/v1). Seven endpoints, one actor. You pick which resource types to fetch.

**Why alerts matter:** park closures, wildfire road conditions, and danger advisories change constantly. Trip planners, travel apps, and AI agents that need to know whether a park is actually accessible have to poll this data somehow. The `alerts` endpoint is the recurring-monitoring use case — daily or hourly runs filtered by park code or state.

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `apiKey` | string | — | Your free NPS API key |
| `resourceTypes` | array | `["parks", "alerts"]` | Endpoints to scrape. Options: `parks`, `alerts`, `campgrounds`, `events`, `newsreleases`, `thingstodo`, `visitorcenters` |
| `parkCodes` | array | *(all parks)* | Filter by NPS park codes (e.g. `["yose", "grca", "zion"]`) |
| `stateCode` | string | *(all states)* | Filter by two-letter US state code (e.g. `CA`, `UT`) |
| `maxItems` | integer | 10 | Maximum records to return across all resource types |

Leave `resourceTypes` empty to fetch all seven types in one run.

#### Example Input

```json
{
  "apiKey": "YOUR_NPS_API_KEY",
  "resourceTypes": ["alerts", "parks"],
  "stateCode": "CA",
  "maxItems": 100
}
````

### Output

Each record has a `resource_type` field identifying its endpoint. Fields that don't apply to a given type are returned as empty strings.

| Field | Type | Description |
|-------|------|-------------|
| `resource_type` | string | `parks`, `alerts`, `campgrounds`, `events`, `newsreleases`, `thingstodo`, or `visitorcenters` |
| `park_code` | string | NPS unit code (e.g. `yose`, `grca`) |
| `park_full_name` | string | Full official park name |
| `state_codes` | string | Comma-separated state codes |
| `title` | string | Name or title of the resource |
| `description` | string | Description, abstract, or body text |
| `category` | string | Alert severity (Danger/Closure/Caution/Information), event type, etc. |
| `url` | string | NPS page URL for this resource |
| `latitude` | string | Latitude coordinate |
| `longitude` | string | Longitude coordinate |
| `activities` | string | Comma-separated activities available |
| `topics` | string | Comma-separated topics and themes |
| `entrance_fees` | string | JSON-encoded entrance fee list (parks) |
| `operating_hours` | string | JSON-encoded operating hours (parks, campgrounds, visitor centers) |
| `image_url` | string | Primary image URL |
| `last_indexed` | string | ISO timestamp of last NPS index update |
| `phone` | string | Contact phone (visitor centers, campgrounds) |
| `directions_url` | string | Link to directions |
| `reservation_url` | string | Reservation link (campgrounds, events) |
| `is_reservation_required` | string | Whether reservation required |
| `cost` | string | Fee or cost description |

#### Sample Record (Alert)

```json
{
  "resource_type": "alerts",
  "park_code": "grba",
  "title": "Winter Road Closures",
  "description": "Wheeler Peak Scenic Drive is closed at the Wheeler Peak Summit Trailhead due to snow.",
  "category": "Park Closure",
  "url": "https://www.nps.gov/grba/planyourvisit/conditions.htm",
  "last_indexed": "2026-05-19 00:00:00.0"
}
```

#### Sample Record (Park)

```json
{
  "resource_type": "parks",
  "park_code": "alca",
  "park_full_name": "Alcatraz Island",
  "state_codes": "CA",
  "title": "Alcatraz Island",
  "description": "Alcatraz reveals stories of American incarceration, justice, and our common humanity...",
  "url": "https://www.nps.gov/alca/index.htm",
  "latitude": "37.82676234",
  "longitude": "-122.4230206",
  "activities": "Food, Wildlife Watching, Birdwatching, Museum Exhibits, Shopping",
  "topics": "Colonization and Settlement, Forts, Incarceration, Maritime",
  "operating_hours": "[{\"name\":\"Alcatraz Island\",\"standardHours\":{\"monday\":\"9:00AM - 6:30PM\",...}}]",
  "phone": "415-561-4900",
  "directions_url": "http://home.nps.gov/alca/planyourvisit/directions.htm"
}
```

### Use Cases

**Trip planning tools** — pull parks and campgrounds filtered by state. Include entrance fees and operating hours directly in destination cards.

**Closure monitoring** — run daily against the `alerts` endpoint filtered by state. Filter output for `category: "Park Closure"` or `"Danger"` and route to push notifications or a status dashboard.

**AI agents and RAG pipelines** — NPS data is public domain. Feed current park conditions into retrieval-augmented generation for travel queries.

**Geospatial and research projects** — 470+ NPS units with coordinates, activities, topics, and fees in a clean flat format.

### Rate Limits

The NPS API enforces rate limits per key. The actor paginates at 50 records per request with a ~1 second delay between calls to stay within NPS's documented guidance.

The default `maxItems: 10` is intentionally conservative. Raise it for production runs. Set to `0` for an unlimited full-catalog pull.

### Getting Your API Key

1. Go to [nps.gov/subjects/developer/get-started.htm](https://www.nps.gov/subjects/developer/get-started.htm)
2. Enter your name, email, and a brief use description
3. Key arrives by email within seconds

No approval process. No billing. Free tier is sufficient for most use cases.

***

*Data source: U.S. National Park Service API (developer.nps.gov). NPS data is in the public domain.*

# Actor input Schema

## `sp_intended_usage` (type: `string`):

Please describe how you plan to use the data extracted by this crawler.

## `sp_improvement_suggestions` (type: `string`):

Provide any feedback or suggestions for improvements.

## `sp_contact` (type: `string`):

Provide your email address so we can get in touch with you.

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

Your free NPS API key. Get one instantly at https://www.nps.gov/subjects/developer/get-started.htm Without a key the scraper will fail — the NPS API requires authentication.

## `resourceTypes` (type: `array`):

Which NPS resource types to fetch. Available: parks, alerts, campgrounds, events, newsreleases, thingstodo, visitorcenters. Leave empty to fetch all types.

## `parkCodes` (type: `array`):

Optional list of NPS park codes to filter results (e.g. \["yose", "grca", "zion"]). Leave empty to fetch all parks.

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

Optional two-letter US state code to filter results (e.g. "CA", "UT", "CO"). Leave empty for all states.

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

Maximum total number of records to return across all resource types. 0 = unlimited.

## Actor input object example

```json
{
  "sp_intended_usage": "Describe your intended use...",
  "sp_improvement_suggestions": "Share your suggestions here...",
  "sp_contact": "Share your email here...",
  "apiKey": "YOUR_NPS_API_KEY_HERE",
  "resourceTypes": [
    "parks",
    "alerts"
  ],
  "parkCodes": [],
  "maxItems": 10
}
```

# Actor output Schema

## `results` (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 = {
    "sp_intended_usage": "Describe your intended use...",
    "sp_improvement_suggestions": "Share your suggestions here...",
    "sp_contact": "Share your email here...",
    "apiKey": "YOUR_NPS_API_KEY_HERE",
    "resourceTypes": [
        "parks",
        "alerts"
    ],
    "parkCodes": [],
    "stateCode": "",
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("jungle_synthesizer/nps-park-conditions-alerts-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 = {
    "sp_intended_usage": "Describe your intended use...",
    "sp_improvement_suggestions": "Share your suggestions here...",
    "sp_contact": "Share your email here...",
    "apiKey": "YOUR_NPS_API_KEY_HERE",
    "resourceTypes": [
        "parks",
        "alerts",
    ],
    "parkCodes": [],
    "stateCode": "",
    "maxItems": 10,
}

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

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

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

```

## CLI example

```bash
echo '{
  "sp_intended_usage": "Describe your intended use...",
  "sp_improvement_suggestions": "Share your suggestions here...",
  "sp_contact": "Share your email here...",
  "apiKey": "YOUR_NPS_API_KEY_HERE",
  "resourceTypes": [
    "parks",
    "alerts"
  ],
  "parkCodes": [],
  "stateCode": "",
  "maxItems": 10
}' |
apify call jungle_synthesizer/nps-park-conditions-alerts-api-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=jungle_synthesizer/nps-park-conditions-alerts-api-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "NPS Park Conditions, Alerts & Data Scraper",
        "description": "Scrape the NPS API for parks, alerts, campgrounds, events, news, things to do, and visitor centers. Filter by state or park code. Returns unified records with coordinates, entrance fees, hours, and more. Ideal for trip planning apps and AI agents monitoring closures and danger advisories.",
        "version": "0.1",
        "x-build-id": "8HDzkpEb00oKzhajo"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/jungle_synthesizer~nps-park-conditions-alerts-api-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-jungle_synthesizer-nps-park-conditions-alerts-api-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/jungle_synthesizer~nps-park-conditions-alerts-api-scraper/runs": {
            "post": {
                "operationId": "runs-sync-jungle_synthesizer-nps-park-conditions-alerts-api-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/jungle_synthesizer~nps-park-conditions-alerts-api-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-jungle_synthesizer-nps-park-conditions-alerts-api-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "maxItems"
                ],
                "properties": {
                    "sp_intended_usage": {
                        "title": "What is the intended usage of this data?",
                        "minLength": 1,
                        "type": "string",
                        "description": "Please describe how you plan to use the data extracted by this crawler."
                    },
                    "sp_improvement_suggestions": {
                        "title": "How can we improve this crawler for you?",
                        "minLength": 1,
                        "type": "string",
                        "description": "Provide any feedback or suggestions for improvements."
                    },
                    "sp_contact": {
                        "title": "Contact Email",
                        "minLength": 1,
                        "type": "string",
                        "description": "Provide your email address so we can get in touch with you."
                    },
                    "apiKey": {
                        "title": "NPS API Key",
                        "type": "string",
                        "description": "Your free NPS API key. Get one instantly at https://www.nps.gov/subjects/developer/get-started.htm Without a key the scraper will fail — the NPS API requires authentication.\n"
                    },
                    "resourceTypes": {
                        "title": "Resource Types",
                        "type": "array",
                        "description": "Which NPS resource types to fetch. Available: parks, alerts, campgrounds, events, newsreleases, thingstodo, visitorcenters. Leave empty to fetch all types.\n",
                        "items": {
                            "type": "string"
                        }
                    },
                    "parkCodes": {
                        "title": "Park Codes Filter",
                        "type": "array",
                        "description": "Optional list of NPS park codes to filter results (e.g. [\"yose\", \"grca\", \"zion\"]). Leave empty to fetch all parks.\n",
                        "items": {
                            "type": "string"
                        }
                    },
                    "stateCode": {
                        "title": "State Code Filter",
                        "type": "string",
                        "description": "Optional two-letter US state code to filter results (e.g. \"CA\", \"UT\", \"CO\"). Leave empty for all states.\n"
                    },
                    "maxItems": {
                        "title": "Max Items",
                        "type": "integer",
                        "description": "Maximum total number of records to return across all resource types. 0 = unlimited."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
