Python wrapper for the Spoonacular API
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
tests Fix the failing tests Sep 9, 2018
.gitignore Update version to 2.0.0 for first PyPI release Aug 20, 2018
LICENSE Add package files ( Aug 9, 2018 Fix typo in README Aug 20, 2018
requirements.txt Add requirements and travis file Aug 7, 2018


Build Status PyPI version Python version

Want to parse a list of ingredients within a recipe? Or are you looking for a random food joke? These are just two of many endpoints provided by the marvelous Spoonacular food and recipes API. spoonacular provides a simple Python interface to this API.


The easiest way to start using this package is to install it via PyPI using pip:

$pip install spoonacular

Thank you to @sebbekarlsson for transferring ownership of the original PyPI package name.

If you'd prefer to clone and install the repository manually, follow these steps:

  1. Clone this repo: $git clone
  2. Enter the cloned directory: $cd SpoonacularAPI
  3. Install: $python install



You'll need to sign up for an account on RapidAPI to start using spoonacular. Spoonacular is a freemium API, so you'll be able to start with 50 free calls a day. Registration requires a credit card number even for the free plan, because users are charged a small amount per call if they go over the daily limit. This package has a basic system in place to try and prevent overrage charges.


import spoonacular as sp
api = sp.API("your_api_key_here")

# Parse an ingredient
response = api.parse_ingredients("3.5 cups King Arthur flour", servings=1)
data = response.json()

# Detect text for mentions of food
response = api.detect_food_in_text("I really want a cheeseburger.")
data = response.json()
>>>{"annotation": "cheeseburger", "tag":"dish"}

# Get a random food joke
response = api.get_a_random_food_joke()
data = response.json()
>>>"People are a lot less judgy when you say you ate an 'avocado salad' instead of a bowl of guacamole."



Please feel free to collaborate with a pull request or by opening an issue.