openfoodfacts / open-prices

An open database of prices 🧾💸💰🏷️🤑🍽️
https://prices.openfoodfacts.org
GNU Affero General Public License v3.0
35 stars 11 forks source link

Also sync products that are no longer sold ("obsolete") #281

Open raphodn opened 5 months ago

raphodn commented 5 months ago

Story

Some products that are added on Open Prices appear as "no longer sold" on Open Food Facts. But the OFF API only returns "currently sold" products, so we don't fetch any information for the "no longer sold" / archived products.

Example

For example : 3596710346561 : Open Food Facts / Open Prices

image

stephanegigandet commented 5 months ago

@raphodn products that are marked "no longer sold" are returned by the API: https://world.openfoodfacts.org/api/v3/product/3596710346561/sauce-tomate-poivron-aubergine-auchan

raphodn commented 5 months ago

@raphodn products that are marked "no longer sold" are returned by the API: https://world.openfoodfacts.org/api/v3/product/3596710346561/sauce-tomate-poivron-aubergine-auchan

After discussion on Slack, the obsolete products are indeed available in the API and in the CSV export, but not in the JSONL export. And there is no easy way to identify them.

An idea would be to have a seperate export with only obsolete products : see https://github.com/openfoodfacts/openfoodfacts-server/issues/8338