# Popular Recipes

Use the `popularRecipes` query to obtain a list of recipes that are popular with users in the same program.&#x20;

## Available Fields <a href="#available-fields" id="available-fields"></a>

The following fields will be displayed in the response:

| **Field Name**        | **Type**          | **Description**                                                                |
| --------------------- | ----------------- | ------------------------------------------------------------------------------ |
| `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> |
| `name`                | <p>String<br></p> | Name of the recipe                                                             |
| `minNumberOfServings` | Int               | Minimum number of servings desired per recipe.                                 |
| `maxNumberOfServings` | Int               | Maximum number of servings desired per recipe.                                 |

Refer to [this documentation](https://docs.suggestic.com/graphql/objects/recipe/recipe-object) to get the complete list of recipe fields you can add to the query response

## Examples

### Get the list of popular recipes

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

```graphql
{
  popularRecipes {
    edges {
      node {
        id
        name
      }
    }
  }
}
```

{% endtab %}

{% tab title="Response" %}

```javascript
{
  "data": {
    "popularRecipes": {
      "edges": [
        {
          "node": {
            "id": "UmVjaXBlOmFiODQ0NDlmLTcwZjgtNDYwMS1iMjk1LTg0NGE0ZjhlNmRhZA==",
            "name": "The World'S Best Chicken"
          }
        },
        {
          "node": {
            "id": "UmVjaXBlOjc2NzVmNWQ0LTRhM2ItNDczMS1hOTA1LTAzMDczOThiNzY3ZA==",
            "name": "Baked Tomato Egg Cups"
          }
        },
        {
          "node": {
            "id": "UmVjaXBlOjhhMTUwZDE4LWY4MjQtNDIyZS1iYjZiLTAzOGUzZmQyMjRiNQ==",
            "name": "Almond Nog Overnight Oats"
          }
        },
        {
          "node": {
            "id": "UmVjaXBlOmM3MWY2NDhhLTRlYjMtNDcxMS1iNWU3LWUwMTA0ZmJhNGU3ZA==",
            "name": "Easy Grain-Free Pancake"
          }
        }
      ]
    }
  }
}
```

{% endtab %}
{% endtabs %}

### Get the list of popular recipes with min and max number of servings

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

```graphql
{
  popularRecipes (minNumberOfServings:1 maxNumberOfServings:4){
    edges {
      node {
        id
        name
        numberOfServings
      }
    }
  }
}
```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "popularRecipes": {
      "edges": [
        {
          "node": {
            "id": "UmVjaXBlOjUxMzY2MGM3LTNkNGUtNDMwYy05ZGZkLTE3NTg0YWYzMWE1Yg==",
            "name": "Keto Butter Chicken Wings",
            "numberOfServings": 3
          }
        },
        {
          "node": {
            "id": "UmVjaXBlOmQxZDA4ODIzLTk5ODAtNDA2YS1hZTZmLTRmYzM3OWI5ODg2OQ==",
            "name": "Split Pea Soup",
            "numberOfServings": 1
          }
        },
        {
          "node": {
            "id": "UmVjaXBlOjJmNTU2NjhmLWQ5ZmYtNDFjMC05OGQ4LWZlNDgwYzIwODIxMA==",
            "name": "Almond Milk Overnight Chia Oats",
            "numberOfServings": 1
          }
        },
        {
          "node": {
            "id": "UmVjaXBlOmQxOWY4NzFmLTZlMTQtNDMyNC05NzM2LWMwMzU5YmJlNjM1NQ==",
            "name": "Strawberry Smoothie",
            "numberOfServings": 1
          }
        },
        {
          "node": {
            "id": "UmVjaXBlOmNjNWNjYTBjLTFjMzUtNDc4YS1hMjhjLWYwMTIzODZjZjRjOQ==",
            "name": "Stuffed Chicken With Spinach And Mushroom Sauce",
            "numberOfServings": 3
          }
        },
        {
          "node": {
            "id": "UmVjaXBlOmY4YmZjMzRhLTc0MDYtNDZmNi1hMDRiLTJjNmY4NDhlZjNiMA==",
            "name": "Instant Pot Steamed Artichokes",
            "numberOfServings": 1
          }
        },
        {
          "node": {
            "id": "UmVjaXBlOjRkMGM3YjgwLTMyODYtNGQzNC1iYTNlLTU0MWViYTc4ODI4OA==",
            "name": "Goat Cheese And Fresh Herb Omelet Rolls",
            "numberOfServings": 1
          }
        },
        {
          "node": {
            "id": "UmVjaXBlOmVhNWIyMjliLWI4NzAtNGMwOC04MWMxLWRhYmI5OGUxNzZkYg==",
            "name": "Asparagus Soup With Coconut",
            "numberOfServings": 2
          }
        },
        {
          "node": {
            "id": "UmVjaXBlOmRjMjcyNWEzLTJhOTAtNDdiYi1iMDNmLTQ0ODE1ODk4OTM1ZQ==",
            "name": "Breakfast Sausage Patties",
            "numberOfServings": 4
          }
        },
        {
          "node": {
            "id": "UmVjaXBlOjEyM2E0YzMyLTJjYTMtNDIzNS1iMWFmLTgwNjRhMDY3MDk2ZQ==",
            "name": "Chicken Pad Thai",
            "numberOfServings": 3
          }
        },
        {
          "node": {
            "id": "UmVjaXBlOjE3MTM2NjZjLTRmNDgtNDJhZC04OGM1LWI3NzM1YTZkNDY0Zg==",
            "name": "Moong Dal With Spinach",
            "numberOfServings": 3
          }
        },
        {
          "node": {
            "id": "UmVjaXBlOjE1YWIyNTIwLTkzM2YtNDQ3NS1hOThjLWE0OGQzOTUwNzU5ZQ==",
            "name": "Instant Pot Creamy Mushroom \"Orzotto\"",
            "numberOfServings": 3
          }
        },
        {
          "node": {
            "id": "UmVjaXBlOjE2OTFiYzg3LWE5Y2YtNDMxYy1iMmZiLWY2MTRmNmJlZThhMw==",
            "name": "Broccoli Omelette",
            "numberOfServings": 2
          }
        },
        {
          "node": {
            "id": "UmVjaXBlOjEwNGNkZDJmLWE0NDYtNDMwZC1iYjliLWM3Nzc1MTgyODQ5ZA==",
            "name": "Noodle Pancit With Chicken",
            "numberOfServings": 3
          }
        },
        {
          "node": {
            "id": "UmVjaXBlOjhlNDAxZjVkLTg0NzMtNDcyZi1iZTc0LWMwZWZiNDQ2NzAwNg==",
            "name": "Pancakes With Blueberries",
            "numberOfServings": 4
          }
        },
        {
          "node": {
            "id": "UmVjaXBlOjc2ZTJhNjU2LTViZGMtNGI1My1iYmFmLTg4NWQ3Zjc3ODBjMw==",
            "name": "Pesto Chicken",
            "numberOfServings": 3
          }
        },
        {
          "node": {
            "id": "UmVjaXBlOjM0YWEyNDhmLTAzZDAtNGQ2NS1iYjIyLTZlOGIyMjBjNDNjMw==",
            "name": "Buckwheat Crepes With Meat And Mushrooms",
            "numberOfServings": 3
          }
        },
        {
          "node": {
            "id": "UmVjaXBlOmY0NzI4ZThjLWUzZGMtNDI1ZC1iNTI2LWRkMmQ0OWJjYzdhNA==",
            "name": "Pumpkin Spiced Chicken Thighs",
            "numberOfServings": 3
          }
        },
        {
          "node": {
            "id": "UmVjaXBlOmNiZmExYTUyLTkxYWEtNGY3My1iZWYwLWNkNjFmMjU5OTFlZQ==",
            "name": "Vegan Baked Onion Rings",
            "numberOfServings": 3
          }
        },
        {
          "node": {
            "id": "UmVjaXBlOjUxNmU3NDU3LWYyMjQtNDQzMS1iMGRiLWVlNjkxMTM1Njk0YQ==",
            "name": "Apple Banana Oat Muffins",
            "numberOfServings": 3
          }
        }
      ]
    }
  }
}
```

{% endtab %}
{% endtabs %}

#### UI/UX example

In the same way, we have code examples, this is an implementation example in which see results of the API execution in the Suggestic App.&#x20;

Login to the App, go to the **Recipe** option; **Popular** recipes are displayed below the **Favorites** recipes.

![](/files/3PUWpWg54KiNPX55MvMm)


---

# 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.suggestic.com/graphql/query/queries/recipes/popular-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.
