# Branded Foods Search

The `brandedFoods` query search for foods that belongs to a brand and/or have a barcode.&#x20;

**Branded foods** are known as all the foods that belong to a brand and include a trademark and a barcode. For example "`Oreo`", "`Hershey`", "`Mazola`", "`McCormick`", etc. Find the list of brand foods on [this page](https://fdc.nal.usda.gov/download-datasets.html).

## Characteristics

Within the branded food search you are able to:

* Get the nutritional information for a specific food&#x20;
* Use pagination
* Add a specific brand food barcode as an argument
* Filter the information to retrieve the following results
  * ID
  * Tags
  * Nutrients
  * Name
  * Ingredients
  * Meal Time
  * Barcode

### **How to calculate the nutrient according to a food portion**

Branded Foods are per each `100g.`. For instance, each nutrient corresponds to `100g`. To calculate the nutrients, use the following equation:

$$
nutrient value \*weight/100
$$

Where:

* `weight` is equivalent to the `servingSize`&#x20;

### Available Arguments

| Argument | Type                                                                  | Description                                                                                                                         |
| -------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| `query`  | Query                                                                 | Name or keyword of the food. It is possible to add more than one value. The query is *case insensitive.*                            |
| `first`  | String                                                                | Retrieves the first results from the list.                                                                                          |
| `filter` | [Filter](https://docs.suggestic.com/graphql/objects/food-logs/filter) | <p>Object that filters food according to different criteria. Use this object to filter:</p><ul><li>Tags</li><li>Nutrients</li></ul> |

### **Available Fields**

<table data-header-hidden><thead><tr><th width="262.3333333333333">Field Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>Field Name</strong></td><td><strong>Type</strong></td><td><strong>Description</strong></td></tr><tr><td><code>id</code></td><td>ID</td><td>Id of the food</td></tr><tr><td><code>brandedFoodCategory</code></td><td>String</td><td>The type of food. i.e. vegetables, fruit, snack, etc.</td></tr><tr><td><code>brandOwner</code></td><td>String</td><td>Name of the food brand owner</td></tr><tr><td><code>calories</code></td><td>Int</td><td>Number of calories </td></tr><tr><td><code>description</code></td><td>String</td><td>Branded food description</td></tr><tr><td><code>gtinUpc</code></td><td>String</td><td><a href="https://docs.suggestic.com/graphql/glossary#gtin">GTIN </a>or <a href="https://docs.suggestic.com/graphql/glossary#upc">UPC </a>number that is included in the food package. </td></tr><tr><td><code>householdServingFulltext</code></td><td>String</td><td>Name of the serving</td></tr><tr><td><code>name</code></td><td>String</td><td>Name of the food</td></tr><tr><td><code>nutrients</code></td><td><a href="https://docs.suggestic.com/graphql/objects/food-logs/nutrients">nutrients</a></td><td>Object that includes the information of the nutrients available in the food</td></tr><tr><td><code>servingSize</code></td><td>Int</td><td>Quantity of grams per serving</td></tr><tr><td><code>ServingSizeUnit</code></td><td>Int</td><td>Unit of the Serving size</td></tr><tr><td><code>tags</code></td><td>String</td><td>Displays the available <a href="https://docs.suggestic.com/graphql/objects/food-logs/food-filter#how-to-use-tags">tags </a></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### Pagination

The `brandedFoods` query supports the use of [pagination](https://docs.suggestic.com/graphql/start-here/tutorials-and-walkthroughs/pagination). The following fields can be used

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

```graphql
 pageInfo{
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
```

{% endtab %}
{% endtabs %}

## **Examples**

### Get the nutritional information of a specific food

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

```graphql
{
  brandedFoods(
    filter: {
      id: "QnJhbmRlZEZvb2ROb2RlOjg4MzE2OTZlLWJiMWItNDhkYi1iMmZjLWRmMzI1YjQ1NDY5OA=="
    }
  ) {
    edges {
      node {
        id
        name
        description
        gtinUpc
        brandOwner
        servingSize
        servingSizeUnit
        nutrients {
          type
          amount
          name
          unit
        }
      }
    }
  }
}

```

{% endtab %}

{% tab title="Result" %}

```graphql
{
  "data": {
    "brandedFoods": {
      "edges": [
        {
          "node": {
            "id": "QnJhbmRlZEZvb2ROb2RlOjg4MzE2OTZlLWJiMWItNDhkYi1iMmZjLWRmMzI1YjQ1NDY5OA==",
            "name": "Oreo oreo popcorn",
            "description": "OREO POPCORN, OREO",
            "gtinUpc": "814109021343",
            "brandOwner": "Perfect Snax Prime, LLC",
            "servingSize": 30,
            "servingSizeUnit": "g",
            "nutrients": [
              {
                "type": "PROTEIN",
                "amount": 3.33,
                "name": "Protein",
                "unit": "G"
              },
              {
                "type": "FAT",
                "amount": 26.67,
                "name": "Total lipid (fat)",
                "unit": "G"
              },
              {
                "type": "CARBOHYDRATE_BY_SUMMATION",
                "amount": 63.33,
                "name": "Carbohydrate, by summation",
                "unit": "G"
              },
              {
                "type": "CARBS",
                "amount": 63.33,
                "name": "Carbohydrate, by difference",
                "unit": "G"
              },
              {
                "type": "ENERGY",
                "amount": 33,
                "name": "Energy",
                "unit": "KCAL"
              },
              {
                "type": "SUGARS_TOTAL_INCLUDING_NLEA",
                "amount": 40,
                "name": "Sugars, total including NLEA",
                "unit": "G"
              },
              {
                "type": "SUGARS_TOTAL_NLEA",
                "amount": 40,
                "name": "Sugars, Total NLEA",
                "unit": "G"
              },
              {
                "type": "FIBER_TOTAL_DIETARY",
                "amount": 6.7,
                "name": "Fiber, total dietary",
                "unit": "G"
              },
              {
                "type": "CALCIUM_CA",
                "amount": 50,
                "name": "Calcium, Ca",
                "unit": "MG"
              },
              {
                "type": "IRON_FE",
                "amount": 0,
                "name": "Iron, Fe",
                "unit": "MG"
              },
              {
                "type": "POTASSIUM_K",
                "amount": 80,
                "name": "Potassium, K",
                "unit": "MG"
              },
              {
                "type": "SODIUM_NA",
                "amount": 83,
                "name": "Sodium, Na",
                "unit": "MG"
              },
              {
                "type": "VITAMIN_D_D2_D3_INTERNATIONAL_UNITS",
                "amount": 0,
                "name": "Vitamin D (D2 + D3), International Units",
                "unit": "IU"
              },
              {
                "type": "SUGARS_ADDED",
                "amount": 60,
                "name": "Sugars, added",
                "unit": "G"
              },
              {
                "type": "CHOLESTEROL",
                "amount": 0,
                "name": "Cholesterol",
                "unit": "MG"
              },
              {
                "type": "FATTY_ACIDS_TOTAL_TRANS",
                "amount": 0,
                "name": "Fatty acids, total trans",
                "unit": "G"
              },
              {
                "type": "FATTY_ACIDS_TOTAL_SATURATED",
                "amount": 11.67,
                "name": "Fatty acids, total saturated",
                "unit": "G"
              }
            ]
          }
        }
      ]
    }
  }
}
```

{% endtab %}
{% endtabs %}

### **Get the list of recipes that contains "oreo"**&#x20;

The following example searches all the foods that contain `oreo` in it

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

```graphql
{
  brandedFoods(query: "oreo", first: 2) {
    edges {
      node {
        id
        name
        gtinUpc
        brandOwner
        servingSize
        servingSizeUnit
        brandedFoodCategory
        nutrients {
          type
          amount
          name
          unit
        }
      }
    }
  }
}

```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "brandedFoods": {
      "edges": [
        {
          "node": {
            "id": "QnJhbmRlZEZvb2ROb2RlOjg4MzE2OTZlLWJiMWItNDhkYi1iMmZjLWRmMzI1YjQ1NDY5OA==",
            "name": "Oreo oreo popcorn",
            "gtinUpc": "814109021343",
            "brandOwner": "Perfect Snax Prime, LLC",
            "servingSize": 30,
            "servingSizeUnit": "g",
            "brandedFoodCategory": "Popcorn, Peanuts, Seeds & Related Snacks",
            "nutrients": [
              {
                "type": "PROTEIN",
                "amount": 3.33,
                "name": "Protein",
                "unit": "G"
              },
              {
                "type": "FAT",
                "amount": 26.67,
                "name": "Total lipid (fat)",
                "unit": "G"
              },
              {
                "type": "CARBOHYDRATE_BY_SUMMATION",
                "amount": 63.33,
                "name": "Carbohydrate, by summation",
                "unit": "G"
              },
              {
                "type": "CARBS",
                "amount": 63.33,
                "name": "Carbohydrate, by difference",
                "unit": "G"
              },
              {
                "type": "ENERGY",
                "amount": 33,
                "name": "Energy",
                "unit": "KCAL"
              },
              {
                "type": "SUGARS_TOTAL_INCLUDING_NLEA",
                "amount": 40,
                "name": "Sugars, total including NLEA",
                "unit": "G"
              },
              {
                "type": "SUGARS_TOTAL_NLEA",
                "amount": 40,
                "name": "Sugars, Total NLEA",
                "unit": "G"
              },
              {
                "type": "FIBER_TOTAL_DIETARY",
                "amount": 6.7,
                "name": "Fiber, total dietary",
                "unit": "G"
              },
              {
                "type": "CALCIUM_CA",
                "amount": 50,
                "name": "Calcium, Ca",
                "unit": "MG"
              },
              {
                "type": "IRON_FE",
                "amount": 0,
                "name": "Iron, Fe",
                "unit": "MG"
              },
              {
                "type": "POTASSIUM_K",
                "amount": 80,
                "name": "Potassium, K",
                "unit": "MG"
              },
              {
                "type": "SODIUM_NA",
                "amount": 83,
                "name": "Sodium, Na",
                "unit": "MG"
              },
              {
                "type": "VITAMIN_D_D2_D3_INTERNATIONAL_UNITS",
                "amount": 0,
                "name": "Vitamin D (D2 + D3), International Units",
                "unit": "IU"
              },
              {
                "type": "SUGARS_ADDED",
                "amount": 60,
                "name": "Sugars, added",
                "unit": "G"
              },
              {
                "type": "CHOLESTEROL",
                "amount": 0,
                "name": "Cholesterol",
                "unit": "MG"
              },
              {
                "type": "FATTY_ACIDS_TOTAL_TRANS",
                "amount": 0,
                "name": "Fatty acids, total trans",
                "unit": "G"
              },
              {
                "type": "FATTY_ACIDS_TOTAL_SATURATED",
                "amount": 11.67,
                "name": "Fatty acids, total saturated",
                "unit": "G"
              }
            ]
          }
        },
        {
          "node": {
            "id": "QnJhbmRlZEZvb2ROb2RlOjVlNDMyM2Y0LWQ3ZTItNDkyMi04NjRiLTYzZGZiYzg4OTIxMg==",
            "name": "Oreo oreo flavored candy canes",
            "gtinUpc": "030800837001",
            "brandOwner": "Spangler Candy Company",
            "servingSize": 12,
            "servingSizeUnit": "g",
            "brandedFoodCategory": "Candy",
            "nutrients": [
              {
                "type": "PROTEIN",
                "amount": 0,
                "name": "Protein",
                "unit": "G"
              },
              {
                "type": "FAT",
                "amount": 0,
                "name": "Total lipid (fat)",
                "unit": "G"
              },
              {
                "type": "CARBOHYDRATE_BY_SUMMATION",
                "amount": 100,
                "name": "Carbohydrate, by summation",
                "unit": "G"
              },
              {
                "type": "CARBS",
                "amount": 100,
                "name": "Carbohydrate, by difference",
                "unit": "G"
              },
              {
                "type": "ENERGY",
                "amount": 375,
                "name": "Energy",
                "unit": "KCAL"
              },
              {
                "type": "SUGARS_TOTAL_INCLUDING_NLEA",
                "amount": 75,
                "name": "Sugars, total including NLEA",
                "unit": "G"
              },
              {
                "type": "SUGARS_TOTAL_NLEA",
                "amount": 75,
                "name": "Sugars, Total NLEA",
                "unit": "G"
              },
              {
                "type": "SODIUM_NA",
                "amount": 83,
                "name": "Sodium, Na",
                "unit": "MG"
              },
              {
                "type": "SUGARS_ADDED",
                "amount": 75,
                "name": "Sugars, added",
                "unit": "G"
              }
            ]
          }
        }
      ]
    }
  }
}
```

{% endtab %}
{% endtabs %}

### Get the list of milk recipes with a specific Barcode

* **Without using query variables**

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

```graphql
{
  brandedFoods(barcode: "763528339136") 
  {
    edges {
      node {
        id
        name
        gtinUpc
        brandOwner
        servingSize
        servingSizeUnit
        nutrients {
          type
          amount
          name
          unit
        }
      }
    }
  }
}
```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "brandedFoods": {
      "edges": [
        {
          "node": {
            "id": "QnJhbmRlZEZvb2ROb2RlOjQ3OTk0MQ==",
            "name": "Milk",
            "gtinUpc": "763528339136",
            "brandOwner": "Promised Land Dairy",
            "servingSize": 240,
            "servingSizeUnit": "ml",
            "nutrients": [
              {
                "type": "FIBER_TOTAL_DIETARY",
                "amount": 0,
                "name": "Fiber, total dietary",
                "unit": "G"
              },
              {
                "type": "CALCIUM_CA",
                "amount": 125,
                "name": "Calcium, Ca",
                "unit": "MG"
              },
              {
                "type": "IRON_FE",
                "amount": 0,
                "name": "Iron, Fe",
                "unit": "MG"
              },
              {
                "type": "VITAMIN_A_IU",
                "amount": 125,
                "name": "Vitamin A, IU",
                "unit": "IU"
              },
              {
                "type": "VITAMIN_C_TOTAL_ASCORBIC_ACID",
                "amount": 0,
                "name": "Vitamin C, total ascorbic acid",
                "unit": "MG"
              },
              {
                "type": "PROTEIN",
                "amount": 3.75,
                "name": "Protein",
                "unit": "G"
              },
              {
                "type": "TOTAL_LIPID_FAT",
                "amount": 4.58,
                "name": "Total lipid (fat)",
                "unit": "G"
              },
              {
                "type": "CARBOHYDRATE_BY_DIFFERENCE",
                "amount": 14.17,
                "name": "Carbohydrate, by difference",
                "unit": "G"
              },
              {
                "type": "ENERGY",
                "amount": 112,
                "name": "Energy",
                "unit": "KCAL"
              },
              {
                "type": "SUGARS_TOTAL_INCLUDING_NLEA",
                "amount": 12.92,
                "name": "Sugars, total including NLEA",
                "unit": "G"
              },
              {
                "type": "POTASSIUM_K",
                "amount": 96,
                "name": "Potassium, K",
                "unit": "MG"
              },
              {
                "type": "SODIUM_NA",
                "amount": 67,
                "name": "Sodium, Na",
                "unit": "MG"
              },
              {
                "type": "CHOLESTEROL",
                "amount": 15,
                "name": "Cholesterol",
                "unit": "MG"
              },
              {
                "type": "FATTY_ACIDS_TOTAL_TRANS",
                "amount": 0,
                "name": "Fatty acids, total trans",
                "unit": "G"
              },
              {
                "type": "FATTY_ACIDS_TOTAL_SATURATED",
                "amount": 2.92,
                "name": "Fatty acids, total saturated",
                "unit": "G"
              }
            ]
          }
        }
      ]
    }
  }
}
```

{% endtab %}
{% endtabs %}

* **Using query variables**

To add a barcode as an argument in the search query, define **query variables**. Refer to [this page](https://docs.suggestic.com/graphql/query/queries/food-log/food-search#how-to-use-query-variables) for more information on how to add them.

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

```graphql
query FoodSearch ($query: String, $first: Int, $barcode: String){
    brandedFoods(query: $query, first: $first, barcode: $barcode) {
    edges {
      node {
        id
        name
        gtinUpc
        brandOwner
        servingSize
        servingSizeUnit
        nutrients {
          id
          amount
          name
          unit
        }
      }
    }
  }
}


```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "brandedFoods": {
      "edges": [
        {
          "node": {
            "id": "QnJhbmRlZEZvb2ROb2RlOjQ3OTk0MQ==",
            "name": "Milk",
            "gtinUpc": "763528339136",
            "brandOwner": "Promised Land Dairy",
            "servingSize": 240,
            "servingSizeUnit": "ml",
            "nutrients": [
              {
                "id": 1079,
                "amount": 0,
                "name": "Fiber, total dietary",
                "unit": "G"
              },
              {
                "id": 1087,
                "amount": 125,
                "name": "Calcium, Ca",
                "unit": "MG"
              },
              {
                "id": 1089,
                "amount": 0,
                "name": "Iron, Fe",
                "unit": "MG"
              },
              {
                "id": 1104,
                "amount": 125,
                "name": "Vitamin A, IU",
                "unit": "IU"
              },
              {
                "id": 1162,
                "amount": 0,
                "name": "Vitamin C, total ascorbic acid",
                "unit": "MG"
              },
              {
                "id": 1003,
                "amount": 3.75,
                "name": "Protein",
                "unit": "G"
              },
              {
                "id": 1004,
                "amount": 4.58,
                "name": "Total lipid (fat)",
                "unit": "G"
              },
              {
                "id": 1005,
                "amount": 14.17,
                "name": "Carbohydrate, by difference",
                "unit": "G"
              },
              {
                "id": 1008,
                "amount": 112,
                "name": "Energy",
                "unit": "KCAL"
              },
              {
                "id": 2000,
                "amount": 12.92,
                "name": "Sugars, total including NLEA",
                "unit": "G"
              },
              {
                "id": 1092,
                "amount": 96,
                "name": "Potassium, K",
                "unit": "MG"
              },
              {
                "id": 1093,
                "amount": 67,
                "name": "Sodium, Na",
                "unit": "MG"
              },
              {
                "id": 1253,
                "amount": 15,
                "name": "Cholesterol",
                "unit": "MG"
              },
              {
                "id": 1257,
                "amount": 0,
                "name": "Fatty acids, total trans",
                "unit": "G"
              },
              {
                "id": 1258,
                "amount": 2.92,
                "name": "Fatty acids, total saturated",
                "unit": "G"
              }
            ]
          }
        }
      ]
    }
  }
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="QUERY VARIABLES" %}

