Discussions

Ask a Question
Back to all

How should pagination be handled when retrieving FishBase species data?

I’m testing the FishBase API and trying to retrieve species-related data for a small research application. I noticed that the documentation includes pagination and separate routes such as species, species by id, and comnames.
Before I build the data-fetching logic, I’d like to confirm the recommended approach:

  1. Should the client always use pagination parameters for the species endpoint?
  2. Is there a preferred page size or maximum limit?
  3. When combining scientific names with common names, is it better to request the species and comnames endpoints separately?
  4. Are pagination values consistent across the different routes?
  5. What is the best way to handle an empty result or a response where a requested field is unavailable?

Some of the API routes have examples, while others are still being filled out, so a short working example using curl would also be helpful.
Has anyone already implemented pagination with the FishBase API and can share the approach that worked for them?