This library provides a lightweight python wrapper for the Fatsecret API with the goal of making it easier to visualize the data retrieved from the API. To that end, this library will usually return lists of identical elements for ease of plotting, discarding extra header fields that the Fatsecret API otherwise includes. All API calls return either a single or list of JSON dictionaries.


Install the module via pip:

$ pip install fatsecret

or easy_install:

$ easy_install fatsecret


Register for a developer account at Fatsecret. You will need your Consumer Key and Consumer Secret key for your application.


Fatsecret supports both delegated and public calls. Only through delegated calls can you access Fatsecret user profile data.

If you’re only interested in the public data you only require a session to make HTTP requests:

from fatsecret import Fatsecret

fs = Fatsecret(consumer_key, consumer_secret)

Once you have created a session then you can start reading from Fatsecret’s public food and recipe database

foods = fs.foods_search("Tacos")

OAuth Examples

You will need to authenticate to a Fatsecret user profile via OAuth 1.0 in order to access profile specific data such as the meal diary, favorite meals, etc.

API Reference