Food Composition Data

With this API, you can get data from the Swedish Food Composition Database, which contains roughly 2,400 food items. For each food item, values ​​are given for over 50 nutrients.  Additional information such as FoodEx2, LanguaL™ and raw agricultural commodities can also be found. 

URL

https://dataportal.livsmedelsverket.se/livsmedel/swagger/index.html

Format

Json

Licens

The data is published under the Creative Commons Attribution 4.0 license. This means that you have permission to use and distribute our open data and create processing. The Swedish Food Agency must be stated as the source.

Symbol för License Creative Commons
Licens Creative Commons

Resultat

/api/ info

Contains API information such as name, version, release date, documentation, and status.

/api/v1/livsmedel

Retrieves a list of food items. Scientific names are given to raw agricultural commodities and are made according to several international standards which can be found at the link below:

Column name in Swedish

Translated to English

Description

Example

Nummer

Original food code

The food ID used to identify the food item

7006

Version

Version 

Date and time when the data set was last updated

2022-12-12T10:26:38.557

Typ

Type

Shows whether the food is analysed or calculated

analysed; calculated

Namn

English food name

Food name in British English

Millet grains boiled w/ salt

VetenskapligtNamn

Scientific food name

Scientific food name

Panicum miliaceum (L.).

Projekt

Project

Name of the project in which the food item was last included

2022 Snacks, sweets and beverages

Analys

Analysis

Information about which products were included in the analysis of the food item and the proportions

The 2022 analysis includes: Saltå Kvarn Hirs (34%), Go Green Skalad hirs (33%), Kung Markatta Hirs (33%)

Tillagningsmetod

Cooking method

The cooking method used in cases where the food item is calculated

boiled

 

/api/v1/livsmedel/{nummer}

Retrieves a list of food items. Scientific names are given to raw agricultural commodities and are made according to several international standards which can be found at the link below:

Column name in Swedish

Translated to English

Description

Example

Nummer

Original Food Code

The food ID used to identify the food item

7006

Version

Version 

Date and time when the data set was last updated

2022-12-12T10:26:38.557

Typ

Type

Shows whether the food is analysed or calculated

analysed; calculated

Namn

English Food Name

Food name in English, with preference given to British English

Millet grains boiled w/ salt

VetenskapligtNamn

Scientific food name

Scientific food name.

Panicum miliaceum (L.).

Projekt

Project

Name of the project in which the food item was last included

2022 Snacks, sweets and beverages

Analys

Analysis

Information about which products were included in the analysis of the food item and the proportions

The 2022 analysis includes: Saltå Kvarn Hirs (34%), Go Green Skalad hirs (33%), Kung Markatta Hirs (33%)

Tillagningsmetod

Cooking method

The cooking method used in cases where the food item is calculated

boiled

 

/api/v1/livsmedel/{nummer}/naringsvarden

Retrieves all nutritional values ​​for a specific food item. The information is mostly based on international guidelines according to EuroFIR.

Column name in swedish

Translated to english

Description

Example

Namn

English Component Name

Component name in
British/UK English

Energy (kcal) 

EuroFIRkod

Component Identifier

Component code, used to identify the component, according to EuroFIR's thesaurus

ENERC

 

Forkortning

Component Identifier

Component code, used to identify the component, according to EuroFIR's thesaurus

ENERC

Varde

Value

The value that is considered the best representative according to the decision of the data compiler

188

Enhet

Unit

From the list given in EuroFIR Unit thesaurus

Kcal; g

ViktGram

Unit Size

Weight on which energy and nutrient content is based. Always 100 grams.

100

Berakning

Calculation

The calculation used to calculate the value

443.15*0.239

Vardetyp

Value Type

The Value Type is designed to further describe the
figure in Selected Value or to give a qualitative
description of the value when no Selected Value can be given. From the list given in EuroFIR ValueType thesaurus.

Single analytical value of composite sample; Below limit of detection

Vardetypkod

Value Type code

Value type code according to EuroFIR's thesaurus 

AV; BL

Ursprung

Acquisition Type

The Value Type is designed to further describe the
figure in Selected Value or to give a qualitative
description of the value when no Selected Value can be given. From the list given in EuroFIR ValueType thesaurus.

In-house or affiliated laboratory; Food label, product information

Ursprungskod

Acquisition Type code

Acquisition Type code according to EuroFIR's thesaurus

O; L

Publikation

Publication

Scientific publication from which the value is derived

Analytical protocol Dnr 2018/00799

Metodtyp

Method Type

Type of Method used to generate the value. From the list given in EuroFIR Method Type thesaurus

Analytical result(s)

Metodtypkod

Method Type code

Method type code according to EuroFIR's thesaurus

A

Metodindikator

Method Indicator

The method used to analyse/retrieve the value. From the EuroFIR Method Indicator thesaurus

Chromatography; Ingredient level calculation procedure

Metodindikatorkod

Method Indicator code

Method Indicator code according to EuroFIR's thesaurus

MI1144; MI0004

Referenstyp

Reference type

Gives categories for types of documents or
‘publication media’ according to the list given in
Reference Type thesaurus (e.g. Book, Journal,
Software). The reference type triggers further
metadata (see below). From the list given

