# Recreation.gov — Pipedream Connect

> The Recreation Information Database (RIDB) provides data resources to citizens, offering a single point of access to information about recreational opportunities nationwide.

- API slug: `recreation_gov` (use in MCP headers and tool keys)
- Auth: API key (Pipedream-managed)
- Categories: Travel
- Website: https://ridb.recreation.gov/docs
- This page (HTML): https://pipedream.com/apps/recreation-gov
- Tools: 6 actions · 2 triggers

## Connect via MCP (recommended)

- Endpoint: `https://remote.mcp.pipedream.net/v3`
- Headers: `Authorization: Bearer <token>` · `x-pd-project-id` · `x-pd-environment` · `x-pd-external-user-id` · `x-pd-app-slug: recreation_gov`

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "recreation_gov",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// e.g. run Get Recreation Area:
const result = await mcp.callTool({
  name: "recreation_gov-get-recreation-area",
  arguments: {
    recAreaId: "Recreation Area Id",
  },
})
```

Docs: [MCP guide](https://pipedream.com/docs/connect/mcp/developers.md)

## API proxy

For a Recreation.gov endpoint with no pre-built tool, the proxy forwards your request with the connected user's credentials attached.

```bash
# The path segment is the target URL, URL-safe base64 encoded:
# https://ridb.recreation.gov/api/v1/campsites

curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9yaWRiLnJlY3JlYXRpb24uZ292L2FwaS92MS9jYW1wc2l0ZXM?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
  -H "Authorization: Bearer {access_token}" \
  -H "x-pd-environment: production"
```

Docs: [API proxy guide](https://pipedream.com/docs/connect/api-proxy.md)

## SDK

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "recreation_gov-get-recreation-area",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    recreation_gov: { authProvisionId: "apn_xxxxxxx" },
    recAreaId: "Recreation Area Id",
  },
})
```

Docs: [Managed auth guide](https://pipedream.com/docs/connect/managed-auth/quickstart.md) · [Tools guide](https://pipedream.com/docs/connect/components.md)

## Actions (6)

### `recreation_gov-get-recreation-area` — Get Recreation Area (Read-only)

Retrieves details of a specific campsite. See the documentation

Full schema: https://pipedream.com/apps/recreation-gov/actions/get-recreation-area.md

### `recreation_gov-list-activities-options` — List Activities Options (Read-only)

Retrieves available options for the Activities field.

Full schema: https://pipedream.com/apps/recreation-gov/actions/list-activities-options.md

### `recreation_gov-list-campsite-id-options` — List Campsite Id Options (Read-only)

Retrieves available options for the Campsite Id field.

Full schema: https://pipedream.com/apps/recreation-gov/actions/list-campsite-id-options.md

### `recreation_gov-list-rec-area-id-options` — List Recreation Area Id Options (Read-only)

Retrieves available options for the Recreation Area Id field.

Full schema: https://pipedream.com/apps/recreation-gov/actions/list-rec-area-id-options.md

### `recreation_gov-search-campsites` — Search Campsites (Read-only)

Searchs campsites with the given query. If no query given, returns campsites from the beginning. Returning campsite number is limited to 1000. See the documentation

Full schema: https://pipedream.com/apps/recreation-gov/actions/search-campsites.md

### `recreation_gov-search-recreation-areas` — Search Recreation Areas (Read-only)

Searchs recreation areas with the given properties. If no parameters given, returns all. See the documentation

Full schema: https://pipedream.com/apps/recreation-gov/actions/search-recreation-areas.md

## Triggers (2)

### `recreation_gov-campsite-availability-changed` — New Campsite Availability Changed Event (Polling)

Emit new events when selected campsite's availability is changed. See the documentation

Full schema: https://pipedream.com/apps/recreation-gov/triggers/campsite-availability-changed.md

### `recreation_gov-new-recreation-area-added` — New Recreation Area Added Event (Polling)

Emit new events when a new recreation area is added to the Recreation.gov database. See the documentation

Full schema: https://pipedream.com/apps/recreation-gov/triggers/new-recreation-area-added.md

---

- All apps: https://pipedream.com/apps — index: https://pipedream.com/llms.txt
- Pipedream docs for agents: https://pipedream.com/docs/llms.txt
