> For the complete documentation index, see [llms.txt](https://docs.suggestic.com/graphql/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.suggestic.com/graphql/objects/recipe/recipe-object.md).

# Recipe

### List of Fields

Please note that fields not documented here may be out of date or deprecated. Not finding what you are looking for? Shoot us an [email](mailto:developers@suggestic.com).

{% hint style="warning" %}
Deprecated fields notice, the following fields are deprecated and no longer supported. They may be removed at any time without prior notice, so please avoid using them in new implementations and plan to migrate away from them as soon as possible.

Fields: `parsedIngredientLines`, `sourceUrlWorks`, `adherence`
{% endhint %}

| Field                                            | Type                                                                               | Note                                                                                                                                                                                                                                                                           |
| ------------------------------------------------ | ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `id`                                             | ID!                                                                                | The recipe's id                                                                                                                                                                                                                                                                |
| `databaseId`                                     | String                                                                             | The database id of the recipe                                                                                                                                                                                                                                                  |
| `totalTime`                                      | String                                                                             | <p>Total preparation and cooking time in text format</p><p>E.g., 5 minutes</p>                                                                                                                                                                                                 |
| `totalTimeInSeconds`                             | Int                                                                                | Total preparation and cooking time in seconds                                                                                                                                                                                                                                  |
| `name`                                           | String                                                                             | Name of the recipe                                                                                                                                                                                                                                                             |
| `numberOfServings`                               | Int                                                                                | Original recipe number of servings                                                                                                                                                                                                                                             |
| `ingredientsCount`                               | Int                                                                                | Quantity of ingredients in the recipe                                                                                                                                                                                                                                          |
| `ingredients`                                    | \[[Ingredient](https://production.suggestic.com/documentation#objects-ingredient)] | List of the recipe's ingredients                                                                                                                                                                                                                                               |
| `ingredientLines`                                | \[String]                                                                          | <p>Complete ingredient lines including quantity</p><p>E.g. 1/4 cup coconut oil, melted</p>                                                                                                                                                                                     |
| `parsedIngredientLines` (deprecated)             | [IngredientLine](/graphql/objects/recipe/parsed-ingredient-lines.md)               | Structured representation of the ingredient lines                                                                                                                                                                                                                              |
| `language`                                       | String                                                                             | Language code of the recipe                                                                                                                                                                                                                                                    |
| `courses`                                        | \[String]                                                                          | Tags representing the courses associated with the recipe.                                                                                                                                                                                                                      |
| `cuisines`                                       | \[String]                                                                          | Tags representing the cuisines associated with the recipe.                                                                                                                                                                                                                     |
| `mealTags`                                       | String                                                                             | Tags representing the meal of the day of the recipe. Options are: "Breakfast", "Lunch", "Dinner", "Snack", "Snacks", "Side dishes".                                                                                                                                            |
| `source`                                         | [Source](/graphql/objects/recipe/source.md)                                        | Source information for the recipe, including the source's URL                                                                                                                                                                                                                  |
| `mainImage`                                      | String                                                                             | URL of recipe's main image                                                                                                                                                                                                                                                     |
| `author`                                         | String                                                                             | Recipe's author-name                                                                                                                                                                                                                                                           |
| `authorAvatar`                                   | String                                                                             | URL of the image representing the author of the recipe                                                                                                                                                                                                                         |
| <p><code>adherence</code></p><p>(deprecated)</p> | Float                                                                              | [Adherence Score](/graphql/start-here/core-concepts/adherence-score.md) for the recipe                                                                                                                                                                                         |
| `adherenceDetails`                               | [Adherence](/graphql/objects/common/adherence.md)                                  | Explain the recipe's [Adherence Score](/graphql/start-here/core-concepts/adherence-score.md) and the reasoning behind it                                                                                                                                                       |
| `isUserFavorite`                                 | Boolean                                                                            | Has this recipe been marked as a favorite by the user                                                                                                                                                                                                                          |
| `inUserShoppingList`                             | Boolean                                                                            | Is this recipe currently contained in the user's shopping list                                                                                                                                                                                                                 |
| `weightInGrams`                                  | Float                                                                              | Total weight of the recipe expressed in grams                                                                                                                                                                                                                                  |
| `servingWeight`                                  | Float                                                                              | Weight, in grams, of each serving                                                                                                                                                                                                                                              |
| `isLogged`                                       | Boolean                                                                            | True if the recipe has been recently logged by the requesting user                                                                                                                                                                                                             |
| `instructions`                                   | \[String]                                                                          | <p>An array of cooking instruction lines. </p><p>If this field is null then it means it is a "<a href="/pages/-M6HAIEwFCn2MtKs0Hph">recipe from the internet</a>" and you should redirect to the recipeURL in the <a href="/pages/-M6GrKKHt9wlBMLqWCsU">source </a>object.</p> |
| `nutritionalInfo`                                | [NutritionalInfo](/graphql/objects/recipe/nutritional-info.md)                     | Nutritional information per gram of recipe. For most use cases, the nutrientsPerServing object should be preferred.                                                                                                                                                            |
| `nutrientsPerServing`                            | [nutrientsPerServing](/graphql/objects/recipe/nutrientsperserving.md)              | Nutritional information per serving                                                                                                                                                                                                                                            |
| `caloriesPerServing`                             | [caloriesPerServing](/graphql/objects/recipe/caloriesperserving.md)                | Per serving caloric value of each nutrient                                                                                                                                                                                                                                     |
| `sourceUrlWorks` (deprecated)                    | Boolean                                                                            | <p><strong>True</strong> if the URL is working. Otherwise displays <strong>False</strong>. <br>There are meal plans already created show recipes with URLs not working or invalid. This will help users to check recipes before rendering them to an external site. </p>       |
| `externalId`                                     | String                                                                             | `Id` of any external meal information which will help to associate the recipes in the external database with ours.                                                                                                                                                             |
| `relativeCalories`                               | [RelativeCalories](/graphql/objects/recipe/relative-calories-deprecated.md)        | Relative caloric value of each macronutrient as a percentage of total calories per serving.                                                                                                                                                                                    |

### Simple Example

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

```graphql
{
  recipe(id: "UmVjaXBlOmFmMDkzMjQ0LWZkZTMtNGE3Yy1iMTA4LWUxODExNTBkNmNiZQ==") {
    name
    author
    nutritionalInfo {
      calories
      protein
      carbs
      fat
    }
  }
}
```

{% endtab %}

{% tab title="Response" %}

```javascript
{
  "data": {
    "recipe": {
      "name": "Tropical Storm Detox Shake",
      "author": "Dr. William Davis",
      "nutritionalInfo": {
        "calories": 1.48,
        "protein": 0.01,
        "carbs": 0.09,
        "fat": 0.13
      }
    }
  }
}
```

{% endtab %}
{% endtabs %}

### Full Example

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

```graphql
{
  recipe(id: "UmVjaXBlOjA2YjM1ODcwLTNlYTctNDYxZC1iZGMwLWIwNmY1ZGZmOTJhMw==") {
    databaseId
    totalTime
    totalTimeInSeconds
    name
    rating
    numberOfServings
    ingredientLines
    ingredients {
      name
    }
    language
    courses
    cuisines
    source {
      siteUrl
      displayName
      recipeUrl
    }
    mainImage
    isPremium
    isFeatured
    author
    authorAvatar
    ingredientsCount
    favoritesCount
    isUserFavorite
    inUserShoppingList
    weightInGrams
    servingWeight
    isLogged
    relativeCalories {
      carbs
      fat
      protein
      fat
    }
    instructions
    nutritionalInfo {
      calories
      protein
      carbs
      fat
      sugar
      fiber
      saturatedFat
      monounsaturatedFat
      polyunsaturatedFat
      transFat
      cholesterol
      sodium
      potassium
      vitaminA
      vitaminC
      calcium
      iron
      netcarbs
    }
  }
}

```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "recipe": {
      "databaseId": "06b35870-3ea7-461d-bdc0-b06f5dff92a3",
      "totalTime": "30 minutes",
      "totalTimeInSeconds": 1800,
      "name": "Garlic-Seafood Stew",
      "rating": null,
      "numberOfServings": 2,
      "ingredientLines": [
        "1 tbsp olive oil",
        "1 small onion, diced",
        "5 garlic cloves, minced",
        "14 oz can diced tomatoes",
        "1 cup clam juice",
        "1 bay leaf",
        "1 tsp salt",
        "5 oz clams",
        "6 oz mussels",
        "4 oz shrimp, peeled and deveined",
        "3 oz calamari, sliced into rings",
        "2 tbsp chopped parsley"
      ],
      "ingredients": [
        {
          "name": "Olive oil"
        },
        {
          "name": "Onion"
        },
        {
          "name": "Garlic cloves"
        },
        {
          "name": "Tomatoes"
        },
        {
          "name": "Clam juice"
        },
        {
          "name": "Bay leaf"
        },
        {
          "name": "Salt"
        },
        {
          "name": "Clam"
        },
        {
          "name": "Mussels"
        },
        {
          "name": "Shrimp"
        },
        {
          "name": "Calamari"
        },
        {
          "name": "Parsley"
        }
      ],
      "language": null,
      "courses": [],
      "cuisines": null,
      "source": null,
      "mainImage": "https://storage.googleapis.com/sg-uploads/a97716f2e53c45c4be16d617de6c98e8.jpg",
      "isPremium": null,
      "isFeatured": null,
      "author": "Suggestic Premium",
      "authorAvatar": "https://sg-data.storage.googleapis.com/author/suggestic-premium.png",
      "ingredientsCount": 12,
      "favoritesCount": 1,
      "isUserFavorite": false,
      "inUserShoppingList": false,
      "weightInGrams": 1359.48474,
      "servingWeight": 679.74237,
      "isLogged": false,
      "relativeCalories": {
        "carbs": 0.2728,
        "fat": 0.2892,
        "protein": 0.438
      },
      "instructions": [
        "In a large stock pot, heat oil over medium high heat. Add the onions and cook for 3 minutes. Add garlic and saute for another minute.",
        "Add 1 cup of water, tomatoes, clam juice, bay leaf and salt. Bring to a boil, then reduce heat to medium and simmer for 20 minutes.",
        "Add in all the seafood at once and stir to combine. Cook until shrimp is pink and cooked through and mussels and clams have opened, about 7 minutes.",
        "Garnish with parsley and serve immediately"
      ],
      "nutritionalInfo": {
        "calories": 0.5185,
        "protein": 0.0568,
        "carbs": 0.0354,
        "fat": 0.0167,
        "sugar": 0.0126,
        "fiber": 0.0035,
        "saturatedFat": 0.0024,
        "monounsaturatedFat": 0.0081,
        "polyunsaturatedFat": 0.0021,
        "transFat": 0,
        "cholesterol": 0.3353,
        "sodium": 3.6826,
        "potassium": 1.2871,
        "vitaminA": 0,
        "vitaminC": 0.2328,
        "calcium": 0.2102,
        "iron": 0.0111,
        "netcarbs": 0.03
      }
    }
  }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.suggestic.com/graphql/objects/recipe/recipe-object.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