```java
{
  "query": "milk",
  "first": 1,
  "barcode": "763528339136"
}
```

{% endtab %}
{% endtabs %}

### Get the first 2 results of recipes that contain "Oreo" cookies

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

```graphql
{
  brandedFoods(query: "oreo", first: 2) {
    edges {
      node {
        id
        name
        gtinUpc
        brandOwner
        servingSize
        servingSizeUnit
        nutrients {
          id
          amount
          name
          unit
        }
      }
      cursor
    }
       pageInfo{
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
  }
}
```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "brandedFoods": {
      "edges": [
        {
          "node": {
            "id": "QnJhbmRlZEZvb2ROb2RlOjM1MDcyNw==",
            "name": "Nabisco oreo cookies oreo 1x10.700 oz",
            "gtinUpc": "00044000042554",
            "brandOwner": "Mondelez Int. US (0074819091009)",
            "servingSize": 29,
            "servingSizeUnit": "g",
            "nutrients": [
              {
                "id": 1162,
                "amount": 0,
                "name": "Vitamin C, total ascorbic acid",
                "unit": "MG"
              },
              {
                "id": 1004,
                "amount": 20.69,
                "name": "Total lipid (fat)",
                "unit": "G"
              },
              {
                "id": 1005,
                "amount": 72.41,
                "name": "Carbohydrate, by difference",
                "unit": "G"
              },
              {
                "id": 2000,
                "amount": 44.83,
                "name": "Sugars, total including NLEA",
                "unit": "G"
              },
              {
                "id": 1087,
                "amount": 40,
                "name": "Calcium, Ca",
                "unit": "MG"
              },
              {
                "id": 1089,
                "amount": 3.48,
                "name": "Iron, Fe",
                "unit": "MG"
              },
              {
                "id": 1092,
                "amount": 138,
                "name": "Potassium, K",
                "unit": "MG"
              },
              {
                "id": 1093,
                "amount": 345,
                "name": "Sodium, Na",
                "unit": "MG"
              },
              {
                "id": 1253,
                "amount": 0,
                "name": "Cholesterol",
                "unit": "MG"
              },
              {
                "id": 1257,
                "amount": 0,
                "name": "Fatty acids, total trans",
                "unit": "G"
              },
              {
                "id": 1258,
                "amount": 6.9,
                "name": "Fatty acids, total saturated",
                "unit": "G"
              },
              {
                "id": 1003,
                "amount": 3.45,
                "name": "Protein",
                "unit": "G"
              },
              {
                "id": 1079,
                "amount": 3.4,
                "name": "Fiber, total dietary",
                "unit": "G"
              }
            ]
          },
          "cursor": "YXJyYXljb25uZWN0aW9uOjE="
        },
        {
          "node": {
            "id": "QnJhbmRlZEZvb2ROb2RlOjM1MTUwOA==",
            "name": "Nabisco oreo cookies oreo 1x45.000 oz",
            "gtinUpc": "00044000013103",
            "brandOwner": "Mondelez Int. US (0074819091009)",
            "servingSize": 42,
            "servingSizeUnit": "g",
            "nutrients": [
              {
                "id": 1162,
                "amount": 0,
                "name": "Vitamin C, total ascorbic acid",
                "unit": "MG"
              },
              {
                "id": 1003,
                "amount": 4.76,
                "name": "Protein",
                "unit": "G"
              },
              {
                "id": 1004,
                "amount": 19.05,
                "name": "Total lipid (fat)",
                "unit": "G"
              },
              {
                "id": 1005,
                "amount": 71.43,
                "name": "Carbohydrate, by difference",
                "unit": "G"
              },
              {
                "id": 2000,
                "amount": 40.48,
                "name": "Sugars, total including NLEA",
                "unit": "G"
              },
              {
                "id": 1087,
                "amount": 44,
                "name": "Calcium, Ca",
                "unit": "MG"
              },
              {
                "id": 1089,
                "amount": 5.19,
                "name": "Iron, Fe",
                "unit": "MG"
              },
              {
                "id": 1092,
                "amount": 155,
                "name": "Potassium, K",
                "unit": "MG"
              },
              {
                "id": 1093,
                "amount": 405,
                "name": "Sodium, Na",
                "unit": "MG"
              },
              {
                "id": 1253,
                "amount": 0,
                "name": "Cholesterol",
                "unit": "MG"
              },
              {
                "id": 1257,
                "amount": 0,
                "name": "Fatty acids, total trans",
                "unit": "G"
              },
              {
                "id": 1258,
                "amount": 4.76,
                "name": "Fatty acids, total saturated",
                "unit": "G"
              },
              {
                "id": 1079,
                "amount": 2.4,
                "name": "Fiber, total dietary",
                "unit": "G"
              }
            ]
          },
          "cursor": "YXJyYXljb25uZWN0aW9uOjI="
        }
      ],
      "pageInfo": {
        "hasNextPage": true,
        "hasPreviousPage": false,
        "startCursor": "YXJyYXljb25uZWN0aW9uOjE=",
        "endCursor": "YXJyYXljb25uZWN0aW9uOjI="
      }
    }
  }
}
```

{% endtab %}
{% endtabs %}

### Filter all the common foods that include the "gluten-free" and "low-carb" tags

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

```graphql
{
  brandedFoods(first:2     
    filter:
       {
        tags:["gluten-free", "low-carb"] 
       }
   ) 
  {
    edges {
      node {
        id
        name
        gtinUpc
        brandOwner
        servingSize
        servingSizeUnit
        tags
        nutrients {
          type
          amount
          name
          unit
        }
      }
    }
  }
}
```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "brandedFoods": {
      "edges": [
        {
          "node": {
            "id": "QnJhbmRlZEZvb2ROb2RlOjM5MjkyNQ==",
            "name": "Low carb flour tortillas",
            "gtinUpc": "078858520322",
            "brandOwner": "La Tortilla Factory Inc",
            "servingSize": 42,
            "servingSizeUnit": "g",
            "tags": [
              "low-carb"
            ],
            "nutrients": [
              {
                "type": "VITAMIN_D_D2_D3_INTERNATIONAL_UNITS",
                "amount": 0,
                "name": "Vitamin D (D2 + D3), International Units",
                "unit": "IU"
              },
              {
                "type": "CHOLESTEROL",
                "amount": 0,
                "name": "Cholesterol",
                "unit": "MG"
              },
              {
                "type": "PROTEIN",
                "amount": 11.9,
                "name": "Protein",
                "unit": "G"
              },
              {
                "type": "TOTAL_LIPID_FAT",
                "amount": 5.95,
                "name": "Total lipid (fat)",
                "unit": "G"
              },
              {
                "type": "CARBOHYDRATE_BY_DIFFERENCE",
                "amount": 35.71,
                "name": "Carbohydrate, by difference",
                "unit": "G"
              },
              {
                "type": "ENERGY",
                "amount": 167,
                "name": "Energy",
                "unit": "KCAL"
              },
              {
                "type": "SUGARS_TOTAL_INCLUDING_NLEA",
                "amount": 2.38,
                "name": "Sugars, total including NLEA",
                "unit": "G"
              },
              {
                "type": "FIBER_TOTAL_DIETARY",
                "amount": 21.4,
                "name": "Fiber, total dietary",
                "unit": "G"
              },
              {
                "type": "CALCIUM_CA",
                "amount": 102,
                "name": "Calcium, Ca",
                "unit": "MG"
              },
              {
                "type": "IRON_FE",
                "amount": 2.38,
                "name": "Iron, Fe",
                "unit": "MG"
              },
              {
                "type": "POTASSIUM_K",
                "amount": 43,
                "name": "Potassium, K",
                "unit": "MG"
              },
              {
                "type": "SODIUM_NA",
                "amount": 595,
                "name": "Sodium, Na",
                "unit": "MG"
              },
              {
                "type": "FATTY_ACIDS_TOTAL_TRANS",
                "amount": 0,
                "name": "Fatty acids, total trans",
                "unit": "G"
              },
              {
                "type": "FATTY_ACIDS_TOTAL_SATURATED",
                "amount": 2.38,
                "name": "Fatty acids, total saturated",
                "unit": "G"
              }
            ]
          }
        },
        {
          "node": {
            "id": "QnJhbmRlZEZvb2ROb2RlOjU1MTk5MA==",
            "name": "Gluten free pasta",
            "gtinUpc": "075717460751",
            "brandOwner": "RIENZI",
            "servingSize": 56,
            "servingSizeUnit": "g",
            "tags": [
              "gluten-free"
            ],
            "nutrients": [
              {
                "type": "TOTAL_LIPID_FAT",
                "amount": 0,
                "name": "Total lipid (fat)",
                "unit": "G"
              },
              {
                "type": "CALCIUM_CA",
                "amount": 0,
                "name": "Calcium, Ca",
                "unit": "MG"
              },
              {
                "type": "IRON_FE",
                "amount": 0,
                "name": "Iron, Fe",
                "unit": "MG"
              },
              {
                "type": "VITAMIN_A_IU",
                "amount": 0,
                "name": "Vitamin A, IU",
                "unit": "IU"
              },
              {
                "type": "VITAMIN_C_TOTAL_ASCORBIC_ACID",
                "amount": 0,
                "name": "Vitamin C, total ascorbic acid",
                "unit": "MG"
              },
              {
                "type": "CHOLESTEROL",
                "amount": 0,
                "name": "Cholesterol",
                "unit": "MG"
              },
              {
                "type": "FATTY_ACIDS_TOTAL_SATURATED",
                "amount": 0,
                "name": "Fatty acids, total saturated",
                "unit": "G"
              },
              {
                "type": "PROTEIN",
                "amount": 7.14,
                "name": "Protein",
                "unit": "G"
              },
              {
                "type": "CARBOHYDRATE_BY_DIFFERENCE",
                "amount": 78.57,
                "name": "Carbohydrate, by difference",
                "unit": "G"
              },
              {
                "type": "ENERGY",
                "amount": 357,
                "name": "Energy",
                "unit": "KCAL"
              },
              {
                "type": "FIBER_TOTAL_DIETARY",
                "amount": 1.8,
                "name": "Fiber, total dietary",
                "unit": "G"
              },
              {
                "type": "SODIUM_NA",
                "amount": 9,
                "name": "Sodium, Na",
                "unit": "MG"
              },
              {
                "type": "FATTY_ACIDS_TOTAL_TRANS",
                "amount": 0,
                "name": "Fatty acids, total trans",
                "unit": "G"
              }
            ]
          }
        }
      ]
    }
  }
}
```

