-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support searching observations by observation fields #381
Comments
I'd love to be able to search on that undocumented
It seems like an easy way to allows for querying this param (and potentially other undocumented params) would be to add a "dummy" param for |
Sure, I'd be happy to add that. It looks like you can search for both a specific value, or just any observations containing a given field. Usage could look something like this: # Find observations that contain these fields
get_observations(observation_fields=['Species count', 'Elevation (m)'])
# Find observations that have these specific field values
get_observations(observation_fields={'Species count': 2}) |
If you have time, something that would be helpful is to test the other observation endpoints to see if any others allow searching by observation fields. |
That's a much more elegant solution that the quick-and-dirty work around I envisioned. Wonderful! Here's a check of other observation endpoints:
|
I have some changes for this tentatively working, but they still need docs and tests. I'll get that finished up within the next week or so. |
@willkuhn Changes for this are in the latest pre-release build, if you'd like to give it a try. |
There's an undocumented
field:{field_name}
param for observations searches, for example: https://www.inaturalist.org/observations?field:Species%20count=2This can be applied to the following endpoints:
/observations
/observations/histogram
/observations/identifiers
/observations/observers
/observations/popular_field_values
/observations/species_counts
The text was updated successfully, but these errors were encountered: