How to use iNaturalist's Search URLs - wiki part 1 of 2

Has anything about how this works changed recently? I’m trying to set up a search string to show all the observations in a project that aren’t mine. What I put together is https://www.inaturalist.org/observations?project_id=61767&not_user_id=er1kksen

When I search this, I just get the spinning “searching” arrows in perpetuity. When I change it to just &user_id , no problem. Substituting other user IDs produces the same result. I tried the same thing from my phone without being logged in and still got the same result.

To follow up a little more I set up a search that would exclude all observations in that project that are NOT within chautauqua county, NY- should get zero results as the whole project area is in that county. Instead I get the exact same results from &not_place_id=693 as using &place_id=693.

not_user_id requires the numerical user id, not the string. If you go to your profile page and add .json to the end of the URL, the first number is the user id – for you it’s 192963, so the working search is https://www.inaturalist.org/observations?project_id=61767&not_user_id=192963.

The correct place exclusion search term is not_in_place (rather than not_place_id), so the working search URL is https://www.inaturalist.org/observations?project_id=61767&not_in_place=693.

5 Likes

Ah, thanks. I guess since my actual username (which I guess is a “string”?) worked for the positive query it didn’t occur to me it wouldn’t work the same for a negative one. The place filter I apparently just fumbled entirely.

4 Likes

Yeah, I’m not totally sure why they’re implemented differently. I added a small note up top to hopefully clarify that going forward.

3 Likes

I am unable to find all NYC White Snakeroot (Ageratina altissima) observations that do NOT have a value for observation field Leaf Miner

I tried many of the very useful tips shared here (thank you all, especially Tony Iwane).

I can find those with observation field Leaf Miner = any value
https://www.inaturalist.org/observations?verifiable=any&taxon_id=119048&place_id=674&field:Leaf%20Miner

Here are the strings I tried so far to find where observation field Leaf Miner is null:

&not_field:Leaf%20Miner
&without_field:Leaf%20Miner
&field:not_Leaf%20Miner
&field:without_Leaf%20Miner
&without_field:Leaf%20Miner
&without_field_Leaf%20Miner
&not_field_Leaf%20Miner

And all of the above with and without Leaf%20Miner=yes,no,unclear

Thank you for any tips.

1 Like

Feel free to vote for the feature request.

1 Like

hey, welcome to the forum! :)

Thank you! I voted. There are now 8 votes.

I’m not entirely sure this is the place to post this, since I’m not seeing any prior mention of &unobserved_by_user_id=

However, when I use it, I do get species showing up that I have observed, for example here:
https://www.inaturalist.org/observations?place_id=118376&subview=grid&unobserved_by_user_id=gwark&view=species

I (gwark) have multiple observations of Trichoderma - is this showing up because it’s only excluding species that have been observed by me?

1 Like

The unobserved_by_user_id parameter should be used in combination with rank=species, or hrank=species to get accurate species-level results

4 Likes

Thanks - that’s helpful to know.

I’m still curious why results from me would be showing up at the genus level (for example, if I set rank=genus - for example, the Trichoderma observations show up. Is this an intended thing that I’m misunderstanding?

No - again this filter should be used with rank species to avoid getting genus results. Perhaps the API should be doing that itself. This is a parameter that probably should not have been documented in the API and perhaps should be removed. It is only used for one very niche feature in the Android app that probably doesn’t get much use - and since we don’t use it ourselves it doesn’t get the quality control other API parameters do.

2 Likes

Thanks - I appreciate the follow up. It’s helpful to know that it’s only intended to work for species.

For what it’s worth I like having access to this parameter, as it makes it much easier for me to find species to target in my area which I’ve not already seen (and where I’m at, most of the observed species are ones I’ve already observed - so there’s a lot to try and sort through otherwise).

That said, perhaps there’s a different or more recommended approach for getting a list of ‘not observed’ species for a given area which I don’t know about/

Is there a way to use taxon_name to search for a genus name that is reused in multiple kingdoms? E.g. genus Stellaria appears under both animals and plants. Without knowing the taxon_id, can I restrict the search to just plants? Otherwise the search fails and returns all taxons.

Thanks.

3 Likes

Search on Stellaria and both genera are in the drop down list. Select the one you want (chickweeds) and the taxon_id # appears at the end of the url. Use this taxon_id to specify your choice.

2 Likes

I think this should be so easy, but none of my attempts work. I would like to send someone a URL with a list of Observations. I have the Observation IDs, but can’t seem to put them into a combined query. I’m trying some variation of this: https://www.inaturalist.org/observations?place_id=any,observation_id=49294728,50012015

@apcorboy I can’t get anywhere with this either - tried some last night and again tonight - of course I am so novice that calling me novice is an exaggeration. One thing is though, I believe, that “&” needs to be between the (what I will call) conditions and not “,” - still does not make a difference but I believe that is the structure. Do you mind me asking why you wish to send a list of observations this way?

I just learned that &photos=false will find observations without photos (thanks @jwidness & @nicolasr).
My ctrl-f didn’t show it was already mentioned here, so I thought I’d add it (forgive me if it is already covered).

2 Likes

https://www.inaturalist.org/observations/identify?quality_grade=research&id=49294728,50012015

Is it possible to get an observation view for a string of observations?
I want:
https://www.inaturalist.org/observations?view=species&id=8919028,10873149,10887022
I can do:
https://www.inaturalist.org/observations/identify?id=8919028,10873149,10887022&reviewed=any&quality_grade=any

I can generate a list of linked observations from a field, but I want a species summary of the links on iNaturalist. (e.g.: given species x, I can download all observation numbers from the field “feeding on”, and from this list of observations, I want a species list [of species eaten by species x ])