search

Method: GET POST
Version: v1
Returns result from our search

Table of contents

# Params

Params Default Description
q
string
 
The keywords you like to search for.
language
string
de-de
Language parameter like "de-de"

You can determine the allowed languages using the method get-languages.
searchtype
string
or
To change the search behavior.

OR:
Recipes must contain only one of the words.

AND:
Recipes must contain all words.

EXTENDED:
Graduated search, for example: potato tuna || rice soup
Search for (potato AND tuna) OR (rice AND soup)
The double character || is the OR separator.

Allowed Values:
  • or
  • and
  • extended
offset
int
   
limit
int
10
Allowed values are between 1 and 100
add_info
array
 
To return a list of extra information for each returned item.

Allowed Values:
  • category
  • country
  • difficulty
  • serving
  • substances
  • time_total
  • title
filters
array
 
For a more detailed search. To get all search filters, use the searchfilter API method.
How to use searchfilters:
Depending on the search filter type, we expect a string or an array.
allergen
Type: Checkbox
Array

Example:
{"filters":{"allergen":["fish"]}}
category
Type: Checkbox
Array

Example:
{"filters":{"category":["cake"]}}
country
Type: Checkbox
Array

Example:
{"filters":{"country":["it"]}}
course
Type: Checkbox
Array

Example:
{"filters":{"course":["dessert"]}}
diet
Type: Checkbox
Array

Example:
{"filters":{"diet":["vegan"]}}
difficulty
Type: Checkbox
Array

Example:
{"filters":{"difficulty":["easy"]}}
max_time
Type: Radio
String

lt = lower than
lte = lower than equal
gte = greater than equal
gt = greater than

The value after the underscore is freely selectable and filters according to the total time.

Example:
{"filters":{"max_time":"lte_45"}}
substances
Type: Substance
Array, String

lt = lower than
lte = lower than equal
gte = greater than equal
gt = greater than
bw = between, greater than value 1 and lower than value 2 (sample: bw_1000_5000)
bwe = between equal, greater than equal value 1 and lower than equal value 2 (sample: bwe_1000_5000)

The value after the underscore is freely selectable and filters based on the portion quantity.

This search filter requires a special agreement.

Example:
{"filters":{"substances":{"sugars,total":"lte_500"}}}
suitable_for_pregnancy
Type: Radio
String

This search filter requires a special agreement.

Example:
{"filters":{"suitable_for_pregnancy":"true"}}
substance_kcal_contains_percentage
Type: Substance
Array, String

Filters recipes that contain defined substances with a defined percentage of kilocalories.
Sample: Recipes with at least 50% protein content (see example)

lt = lower than
lte = lower than equal
gte = greater than equal
gt = greater than
bw = between, greater than value 1 and lower than value 2 (sample: bw_10_50)
bwe = between equal, greater than equal value 1 and lower than equal value 2 (sample: bwe_10_50)

The value after the underscore is freely selectable and filters based on the portion quantity.

This search filter requires a special agreement.

Example:
{"filters":{"substance_kcal_contains_percentage":{"protein":"gte_50"}}}

# Headers

Authorization: Bearer {YOUR-JWT-TOKEN}

# Request

Ein Beispiel für die Erstellung eines JWT Tokens findest du hier: https://developer.cookbutler.com#jwt-token-sample

curl -X GET https://api.cookbutler.com/v1/recipes/search -H "Authorization: Bearer {YOUR-JWT-TOKEN}"

# Response

{ "status": "ok", "data": { "language": "de-de", "total": { "value": 1, "relation": "eq" }, "items": 1, "recipes": [ { "id": 70, "url": "https://api.cookbutler.com/v1/recipes/search?id=70", "images": [], "optional": { "title": "Zitronenkuchen nach italienischer Art", "country": "it", "category": "Kuchen", "difficulty": "mittel" } } ] } }