Report; book

Referenstypkod

Reference type code

Reference type code according to EuroFIR's thesaurus

 

R; B 

Kommentar

Comments

Comments on the value can be found here

 Product information 10112023 

 

/api/v1/livsmedel/{nummer}/klassificeringar

Retrieves all classifications for a specific food item. Food items are classified according to the international standards LanguaL™ and FoodEx2.

Column name in swedish

Translated to english

Description

Example

Huvudgrupp

Main group

Categorization of the food

Grain bulgur, couscous; Fruit fresh frozen

Typ                                                        

Type

Type of classification

Langual; FoodEx2

Fasett

Facet

Type of facet according to LanguaL™

Z Adjunct characteristics of food

Fasettkod

Facet code

Facet code according to LanguaL™

Z0005

 

Kod

Code

FoodEx2 code

A035J

 

Namn

Facet

Type of facet according to LanguaL™

FOOD INDUSTRY PREPARED

LangualId

Facet code

Facet code according to LanguaL™

Z0112

 

/api/v1/livsmedel/{nummer}/ravaror

Retrieves all raw agricultural commodities for a specific food item.

Column name in swedish

Translated to english

Description

Example

Namn

Name

The name of the raw agricultural commodity

Apricot

Tillagning

Processing method

The processing method applied to the raw agricultural commodity

Dried

Andel

Proportion

Proportion of the processed raw material

100

Faktor

Factor

The factor used to convert the ingredient into raw agricultural commodity

3.5

OmraknadTillRa

Raw agricultural commodity

Amount of raw agricultural commodity in unprocessed condition

350

 

 

/api/v1/livsmedel/{nummer}/ingredienser

Retrieves all ingredients, weight change and retention factors for a specific food item. The method used to calculate food is described at the link below:

 

Column name in swedish

Translated to english

Description

Example

Nummer

Original Food Code

The food ID used to identify the food item/the ingredient

827

Namn

English Food Name

Food name in English, with preference given to British English

Millet grains or coarsely-ground grains wholegrain

Vattenfaktor

Factor for weight change water

Factor for weight change water

19.6

Fettfaktor

Factor for weight change fat

Factor for weight change fat

1.0

Viktforetillagning

Weight before cooking

Weight before cooking

160

Vikteftertillagning

Weight after cooking

Weight after cooking

577

Tillagningsfaktor

Yield factor

The applied yield factor

Millet, boiled

Viktforetillagningtotalt

Total weight before cooking

Weight of the whole food item/dish before cooking

164

Vikteftertillagningtotalt

Total weight after cooking

Weight of the whole food item/dish before cooking

580

NaringsamnesNamn

Nutrient

The nutrient the retention factor refers to

Potassium, K

Faktor

Retention factor

Retention factor used

0.6

EuroFIRkod

Component Identifier

Component code, used to identify the component, according to EuroFIR's thesaurus

K

 

 

Number of decimals used for each nutrient or component

Number of decimals used for each nutrient or component.

Component Component Identifier Number of decimals
Energy (kcal) ENERC 0
Energy (kJ) ENERC 0
Fat FAT 1
Protein PROT 1
Carbohydrates CHO 1
Fibr FIBT 1
Water WATER 1
Alcohol ALC 2
Ash ASH 1
Sugar total SUGAR 1
Monosaccharides MNSAC 1
Disaccharides DISAC 1
Sucrose SUCS 1
Added sugar SUGAD 0
Free sugar SUGFR 0
Wholegrain total WHOLET 0
Sum of saturated fat FASAT 1
Fatty acids 4:0-10:0 F4-C10:0 2
Fatty acid 12:0 F12:0 2
Fatty acid 14:0 F14:0 2
Fatty acid 16:0 F16:0 2
Fatty acid 18:0 F18:0 2
Fatty acid 20:0 F20:0 2
Sum of monounsaturated fatty acids FAMS 1
Fatty acid 16:1 F16:1 2
Fatty acid 18:1 F18:1 2
Sum of polyunsaturated fatty acids FAPU 1
Fatty acid 18:2 F18:2 2
Fatty acid 18:3 F18:3 2
Fatty acid 20:4 F20:4 2
EPA (Fatty acid 20:5) F20:5 2
DPA (Fatty acid 22:5) F22:5 2
DHA (Fatty acid 22:6) F22:6 2
Cholesterol CHORL 1
Retinol equivalents VITA 1
Retinol RETOL 1
Beta-Carotene CARTB 0
Vitamin D VITD 2
Vitamin E VITE 1
Thiamin THIA 2
Riboflavin RIBF 2
Niacin NIA 2
Niacin equivalents NIAEQ 2
Vitamin B-6 VITB6 2
Folate FOL 1
Vitamin B-12 VITB12 2
Vitamin C VITC 1
Phosphorus P 0
Iodide ID 1
Iron FE 1
Calcium CA 0
Potassium K 0
Magnesium MG 0
Sodium NA 0
Salt NACL 1
Selenium SE 1
Zinc ZN 1

 

Reviewed 2024-11-12