choppingboard.recipes API Specification API Reference

The choppingboard.recipes API allows you to convert recipe web pages into machine readable JSON.

This specification lists out the ways you can interact with the API.

The API converts recipes from the following popular recipe web sites:

allrecipes.com foodnetwork.com
food.com chowhound.com
epicurious.com bettycrocker.com
eatingwell.com kraftrecipes.com
health.com cookinglight.com
myrecipes.com seriouseats.com
cooking.nytimes.com bbc.co.uk
bbcgoodfood.co.uk And more!

Most recipe sites that rank high on Google should work.

If you'd like to test a recipe page not listed above open the choppingboard.recipes home page and paste a link in the Try it out section.

To use the API first you'll need an API key.

You can get an API key by signing up and going to the profile page. Once you've done that, you should be able to use all the endpoints below.

API Endpoint
https://choppingboard.recipes/api/v0
Terms of Service: https://choppingboard.recipes/terms.html
Contact: support@choppingboard.recipes
Schemes: https
Version: 0.0.1

Authentication

recipe_auth

in
query
name
key

Paths

/recipe

GET /recipe

The /recipe endpoint is where the magic happens.

Make sure to put the key parameter in your call.

Example:

curl https://choppingboard.recipes/api/v0/recipe?key=b7d5d490782316654610b18e2f8b512e&q=http%3A%2F%2Fallrecipes.com%2Frecipe%2F234974%2Fmoms-chicken-pot-pie%2F&getcopyrighted=y

You can see above that I've used my API key under the key parameter.

I've also added the recipe URL as a URL encoded value under q.

You can optionally add another parameter, getcopyrighted=y. It will return an object keyed on copyrighted in the response. The copyrighted object will contain a description and image, if available.

Please be aware that using copyrightable material can carry penalties. Content outside of the copyrighted object are free from copyright. If you want to be on the safe side, don't use getcopyrighted=y.

q

A recipe web page URL.

A good example URL is http://allrecipes.com/recipe/234974/moms-chicken-pot-pie/

type
string
in
query
getcopyrighted

If set, returns an object with image and description data under the key copyrighted.

If you wish to access copyrightable data as part of the JSON response, set getcopyrighted=y.

If you don't want to use the copyrightable data, just omit the key.

type
string y
in
query
200 OK

You'll get a successful 200 response when the following conditions are met:

  • You supplied a recipe URL with the q parameter

  • You supplied a valid API key with the key parameter

  • The URL you supplied has a recipe with metadata markup

If there is an issue, the API will respond with a verbose error code seen below. You can identify what the issue is and recover gracefully from it.

401 Unauthorized

TODO

Response Content-Types: application/json
Response Example (200 OK)
{
  "name": "Traditional fruit salad",
  "url": "http://www.taste.com.au/recipes/traditional-fruit-salad/0e478cd0-78a6-4e01-8411-0eedbaf98ae2",
  "yield": "4",
  "ingredients": [
    "600g pineapple, peeled, chopped",
    "800g rockmelon, chopped",
    "800g seedless watermelon, chopped",
    "250g strawberries, hulled, quartered",
    "200g seedless green grapes",
    "200g seedless red grapes",
    "4 passionfruit, halved",
    "1 tablespoon lime juice"
  ],
  "instructions": [
    "Place pineapple, rockmelon, watermelon, strawberries, grapes, passionfruit pulp and lime juice in a large glass or ceramic bowl.",
    "Toss to combine.",
    "Serve."
  ],
  "totalTime": {
    "iso": "PT15M",
    "en": "15 minutes"
  },
  "prepTime": {
    "iso": "PT15M",
    "en": "15 minutes"
  },
  "cookTime": {
    "iso": "PT0M",
    "en": "0 minutes"
  },
  "copyrighted": {
    "image": "http://img.taste.com.au/jhfQX3Eq/taste/2016/11/traditional-fruit-salad-60324-1.jpeg",
    "description": "Make the most of seasonal fruits in this traditional fruit salad."
  }
}

Schema Definitions

Recipe: object

name: string
url: string
yield: string
ingredients: string[]
instructions: string[]
totalTime: object
prepTime: object
cookTime: object
copyrighted: object
Example
{
  "name": "Traditional fruit salad",
  "url": "http://www.taste.com.au/recipes/traditional-fruit-salad/0e478cd0-78a6-4e01-8411-0eedbaf98ae2",
  "yield": "4",
  "ingredients": [
    "600g pineapple, peeled, chopped",
    "800g rockmelon, chopped",
    "800g seedless watermelon, chopped",
    "250g strawberries, hulled, quartered",
    "200g seedless green grapes",
    "200g seedless red grapes",
    "4 passionfruit, halved",
    "1 tablespoon lime juice"
  ],
  "instructions": [
    "Place pineapple, rockmelon, watermelon, strawberries, grapes, passionfruit pulp and lime juice in a large glass or ceramic bowl.",
    "Toss to combine.",
    "Serve."
  ],
  "totalTime": {
    "iso": "PT15M",
    "en": "15 minutes"
  },
  "prepTime": {
    "iso": "PT15M",
    "en": "15 minutes"
  },
  "cookTime": {
    "iso": "PT0M",
    "en": "0 minutes"
  },
  "copyrighted": {
    "image": "http://img.taste.com.au/jhfQX3Eq/taste/2016/11/traditional-fruit-salad-60324-1.jpeg",
    "description": "Make the most of seasonal fruits in this traditional fruit salad."
  }
}