Is API's 'Nearby Places' operation omitting small Places? Its results are unreliable

Platform (API v1):

URLs (aka web addresses) of any relevant observations or pages: https://api.inaturalist.org/v1/places/nearby

Description of problem

I am using the iNat API v1 to find Places (i.e. areas with boundary polygons) within my study area. I have added Places for major National Parks, but when I use the /places/nearby operation with a search area that completely encompasses the National Parks I have just added, some of the Places I just added are not given to me.

For example, for the query GET https://api.inaturalist.org/v1/places/nearby?nelat=-32.317&nelng=151.19193&swlat=-34.4136&swlng=149.800&per_page=200, here are the Places that were added by users:

131025 Greater Blue Mountains Area World Heritage Site -33.2856 150.4698
121654 Greater Blue Mountains Region                   -33.4469 150.3663
174303 Wollemi National Park, NSW, AU                  -32.9016 150.4848
118194 NSW Southern Tablelands, Great Dividing Range   -34.6023 149.7915
174284 Blue Mountains National Park, NSW, AU           -33.837  150.3129
 68720 Blue Mountains                                  -33.8245 150.253 
142327 Greater Sydney Area                             -33.8703 151.068 
 73794 Sydney                                          -33.866  150.9206
162999 Central Coast                                   -33.305  151.2879
174281 Yengo National Park, NSW, AU                    -33.0484 150.919 
174304 Kanangra-Boyd National Park, NSW, AU            -33.9403 150.092 
174285 Nattai National Park, NSW, AU                   -34.2499 150.3713
 72549 Parr                                            -33.3129 150.8131
 72055 Gardens of Stone                                -33.2171 150.1264
 72394 Burragorang                                     -34.0166 150.5074
122490 Sydney Harbour waters bounding box              -33.8161 151.1716
 72619 Yerranderie                                     -34.1497 150.3006
 68726 Dharug                                          -33.3798 151.072 
 68725 Royal                                           -34.1335 151.0817
 69302 Marramarra                                      -33.4939 151.0763

But this list is missing two Places that I personally added, and which I know are inside the search bounding box:

  1. Jenolan Caves Karst Conservation Reserve, Place ID 174280, https://inaturalist.ala.org.au/places/174280
  2. Thirlmere Lakes National Park, NSW, AU, Place ID 17430, https://inaturalist.ala.org.au/places/174305

The API reports only one page of results (40 out of a maximum of 200 per page), so the missing Places are not on a different page that I need to additionally request. The only commonality between these two Places is that they’re quite small geographically. Is the API not returning them because of that? How do I make the API give me everything in the bounding box?


PS. Since the API operation is called ‘places nearby’, I have also tried to use a smaller bounding box where I know that these two Places are outside the bounding box. It still did not return them, and what’s worse, it even returned some extra Places that were not part of the larger search area:

78312 "South Katoomba"                        -33.7221 150.3019    
78311 "Glen Robin forest"                     -33.5101 150.4718    
76409 "\"Glen Robin\""                        -33.5101 150.4715

while most API endpoints have a max per_page=200, not all of them do, and i suppose this is one of them. in this case, it’s unusual that you’re not able to specify page. this means you can only ever get one page of results, meaning that you can only ever get up to 40 results (the max per page) for any given bounding box. also, it seems to double the value you specify in per_page. so for example, if you specify per_page=20, you will get up to 40 results back. specify per_page=2, and you will get up to 4 results back.

(i suspect the relatively small limit here is to prevent huge ad hoc geospatial queries, which can be very costly. so returning not more than 40 places may be a design choice, not a bug. the double of the per_page may be a minor bug though.)

the way i would work around the limitations above is just do divide the bounding box in steps of 2 or 4, as needed to get additional results. for example, if i see that i’m hitting the max 40 results for a given bounding box, then i could divide that box into 4 and make 4 additional calls. if any of the subdivided boxes return 40, then divide that box again, and so on… then merge the the results from all the requests.

this still might not get you every place, but it should at least reveal the smaller places.