# Swedish Food Composition Database API

Category: [Food and drink](https://free-web-services.com/web-services/other/food/)  
Page: https://free-web-services.com/web-services/other/food/swedish-food-composition-database-api.html  
Documentation: https://www.livsmedelsverket.se/en/about-us/open-data/food-composition-data/

The Swedish Food Agency's API gives its food composition database, with values for over 50 nutrients per food, plus classifications, ingredients and raw commodities, for example to calculate the nutrition of a meal. Page through the food list with offset and limit, then fetch the details of one food by its number; add sprak=2 for English. Responses are JSON. Free, no key needed, under the CC BY 4.0 licence with the Swedish Food Agency named as the source.

- API key: Not needed
- Pricing: Free, no key needed, under the CC BY 4.0 licence with the Swedish Food Agency named as the source.
- Commercial use: Allowed on the free plan
- From the browser: Yes (CORS)
- Formats: JSON
- Interface: REST, HTTP-GET
- Provider: livsmedelsverket.se

Example request:

```sh
curl 'https://dataportal.livsmedelsverket.se/livsmedel/api/v1/livsmedel?offset=0&limit=5&sprak=2'
```

The JavaScript works in a web page as well as in Node.js 18 or newer.

