gbif / gbif-api

GBIF API
Apache License 2.0
27 stars 5 forks source link

API number of results limit by default #47

Closed RicardoOrtizG closed 4 years ago

RicardoOrtizG commented 4 years ago

I am having problems with de API´s calling to obtain information on the datasets published by GBIF Colombia's node. It currently has a limit of 1000 records by default and that number of datasets was exceeded a few weeks ago ;), I would like to know if you can change the default value since the "limit" parameter is being overwritten such as API documentation describe, or maybe give me some advice about how I can get this information otherwise.

The API calling is: http://api.gbif.org/v1/node/7e865cba-7c46-417b-ade5-97f2cf5b7be0/dataset?limit=10000

MattBlissett commented 4 years ago

Hi Ricardo,

You need to use the offset parameter to fetch the second page of results:

http://api.gbif.org/v1/node/7e865cba-7c46-417b-ade5-97f2cf5b7be0/dataset?limit=1000&offset=1000

It's best to check how many results were returned, and set the offset accordingly. We don't intend to change the maximum returned in one go, but it's possible.

RicardoOrtizG commented 4 years ago

Thanks a lot, that solved the problem!