# Recipes

## Search All My Recipes

<mark style="color:blue;">`GET`</mark> `https://api.brewersfriend.com/v1/recipes`

This endpoint allows you to get your recipes.

#### Query Parameters

| Name               | Type    | Description                                                                                                               |
| ------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------- |
| ingredients        | boolean | Defaults to false (with a max limit of 20 when requesting ingredients)                                                    |
| id                 | string  | Recipe ID                                                                                                                 |
| author             | string  | Author Name                                                                                                               |
| group\_id          | string  | Group ID                                                                                                                  |
| brewer\_author\_id | string  | Brewer Author ID                                                                                                          |
| sort               | string  | <p>created\_at, updated\_at or title<br><strong>Formatted:</strong> created\_at:1 for ASC and created\_at:-1 for DESC</p> |
| id                 | number  | Recipe id                                                                                                                 |
| folder\_id         | number  | Recipe folder id                                                                                                          |
| keyword            | string  | Searches recipe name, ingredient name, notes and style.                                                                   |
| updated\_from      | string  | <p>Recipes updated date start in the format<br>YYYY-MM-DD</p>                                                             |
| updated\_to        | string  | <p>Recipes updated date end in the format <br>YYYY-MM-DD</p>                                                              |
| created\_from      | string  | <p>Recipes created date start in the format <br>YYYY-MM-DD</p>                                                            |
| created\_to        | string  | <p>Recipes created date end in the format <br>YYYY-MM-DD</p>                                                              |
| snapshots          | boolean | Recipe snapshots                                                                                                          |
| limit              | number  | Defaults to 20 with a max of 100 (unless getting ingredients then remains at 20 max)                                      |
| offset             | number  | Defaults to 0                                                                                                             |

#### Headers

| Name      | Type   | Description   |
| --------- | ------ | ------------- |
| X-API-KEY | string | Your API key. |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```javascript
{
  "message": "success",
  "count": "552",
  "recipes": [
    {
      "id": "578357",
      "recipetoken": "5d07b59a2f320",
      "brewer_author_id": "119823",
      "title": "Juicy Bitcoin",
      "folder_id": null,
      "author": "",
      "brewmethod": "allgrain",
      "styleid": "50",
      "style_free": "",
      "batchsize": "31",
      "batch_size_mode": "f",
      "boilsize": "36",
      "boiltime": "60",
      "boilgravity": "1.057",
      "efficiency": "80",
      "displayunits": "us",
      "mash_thickness": "1.3",
      "grain_temp": null,
      "sugar_scale": "sg",
      "og": "1.066",
      "fg": "1.012",
      "abv": "7.12",
      "ibutinseth": "47.12",
      "iburager": "44.28",
      "srmmorey": "3.83",
      "srmdaniels": "9.19",
      "srmmosher": "5.88",
      "srmecbmorey": "7.54",
      "abvequation": "standard",
      "ibuequation": "tinseth",
      "srmequation": "morey",
      "dpequation": "wk",
      "waterprofile": "Balanced Profile",
      "ca2": "0",
      "mg2": "0",
      "so4": "0",
      "na": "0",
      "cl": "0",
      "hco3": "0",
      "waterprofile_custom": "0",
      "waternotes": "",
      "notes": "15 min WP at flame out\r\n10 min Rest",
      "awardwinning": "0",
      "yeaststarter": "0",
      "pitchrate": "0.35",
      "primary_temp": "66",
      "primingmethod": null,
      "primingamount": "",
      "primingtemp": null,
      "co2level": "1.02",
      "co2unit": "Volumes",
      "equipment_profile_id": "119209",
      "nochillextraminutes": null,
      "hop_utilization_factor": null,
      "beerXML": null,
      "url": "",
      "public": "0",
      "searchable": "0",
      "deleted": "0",
      "just_imported": "0",
      "copy_parent_id": "578356",
      "snapshot": "1",
      "viewcount": "0",
      "brewcount": "1",
      "updated_at": "2019-07-10 19:56:11",
      "created_at": "2019-06-17 15:45:30",
      "brewprint_id": null,
      "average_rating": null,
      "total_rating": null,
      "total_ratings": null,
      "share_following": "0",
      "imported_from": null,
      "water_profile_id": "11708",
      "ph": "5.76",
      "cloned_from": null,
      "equipment_profile": "{\"id\":\"119209\",\"loginid\":\"119823\",\"name\":\"1  BBL\",\"evaporation_rate\":\"4\",\"kettle_deadspace\":\"10\",\"grain_absorption\":\"0.44\",\"hops_absorption\":\"0.15\",\"cooling_shrinkage\":\"4\",\"default_efficiency\":\"70\",\"mash_thickness\":\"2.0\",\"mash_tun_volume\":\"\",\"mash_tun_temp_loss\":\"2\",\"lauter_deadspace\":\"\",\"misc_loss\":\"1\",\"hydrometer_offset\":\"\",\"hydrometercalibration\":\"\",\"wortcorrectionfactor\":\"1\",\"chillmethod\":\"Counterflow Chiller\",\"mashwaterunit\":\"qt\",\"updated_at\":\"2019-07-05 18:46:21\",\"created_at\":\"2018-03-28 16:19:18\",\"position\":\"1\",\"brand_id\":\"0\",\"brand\":\"TestEquipment\",\"group_id\":null,\"location_id\":null}",
      "group_id": null,
      "last_edited_id": null,
      "stylename": "American IPA",
      "folder_name": null,
      "brew_sessions": "[{\"userdate\": \"2019-06-17\", \"breweventid\": 196351}]"
    }
  ]
}
```

