I’m doing an API call that returns a series of parks. There’s I think 466 parks in the system, and the number of results per return has a default of 50. I figured that meant I could just add a “limit=466” to the URL and get more than 50. It turns out that adding a limit of anything more than 50 gives me an IndexError of ‘list index error out of range.’ At the top of my Python code I'm importing urllib.request and json. The URL I'm using looks like this:
https://developer.nps.gov/api/v1/parks?limit=100&API_KEY=apikey
I have a feeling these are beginner problems, but I’m wondering 2 things. How do I get more than 50 parks to come back? And is there a way to just do a sort of “all results” rather than an integer, in case more parks are added to the API in the future?