Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

page_count is wrongly equivalent to page_size #9449

Closed
CharlesNepote opened this issue Dec 1, 2023 · 3 comments
Closed

page_count is wrongly equivalent to page_size #9449

CharlesNepote opened this issue Dec 1, 2023 · 3 comments
Labels
API READ All READ APIs include Product, Search… API Issues related to the Open Food Facts API. More specific labels exist & should be used (API WRITE…) pagination 🔎 Search

Comments

@CharlesNepote CharlesNepote added pagination API Issues related to the Open Food Facts API. More specific labels exist & should be used (API WRITE…) 🔎 Search API READ All READ APIs include Product, Search… labels Dec 1, 2023
@teolemon
Copy link
Member

teolemon commented Dec 1, 2023

cc @alexgarel

@benbenben2
Copy link
Collaborator

@stephanegigandet
Copy link
Contributor

@CharlesNepote It is working as expected, page_count is the number of results you have for the requested page.

If you request page 2 for instance: https://world.openfoodfacts.org/cgi/search.pl?action=process&json=1&nocache=1&tagtype_0=labels&tag_contains_0=contains&tag_0=en:Fabriqu%C3%A9%20en%20France&fields=code,labels&page_size=200&page=2

You get this:
count: 212,
page: 2,
page_count: 12,
page_size: 200,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API READ All READ APIs include Product, Search… API Issues related to the Open Food Facts API. More specific labels exist & should be used (API WRITE…) pagination 🔎 Search
Projects
None yet
Development

No branches or pull requests

5 participants