{% endtab %}

{% tab title="401 Could not find a cake matching this query." %}

```javascript
{
    "message": "unauthorized",
    "detail": "invalid api key"
}
```

{% endtab %}
{% endtabs %}

```javascript
curl -H "X-API-Key: 535ad06757dd29bd83be1e635ec10530407a8XAVTX" \
https://api.brewersfriend.com/v1/recipes
```

## Get One Recipe

<mark style="color:blue;">`GET`</mark> `https://api.brewersfriend.com/v1/recipes/:recipe_id`

This endpoint allows you to get one recipe, you can also get one recipe in BeerXML.

#### Path Parameters

| Name       | Type   | Description |
| ---------- | ------ | ----------- |
| recipe\_id | number | Recipe id   |

#### Headers

| Name      | Type   | Description   |
| --------- | ------ | ------------- |
| X-API-KEY | string | Your API key. |

{% tabs %}
{% tab title="200 " %}

```
{
  "message": "success",
  "count": "1",
  "recipes": [
    {
      "id": "578357"
      ...
    }
  ]
}
```

{% endtab %}
{% endtabs %}

```javascript
curl -H "X-API-Key: 535ad06757dd29bd83be1e635ec10530407a8XAVTX" \
https://api.brewersfriend.com/v1/recipes/578357
```

## Get Recipe Photos

<mark style="color:blue;">`GET`</mark> `https://api.brewersfriend.com/v1/recipes/:recipe_id/photos`

This endpoint allows you to get recipe photos.

#### Path Parameters

| Name       | Type   | Description |
| ---------- | ------ | ----------- |
| recipe\_id | number | Recipe id   |

#### Headers

| Name      | Type   | Description   |
| --------- | ------ | ------------- |
| X-API-KEY | string | Your API key. |

{% tabs %}
{% tab title="200 " %}

```javascript
{
  "message": "success",
  "photos": [
    {
      "full": "https://api.brewersfriend.com/v1/recipes/9/photo",
      "scale_50": "https://api.brewersfriend.com/v1/recipes/9/photo/1905fbdd-5b2e-4f4d-b5fb-9308e3921ba4?scale=50",
      "200_x_200": "https://api.brewersfriend.com/v1/recipes/9/photo/1905fbdd-5b2e-4f4d-b5fb-9308e3921ba4?bestfit=true&width=200&height=200",
      "500_x_500": "https://api.brewersfriend.com/v1/recipes/9/photo/1905fbdd-5b2e-4f4d-b5fb-9308e3921ba4?bestfit=true&width=500&height=500"
    }
  ]
}
```

{% endtab %}
{% endtabs %}

## Get One Recipe Photo

<mark style="color:blue;">`GET`</mark> `https://api.brewersfriend.com/v1/recipes/:recipe_id/photo`

This endpoint allows you to get recipe photos.

#### Path Parameters

| Name       | Type   | Description                     |
| ---------- | ------ | ------------------------------- |
| uuid       | string | Returned in the photos endpoint |
| recipe\_id | number | Recipe id                       |

#### Query Parameters

| Name    | Type    | Description                       |
| ------- | ------- | --------------------------------- |
| width   | number  | Width of the returned image       |
| height  | number  | Height of the returned image      |
| scale   | number  | Scale the image size 0 - 100      |
| bestfit | boolean | Requires width  and height params |
| crop    | boolean | Requires width and height params  |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.brewersfriend.com/api/recipes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
