How to use iNaturalist's Search URLs - Wiki

Background

The Explore page (aka Observations search) at https://www.inaturalist.org/observations is the primary way for iNaturalist users to search for a set of observations. The page has multiple filters available in the user interface that one can use. Each time a filter is applied, you’ll notice the search URL (AKA web address) changes. For example, a search for all snake observations…

…creates this URL: https://www.inaturalist.org/observations?place_id=any&taxon_id=85553

This URL is basically a set of search instructions for iNaturalist and it will always show all verifiable snake observations worldwide if you paste it into a browser (try it!).

By editing URLs like this, you can get search results not available through the user interface on the website. What follows are examples of different URLs you can use to create more complicated searches than are available through the user interface. And remember, once you have a search you like, you can always bookmark the URL to save the search.

Because this is a wiki post, feel free to add your own examples!


NOTE: most of the edits below will work in both the explore and identify contexts, but some may only work in one context or the other.

If some of the following query examples are empty, then propably your default place for location searches does not contain any observations. In that case, just remove the “Place” in your filter page or add &place_id=any to the URL.

If captive observations are missing in the query, then propably “Verifiable” is checked in the filter page. Just untick it or add &verifiable=any to the URL.

To display both of wild and captive observations together in the map view, add &captive=any to the URL.


Search for multiple taxa

We’ll start off with something simple.

