Images

Although we recommend rotating photos manually and uploading a new version of the image, the OFF API allows you to make api calls to automate this process. You can rotate existing photos by setting the angle to 90º, 180º, or 270º clockwise.

get/cgi/product_image_crop.pl

Request

  • Base URL
    https://world.openfoodfacts.net
  • Auth
    API key in header User-Agent

Query parameters

codestring required
Example:4251105501381

Barcode of the product

idstring required
Example:ingredients_en
imgidstring required
Example:1
anglestring required
Example:90

Response

OK

statusstring
imagefieldstring

Example response

{
  "status": "status ok",
  "imagefield": "nutrition_fr",
  "image": {
    "display_url": "nutrition_fr.67.400.jpg"
  }
}

Changes

    • breaking

      added the new required query request parameter code

    • breaking

      the response's body type changed from no type to object for status

    • info

      added the optional property image to the response with the status

    2 more changes in this revision