Hi Peter, I am surprised we show numOccurrences in the search results. As this is changing in real time we cannot store that in our search index. I would think this property should not be exposed in species search results. The best way to get occurrence counts is using the occurrence metrics service btw, not the search:
http://api.gbif.org/v1/occurrence/count?taxonKey=3134959 <http://api.gbif.org/v1/occurrence/count?taxonKey=3134959> http://api.gbif.org/v1/species/3134959 <http://api.gbif.org/v1/species/3134959> Markus > On 17 Nov 2015, at 16:17, Peter Desmet <peter.desmet.work at gmail.com> wrote: > > Hi, > > In the species/search API, one of the properties of a taxon is > "numOccurrences", which I assume is the number of occurrences across GBIF for > this taxon. The value seems to be always "0" though. > > Example: > > http://api.gbif.org/v1/species/search?datasetKey=d7dddbf4-2cf0-4f39-9b2a-bb099caae36c&rank=species&status=accepted > > <http://api.gbif.org/v1/species/search?datasetKey=d7dddbf4-2cf0-4f39-9b2a-bb099caae36c&rank=species&status=accepted> > > First result: > > http://www.gbif.org/species/3134959 <http://www.gbif.org/species/3134959> > > On that page you can see 47,617 occurrences, 332 infraspecies. The API > however gives: > > numOccurrences: 0 > numDescendants: 332 (= correct) > > Is this a bug? > > Related: > > - I know I can find the number of occurrences for a taxon by doing an > occurrence search (http://api.gbif.org/v1/occurrence/search?taxonKey=3134959 > <http://api.gbif.org/v1/occurrence/search?taxonKey=3134959>), but that means > doing an extra call per taxon. > > - Why does the species API list far fewer properties per taxon > (http://api.gbif.org/v1/species/3134959 > <http://api.gbif.org/v1/species/3134959>) than the species search API? E.g. > numOccurrences, descriptions, etc. > > Cheers, > > Peter > > _______________________________________________ > API-users mailing list > API-users at lists.gbif.org > http://lists.gbif.org/mailman/listinfo/api-users -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.gbif.org/pipermail/api-users/attachments/20151117/feae7ab3/attachment.html>
