treflehq / trefle-api

🍀 Trefle is a botanical JSON REST API for plants species, allowing you to search and query over all the registered species, and build the next gardening apps and farming robots.
https://trefle.io
GNU Affero General Public License v3.0
485 stars 51 forks source link

Support for a page size parameter #44

Closed SebastianKG closed 4 years ago

SebastianKG commented 4 years ago

Is your feature request related to a problem? Please describe. Trying to do large-scale processing of the Trefle dataset takes a long time due to the hardcoded page size of 10.

Describe the solution you'd like A page size parameter across all resource-bearing endpoints that changes the amount of results returned. It would be excellent if this went up to at least 1000. The /plants endpoint is a specific painpoint for my use case.

Describe alternatives you've considered The only possible alternative is making tens of thousands of requests instead of hundreds

lambda2 commented 4 years ago

Hey @SebastianKG, unfortunately we're currently running Trefle in small servers, and can't allow too heavy responses as it will slow down everybody. So in order to ensure a quality service to all users, we prefer to limit to 20 results. We will soon provide an archive of our database for you to download, and thus avoid iterating on all the plants.

SebastianKG commented 4 years ago

@lambda2 having a downloadable archive would actually solve the problem just as well, I will wait for that. Thank you