Discussions
Issue retrieving species data with filters — unexpected empty response
Hi everyone,
I’m running into an issue while querying the FishBase API and wanted to check if anyone else has experienced something similar. I’m trying to pull species data using specific filters (genus + habitat + limit), but the endpoint returns an empty array even though the species clearly exists in the FishBase dataset.
Example scenario:
Querying a genus alone works
Adding a habitat filter returns nothing
Removing all filters gives results, but not the ones expected
I’m wondering:
Are there known limitations when combining certain filters in the FishBase API?
Does the API require using exact capitalization or formatting for fields like “Habitat” or “Environment”?
Is there a recommended way to test queries to confirm whether the issue is with the API or the query structure?
Any guidance or examples would be appreciated. Thanks!