banool/recreation-gov-campsite-checker

Create site that shows park IDs

Closed this issue ยท 6 comments

This is more of a separate idea than something that could be put here, but it'd be neat to have a site that scraped recreation.gov very occasionally for park IDs.

well, they seem to have put no upper bound on the number of parks returned via one query, so this is easy :-D https://www.recreation.gov/api/search?size=24607

created this today - https://pastudan.github.io/national-parks/

I realized after finishing this that these are park IDs and not campground IDs, but it shouldn't be too much work to get those in -- just a little bit of pre-processing before saving parks.json

Awesome! I'll include this in the readme ๐Ÿ’ƒ๐Ÿ’ƒ๐Ÿ’ƒ

frrad commented

fwiw, not sure that query returns campsites. Here's a hack to search by lat lon

curl 'https://www.recreation.gov/api/search?exact=false&lat=37.7387871&lng=-119.6701347&size=20&fq=-entity_type%3Atour&fq=campsite_type_of_use%3AOvernight&fq=campsite_type_of_use%3Ana&fq=entity_type%3Acampground&start=0' -H 'accept-encoding: gzip, deflate, br' -H 'accept-language: en-US,en;q=0.9' -H 'accept: */*' -H 'referer: https://www.recreation.gov/search?inventory_type=camping' -H 'authority: www.recreation.gov' -H 'cookie: announcement_dev_key=hide' --compressed | jq '.results[] | .name, .entity_id'

I don't think you need to scrape for ids. You can download them in json format. https://ridb.recreation.gov/download

The data is spread between multiple files, but you can also look at the individual campsite features to filter for your preferred list.

This idea of a site that shows park IDs is a separate project to recreation-gov-campsite-checker, so I'm going to close this issue out.