camply icon indicating copy to clipboard operation
camply copied to clipboard

ReserveAmerica.com

Open ctrl-brk opened this issue 1 year ago • 7 comments

Add support for reserveamerica.com

ctrl-brk avatar Feb 09 '24 16:02 ctrl-brk

I've had my eye on reserveamerica.com for some time now. The issue with implementing it as a camply provider is they don't have a public facing RESTful API powering their site.

All current camply providers, like recreation.gov, use a RESTful API. So a campground like Cold Springs - Arapaho Roosevelt NF (CO) has its own API endpoint that returns JSON: GET https://www.recreation.gov/api/media/public/asset/231856. Camply works by reverse engineering these APIs so we can search for campgrounds and ask about their availability.

reserveamaerica.com is a bit more high tech than most providers and doesn't surface an API and instead handles all of this on the backend to render HTML for the front end.

So a provider like ReserveAmerica could work with camply but it would require that camply scrapes the sites's HTML to get data instead of pinging their API. I'm not saying I won't ever implement this but it would require a bunch of work and a new approach for the tool.

juftin avatar Feb 22 '24 15:02 juftin

There is an older API for Reserve America: Third Party API

But it doesn’t show availability information and I think is no longer supported/updated. Plus don’t think it provides what is desired.

mr1716 avatar Jun 23 '24 14:06 mr1716

@juftin there looks to be an API: https://api.reserveamerica.com/ and https://chub.api.reserveamerica.com/, but unsure its use or if available

mr1716 avatar Jun 30 '24 17:06 mr1716

@ctrl-brk , @thornto4 , and @mr1716 would you be interested in helping with PR #369 ?

thisIsMikeKane avatar Apr 09 '25 17:04 thisIsMikeKane

I believe I've found information about the internal reserve america api. I've been able to make requests without captcha accessing the restful interface of api.reserveamerica.com and get JSON availability data back - similar to the smartphone app does. Code is just in the research preliminaries now but I'll look at what you have here as I have time and maybe integrate that.

beege avatar Sep 16 '25 19:09 beege

@beege, how did you do that? Will you be posting your code somewhere as part of a project?

mr1716 avatar Sep 17 '25 11:09 mr1716

Not sure what I'll release yet. Might just be a simple POC. After further research I found that it does not work for everything on the reserveamerica website, but only for what the smartphone app supports. There are some (many?) campgrounds in the reserve america app that redirect you to use a browser on reserveamerica webpage instead (I think that's the "chub" API mentioned above). And the queries I get back for those are not useful - there's just a dummy placeholder. - I wonder if those perhaps still work with the ACTIVE API mentioned previously (https://developer.active.com/docs/read/Campsite_Search_API) - but I haven't checked. That API still (sort of) works but I gave up on that initially because it didn't support availability data for the state parks I was interested in. I made the assumption that it doesn't have any availability data anymore but that could be false since I wasn't checking "chub" campgrounds.

Anyway, lots of state parks work with the internal API I found. I'll probably make a short POC for a random state park and release that. I don't spend much time coding these days but I'll get to it soon.

beege avatar Sep 22 '25 04:09 beege