Open Food Facts Nutrients API

Endpoints for retrieving nutrition-related data and facts.

Operations 1

GET /cgi/nutrients.pl Get Nutrients List #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/open-food-facts-nutrients-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

open-food-facts-nutrients-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Open Food Facts Open Nutrients API
  description: 'As a developer, the Open Food Facts API allows you to get information

    and contribute to the products database. You can create great apps to

    help people make better food choices and also provide data to enhance the database.


    **IMPORTANT**: Please read the API introduction before using this API.'
  termsOfService: https://world.openfoodfacts.org/terms-of-use
  contact:
    name: Open Food Facts
    url: https://slack.openfoodfacts.org/
    email: reuse@openfoodfacts.org
  license:
    name: 'data: ODbL'
    url: https://opendatacommons.org/licenses/odbl/summary/index.html
    x-identifier: ODbL-1.0
  version: '2'
servers:
- description: dev
  url: https://world.openfoodfacts.net
- description: prod
  url: https://world.openfoodfacts.org
- description: proxy (for doc purpose)
  url: http://localhost:8080
security:
- userAgentAuth: []
tags:
- name: Nutrients
  description: Endpoints for retrieving nutrition-related data and facts.
paths:
  /cgi/nutrients.pl:
    get:
      summary: Get Nutrients List
      tags:
      - Nutrients
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                description: 'Nutrients and sub-nutrients of a product, with their name and default unit.

                  (e.g. saturated-fat is a sub-nutrient of fat).

                  '
                items:
                  $ref: '#/components/schemas/Nutrient'
      operationId: get-cgi-nutrients.pl
      parameters:
      - name: cc
        in: query
        description: 2 letter code of the country of the user. Used for localizing some fields in returned values (e.g. knowledge panels). If not passed, the country may be inferred by the IP address of the request.
        required: false
        schema:
          type: string
          example: us
      - name: lc
        in: query
        description: '2 letter code of the language of the user.

          Used for localizing some fields in returned values (e.g. knowledge panels).

          If not passed, the language may be inferred by the domain name prefix.

          '
        required: false
        schema:
          type: string
          example: fr
      description: Used to display the nutrition facts table of a product, or to display a form to input those nutrition facts.
components:
  schemas:
    Nutrient:
      type: object
      title: nutrient
      properties:
        id:
          type: string
          description: id of the nutrient
        name:
          type: string
          description: Name of the nutrient in the requested language
        important:
          type: boolean
          description: Indicates if the nutrient is always shown on the nutrition facts table
        display_in_edit_form:
          type: boolean
          description: Indicates if the nutrient should be shown in the nutrition facts edit form
        unit:
          description: Default unit of the nutrient
          type: string
          enum:
          - g
          - mg
          - μg
          - cl
          - ml
          - dv
          - '% vol'
          - '%'
        nutrients:
          $ref: '#/components/schemas/Nutrients'
  securitySchemes:
    cookieAuth:
      type: apiKey
      in: cookie
      name: session
      description: 'Session cookie containing user ID, username, and session token.

        The value is structured as: user_id&username&user_session&session_token

        e.g. "user_id&exampleuser&user_session&abcdefghijklmnopqrstuvwxyz123456789ABCDEFGHIJKLM".

        The session token is obtained after successful login via the `/cgi/session.pl` endpoint.

        '
    userAgentAuth:
      description: Identification using the User-Agent header. This is recommended in all requests so that we can contact you if there are issues. If we cannot identify the source of problematic API queries, we may have to block them. User-Agent header in the format 'app_name/app_version (URL or contact info)'
      type: apiKey
      in: header
      name: User-Agent
externalDocs:
  description: '**IMPORTANT**: Please read the API introduction before using this API.

    '
  url: https://openfoodfacts.github.io/openfoodfacts-server/api/