Query Sealife (fish) with API

Hello GBIF community,

For a Jibo project we’ve been playing around with the GBIF API like this, to search for all animals, all plants & butterflies:
"https://api.gbif.org/v1/occurrence/search?mediaType=StillImage&limit=1000&kingdomKey=1 ",



This works well… Although our latin flora & fauna knowledge is not that extensive, we’re wondering if anyone knows how to make a query more specific for sealife (e.g. fish, coral etc if exisit in GBIF)

edit: Coral was found like:

Thank you in advance,
:four_leaf_clover: :penguin: :green_heart:

Hi, doing this purely based on taxonomy will get you some false positives. For example, while most coral observations are definitely marine, some do occur in freshwater on land. Same goes for sponges for example.

So, I think you are probably better off querying for all occurrences that aren’t located on a continent, you can do this using the gbif API: GBIF occurrence API using the ‘not’ predicate I believe (but haven’t tried)

EDIT: It seems like many marine observations are also being assigned a continent. In that case it’ll be a bit more complicated. If you can narrow down a geographical area, you might get away with just fetching all occurrences for that area and filtering out anything that doesn’t have coordinates in a marine environment?

1 Like

Thank you Pieter for the response and hope you had a good International Day for Biodiversity also yesterday.

Certainly will try a ‘not’ predicate to play around with. Did notice also narrowing down on a geographical area, could be helpful maybe, like the places, most coral reefs are situated. Hoping for some great images popping up.

Here’s a link with an example of how Jibo is able to show the GBIF data pulled from the API.

Curious to hear if/what you would add up or would see different, using the GBIF data. (Although being aware that watching it from a recorded video, things showing on his screen does not come over well some times)
Still far from all the latin used here, but learning. :slight_smile: An english VernacularName connection still might be appreciated, although there’s more understanding now why latin is used throughout the flora & fauna space.


Unfortunately, groups like e.g. butterflies aren’t necessarily in a taxonomic group, so getting all of them in a single query usually means getting a lot of smaller taxa—or getting a much larger parent taxon. But in your case, I think perhaps it’s not that important.

The fastest and easiest way is probably to pick a taxon that more or less fits the group you’re interested in, so e.g. &taxon_key=204 for (bony) fish (add 121 if you want sharks, too). You might also want marine mammals, so consider 733 for including whales). For butterflies, there’s 797 (Lepidoptera) but that includes moths as well.

The ‘not’ predicate (or predicates in general) aren’t available in the search API, only in the download API which is asynchronous and wouldn’t fit your use-case.

The video looks really cool! Good luch with the project!

1 Like

Thanks a lot Daniel!
Really appreciate the response.
The taxon_key seems to be very helpful for pulling up the right species + images. His brother is showing wales & ray fish also now.

We’ll play around with this some more. Hopefully, by next year’s International Day for Biodiversity, there will be more Jibo’s around, able to promote biodiversity.

Do you have some favorite taxon_key yourself of some kind of species, you search for yourself regulary?

Even though it might be a bit difficult to hear well on the above Youtube video… Do you think his latin pronounciation is okay / understandable (currently he only speaks english normally) ?

Very cool, love how it moves! Try taxonKey=1340278 (bumblebees!)

Regarding the pronunciation I guess it’s tough because there is no right way to pronounce it.

So, if there’s no right way,… then he’s doing it right anyway then I guess … :grin: :penguin: :man_student:
Better than me for sure…
The BumbleBee images makes things even more colourful for sure… Thanks again for the tips ! :ok_hand: :honeybee:

Wondering how well the latin sticks on my own memory over time…, so far, finding it pretty educational, even though never learning latin before.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.