openfoodfacts-python
openfoodfacts-python copied to clipboard
how to get categories by page
i can get how to have categories by page with page_size. running facets.get_categories() is very long, i would like to load page by page my view from a thread... thank you
Hey @jerome-diver Can you please elaborate and provide some examples, if possible?
@Anubhav-Bhargava i can imagine what could be a request, but i can not give an example about something i don't know how it is working.
I would like to get categories facets by page for a given page_size, and for selected country and/or selected langage (and sorted_by category name):
french_categories_page2 = openfoodfacts.factes.get_categories(country="France", page=2, page_size=25, sorted_by='name')
@Anubhav-Bhargava, i answered but you didn't tell me how to get products by categories for a defined country with the total products count number. Could you help me with that please ?
@jerome-diver Currently there is no such functionality available. I've raised a request with the team to look into it. Will update you if there's any progress.
New doc: https://openfoodfacts.github.io/api-documentation/