You’ll notice the last part of the URL above says taxon_id=85553. That number is iNaturalist’s ID for the taxon Serpentes. You can always find that number by going to the taxon’s page and looking at the URL (e.g. https://www.inaturalist.org/taxa/85553-Serpentes for Serpentes) or searching for it on Explore and looking at the URL.

So if you want to search for more than one taxon at a time, you can edit that URL to include multiple taxon IDs. Let’s say I wanted to search for all snakes and all crocodilians (https://www.inaturalist.org/taxa/26039-Crocodylia). I will have to change taxon_id to taxon_ids and I can add another taxon number to it by using a comma, so I would end up with:

https://www.inaturalist.org/observations?place_id=any&taxon_ids=85553,26039,47113

You can append more taxon IDs to this URL to search for more taxa. For example, here are all snakes, crocodilians, and nudibranchs:

https://www.inaturalist.org/observations?place_id=any&taxon_ids=85553,26039,47113

Search multiple places

This is pretty similar the multiple taxa URL. Like taxa, places have their own unique ID number, which you can find by searching for it and looking at the resulting URL. For example, here are all observations in Hong Kong:

https://www.inaturalist.org/observations?place_id=7613

So Hong Kong’s ID number is 7613. If I wanted to search for observations in both Hong Kong and Macao, all I have to do is append Macao’s ID number to the end:

https://www.inaturalist.org/observations?place_id=7613,10301

You can then start combining place and taxa search by using an ampersand (&). Here is a search for all snakes, crocodilians, and nudibranchs in Hong Kong and Macao:

https://www.inaturalist.org/observations?taxon_ids=85553,26039,47113&place_id=7613,10301

Search by bounding box or circle

If you’d like to search an area that doesn’t have a place ID, you can put in a rectangular bounding box or a circle with a defined center and radius. These must be added to the URL manually.
For example, https://www.inaturalist.org/observations?nelat=30.849458&nelng=-94.939413&swlat=30.220087&swlng=-95.792015 finds observations in a rectangular area north of Houston, Texas. You can use Google maps to find the lat/long points – just click on the map and it will give you the numbers.
And https://www.inaturalist.org/observations?lat=38.92&lng=-77.07&radius=16 finds observations around Washington, DC. Radius is in kilometers. Use the circle tool of the ruler menu of Google Earth to draw a circle and to find out the center point.

Exclude one or more taxa, places, and/or observers from a search

  • &without_taxon_id=
  • &not_in_place=
  • &not_user_id=

These are not available in any of the Filter windows, and must be added to the URL manually. They work like taxon_id and place_id (above), but will exclude observations from a list of taxa, places, and/or observers. (Look up the ID numbers the same way also.)

For example, I want to identify Asteraceae (47604) from Mono County California (1916), but not sagebrush or rubber rabbitbrush (genus Artemisia 52855 or species Ericameria nauseosa 57934) and not from the Sierra Nevada (52173) or the White Mountains (129416), and not my own (51061):

https://www.inaturalist.org/observations/identify?place_id=1916&taxon_id=47604&not_in_place=129416,52173&without_taxon_id=52855,57934&not_user_id=51061

Of course, if any of your “with” and “without” parameters conflict, you should expect to get conflicting results! (or none at all).

Search by active identification

To find observations to which a particular ID has been added (even if that is not the consensus ID), use ident_taxon_id=.

For example, this should show observations which have an active Dysdera crocata ID, a commonly misidentified spider.

https://www.inaturalist.org/observations?ident_taxon_id=68912

Search for a user’s IDs

If you want to see observations to which a a certain user has added an ID, use the ident_user_id param. For example, here are all observations to which I have add an ID:

https://www.inaturalist.org/observations?ident_user_id=tiwane

It also works in Identify:

https://www.inaturalist.org/observations/identify?ident_user_id=tiwane

Search for observation field values

You can specify observation fields and their values in the URL. For example, here are all of the observations with the observation field “Roadkill” set to “Yes”.

https://www.inaturalist.org/observations?field:roadkill=yes

You can search for all observations with a field regardless of the field value (e.g. the field “Habitat (s Afr)” only):
&field:Habitat%20(s%20Afr)

or with a field and value (e.g. “Habitat (s Afr)=Nama Karoo”):
&field:Habitat%20(s%20Afr)=Nama%20Karoo

You can easily combine these with other search strings. For example, the following shows all observations marked as being of insect herbivores of Ecualyptus.

https://www.inaturalist.org/observations?taxon_id=47158&field:Interaction->Herbivore%20of=51815

The taxon ID for Insecta is 47158 and for Eucalyptus is 51815 (which you find from the URLs of their taxon pages, https://www.inaturalist.org/taxa/47158-Insecta and https://www.inaturalist.org/taxa/51815-Eucalyptus). The observation field used here is “Interaction->Herbivore of”. Note that the space in that field name needs to be replaced with a %20 in the URL so the browser doesn’t get confused.

Observation field view
https://www.inaturalist.org/observation_fields/1234
Observation field view for a value: (e.g. Fynbos in Habitats-s-afr):
https://www.inaturalist.org/observation_fields/7498?value=Fynbos (case sensitive)
Ascending list of observation fields:
https://www.inaturalist.org/observation_fields?order_by=name&order=asc
Descending list:
https://www.inaturalist.org/observation_fields?order_by=name&order=desc

Search for Annotations

&term_id= - the annotation group

  • 1=Life Stage, 9=Sex, 12=Plant Phenology

&term_value_id= - the value within the group

  • Life Stage: 2=Adult, 3=Teneral, 4=Pupa, 5=Nymph, 6=Larva, 7=Egg, 8=Juvenile, 16=Subimago
  • Sex: 10=Female, 11=Male
  • Plant Phenology: 13=Flowering, 14=Fruiting, 15=Budding

Both the group parameter and value parameter should be included in the URL. And term_value_id should be able to accept a comma-separated list of more than one value. (But correct this Wiki if discovered otherwise!)

To exclude observations with particular annotations, use the following similar to the above:

  • &without_term_id= the annotation group
  • &without_term_value_id= the value within the group

Project-related queries

&project_id= is used by the standard filter window, and restricts a search to observations in a selected Project. This is also a good way to look up and copy the Project ID for use with other Project queries.

Use not_in_project= to find observations that are in a place and not in a project, for example, all beetles in NZ currently not in the NZ beetles project:
place_id=94916 New Zealand Zone
taxon_id=47208 Coleoptera
https://www.inaturalist.org/observations?place_id=94916&taxon_id=47208&not_in_project=nz-beetles-and-their-grubs

If a project is more complicated than just taxa in a place, you can filter observations based on matching the complete rule-set of a project, or on not matching it:

  • &apply_project_rules_for=
  • &not_matching_project_rules_for=

NOTE: these are from the iNaturalist API documentation found here (scroll down the page at that link). I haven’t specifically tested these. If they don’t work as expected, please reply to this post.

41 Likes
Boolean operators for iNat searches
Show me what I haven't seen yet
A Tree Survey Question
How to find a list of "unidentified/unknown" observations?
Create Filter by Location Accuracy
Dealing with low quality observations and inappropriate content on iNaturalist
How to query a geographic range without a specific user ID and observation field?
How to exclude user-specified taxa in a search?
Western North America as a location for Identify searches?
Include taxon_geoprivacy in search filters
Provide a way to filter observations by disputed IDs
Select Multiple Places in Filters
Combine places when searching?
Make identifications searchable
Allow Boulean or Advanced Searches
How to search for subdivisions within plants?
Easier to search for common conflicting IDs
Searching Observations using Annotations
What is the one thing you wish you could do on iNaturalist?
What is the one thing you wish you could do on iNaturalist?
fixed categories possible?
Excluding self in search
Separate Lichen and Fungi into two Categories?
Is there a way to search for identifications I've made of a specific species?
Geographically Limited Searches
Place: If it already exists on Google Maps do I need to create it also in iNaturalist?
Records on iNat that are of "no value" because they're not identifiable
Filter observations by camera model
Create taxon field functionality analogous to observation fields
Filtering searches by geographic features (mountains, riparian, etc)?
Find/Exclude observations without a location?
Using R to extract observations of a specific phenological state
Search observations by color, etc on Identify
Exclude certain taxa in Identify user interface
Identification by elimination
"Open in new tab" as default from Identify

How do I add a language in an URL?

1 Like

Is there a way to search for taxa that I haven’t yet reviewed? I haven’t been able to figure out a URL for this.

For example, I want to see all Limacoidea in a specific area, that is easy, but when there are 1000s of observations I keep seeing the same ones each time I come back a do a search.

1 Like

If you’re using the Identify page, it defaults automatically to “needs ID” and reviewed=false.
https://www.inaturalist.org/observations/identify?taxon_id=512198

But you can also add reviewed=false to the Observation page URL:
https://www.inaturalist.org/observations?taxon_id=512198&reviewed=false

3 Likes

I think you can add ?locale=nl to any iNat URL to change the language, in this example, to Dutch. It’s not really a search URL though.

2 Likes

@bouteloua thanks for the feedback. Are you able to edit the original post, since it’s a Wiki?

1 Like

Yes! I made a couple edits on Feb 12th to test it out.

2 Likes

Excellent.

1 Like

It worked well. I’ve just added a simple observation field search.

2 Likes

This is excellent, I just used to it to focus on my local area and things of interest to me.

I was also interested in using the IDENTIFY pop up window, and using your method I adjusted the URL and IT WORKED… Really great, thanks…

My example URL (notice the adjustment for IDENTIFY)
https://www.inaturalist.org/observations/identify?place_id=130874,30464,30479,30481&quality_grade=needs_id&iconic_taxa=Plantae,Fungi,Insecta

2 Likes

Is there a way to exclude certain taxa? Say I want to see all the plant species that are NOT mosses or algae?

2 Likes

without_taxon_id parameter

multiple entries separated by comma, you just need to know the id

This does all plants in Ontario excluding mosses and cacti (Ontario has way too many cacti it gets boring looking at them all)
For instance https://www.inaturalist.org/observations?place_id=6883&subview=table&taxon_id=47126&view=species&without_taxon_id=311249,47903

3 Likes

Ontario has lots of cacti??

2 Likes

Nearly every windowsill you look at has one.

But amazingly we do have some native growing ones.

4 Likes

That’s exactly what I needed, thank you!

1 Like

This is very useful thanks…previously I have always “glazed over” when any sort of code or URL has been mentioned but atf least the first one or two examples sound feasible even to me…assuming the Url changes in the browser header with each filter.

Am i correct in my impression that it is not possible to bulk edit the results of such searches even using the filter to producd only kne’s own obs?

2 Likes

@kaipatiki_naturewatc Yes, the URL updates in the search box with each filter change. Anything you can filter through the user interface, you can copy/save/bookmark a URL that re-creates that filter each time you go there. After playing with the filter and seeing the resulting URL changes for a while, you should get a pretty good idea of how it works.

And then there are some other filter parameters NOT available through the regular user interface, such as the without_taxon_id= parameter mentioned earlier. This wiki will be especially helpful for documenting those, and I hope will eventually include a complete list of them. (I’ve been collecting a list as I learn about them, but it’s probably missing some things…)

If by “bulk edit” you mean edit the contents of your own observations, I think you would be limited to the capabilities of the Batch Edit functionality at https://www.inaturalist.org/observations/{{username}}, after applying an appropriate Search filter. And that search filter could include manually adding other URL parameters not available through the standard Search filter.

1 Like

Is there a parameter such as without_place_ID. I’m aiming to exclude certain locations from my search. I tried <> and - but this did not work.

To create the opposite search of my URL
https://www.inaturalist.org/observations/identify?place_id=130874,30464,30479,30481&quality_grade=needs_id&iconic_taxa=Plantae,Fungi,Insecta

1 Like

try not_in_place

1 Like

That appears to have worked.

https://www.inaturalist.org/observations/identify?page=5&iconic_taxa=Plantae%2CFungi%2CInsecta&not_in_place=130874%2C30464%2C30479%2C30481

So perhaps the wiki needs a few criteria ideas for IS and IS NOT. With that in place, I think this is a very powerful method to manage views in Inat. It is perhaps not for everyone, but for some, this would certainly give much greater flexibility.

2 Likes