I want to retrieve all observations from an iNaturalist project and search the observation notes for certain character strings. The idea is to add the URLs to iNaturalist observations and the current ID to a species list with a column that contains unique identifiers that were posted on iNaturalist as a note to the respective observation.
I am using the iNaturalist Python API to do so. However, it seems I cannot find all observations. When I run
from pyinaturalist import *
project_observations = get_observations(project_id = project_ID)
observations = project_observations["results"]
target = []
for obs in observations:from pyinaturalist import *
project_observations = get_observations(project_id = project_ID)
observations = project_observations["results"]
target = []
for obs in observations:
if obs["description"] is not None and obs["description"] != "":
if iNaturalist_ID in obs["description"]:
target.append(obs)
if obs["description"] is not None and obs["description"] != "":
if iNaturalist_ID in obs["description"]:
target.append(obs)
I would expect to find all observations within the project with the ID project_ID
and get a list (target
) of all observations that contain the identifier iNaturalist_ID
in the observation notes. However, a lot of the observations are missing and I noted that len(observations)
gives 30
despite the project containing way more than 30 observations.
I suspect the API output is somehow limited to 30 entries? If this is the case, is there a way to change this?