Accessing yummly.com API with YummlyR

knitr::opts_chunk$set(collapse = T, comment = "#>")
library(yummlyr)

Indroduction

Yummly.com is one of the world’s largest and most powerful recipe search site. Moreover, it more or less consistent API endpoints for searching and retreiving recipes and this packages aims to provide R bindings for those endpoints.

This document is not intended to be exhaustive nor comprehensive but rather a brief introduction to some of the more common bits of functionality and some basic examples of how they can be used.

Usage

First of all, obtain an API credentials from Yummly.com.

After that you can use save_yummly_credentials to presist the application ID and application key between querries, or supply the directly to search_recipes and get_recipe functions.

Search Recipes

search_recipes function corresponds to Search Recipes API call and is used to search for recipes fitting certain criterias. Example search response. Simplest call looks like this:

search_recipes('bacon')

YummlyR supports wide variety of criterias:

For example,

search_recipes("onion soup", allowed_ingredient = "bacon")

will return onion soup recipes that have bacon as one of the ingredients. More detailed expanations of Yummly's Search API with example can be found here.

NOTE: Allowed values for ingeredient, diet, allergy, cuisine, course, holiday, nutrition and flavor are defined by Yummly.com metadata and saved inside the package for convenience. Available metadata can be accessed using get_metadata function, for example,

get_metadata('holiday')

will return you data.frame with information about available holiday keywords.

Get Recipe

Fetch a recipe by its recipe ID. Example recipe response. For example,

get_recipe("French-Onion-Soup-The-Pioneer-Woman-Cooks-_-Ree-Drummond-41364")

returns a detailed information about French Onion Soup.



Try the yummlyr package in your browser

Any scripts or data that you put into this service are public.

yummlyr documentation built on May 1, 2019, 7:30 p.m.