{% endtab %}
{% endtabs %}

### Get all the foods that contain banana filtered by specific nutrients

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

```graphql
{
   brandedFoods(
    query: "banana"
    first: 3
    filter: {
      nutrients: [
        {nutrient:ENERGY range: {lte: 100}}
        {nutrient:PROTEIN range: {gte: 10}}
      ]
    }
  ) {
    edges {
      node {
        name
        calories
        brandOwner
        servingSize
        servingSizeUnit
      }
    }
  }
}
```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "brandedFoods": {
      "edges": [
        {
          "node": {
            "id": "QnJhbmRlZEZvb2ROb2RlOjY2MzA2NA==",
            "name": "Banana nut banana nut protein instant oatmeal",
            "calories": 240,
            "brandOwner": "The Quaker Oats Company",
            "servingSize": 61,
            "servingSizeUnit": "g"
          }
        },
        {
          "node": {
            "id": "QnJhbmRlZEZvb2ROb2RlOjYwNDE5OQ==",
            "name": "Banana nut banana nut instant protein oatmeal",
            "calories": 240,
            "brandOwner": "GOOD & SMART",
            "servingSize": 61,
            "servingSizeUnit": "g"
          }
        },
        {
          "node": {
            "id": "QnJhbmRlZEZvb2ROb2RlOjYyNDY1MA==",
            "name": "Banana nut crunch banana nut crunch cereal",
            "calories": 230,
            "brandOwner": "POST",
            "servingSize": 59,
            "servingSizeUnit": "g"
          }
        }
      ]
    }
  }
}
```

{% endtab %}
{% endtabs %}
