> ## Documentation Index
> Fetch the complete documentation index at: https://docs.everybite.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Brand Hierarchy

> Understanding how Brands, Chains, Restaurants, and Menus relate

The EveryBite platform organizes restaurant data in a hierarchical structure. Understanding this hierarchy helps you work with the right scope of data.

## The Four Levels

```
Brand (e.g., Yum! Brands)
└── Chain (e.g., Taco Bell)
    └── Restaurant (e.g., Taco Bell #1234 - Times Square)
        └── Menu (e.g., Breakfast, Lunch, Regional Specials)
```

<AccordionGroup>
  <Accordion title="Brand" icon="building">
    The top-level parent company that may own multiple restaurant chains.

    **Examples:**

    * Yum! Brands (owns Taco Bell, KFC, Pizza Hut)
    * Inspire Brands (owns Arby's, Buffalo Wild Wings, Dunkin')
    * Independent restaurant groups

    **API Access:** A Brand Key gives access to all chains, restaurants, and menus underneath.
  </Accordion>

  <Accordion title="Chain" icon="store">
    A restaurant brand with multiple locations sharing the same concept and (mostly) the same menu.

    **Examples:**

    * Taco Bell
    * honeygrow
    * Chipotle

    **API Access:** A Chain Key gives access to all restaurants in that chain.
  </Accordion>

  <Accordion title="Restaurant" icon="location-dot">
    A single physical location where guests can order food.

    **Examples:**

    * honeygrow - 1601 Market Street, Philadelphia
    * Taco Bell #1234 - Times Square, NYC

    **API Access:** A Restaurant Key gives access to that location's menus only.
  </Accordion>

  <Accordion title="Menu" icon="utensils">
    A collection of dishes available at a restaurant. A single restaurant may have multiple menus.

    **Examples:**

    * Breakfast Menu
    * Lunch/Dinner Menu
    * Late Night Menu
    * Regional Specials
    * Seasonal Menu
  </Accordion>
</AccordionGroup>

## Menu Variations by Scale

How menus vary depends on the size of the restaurant operation:

| Scale          | Location Count | Menu Strategy                      |
| -------------- | -------------- | ---------------------------------- |
| Small Chain    | 20-50          | Single menu across all locations   |
| Regional Chain | 50-200         | Regional menu variations           |
| National Chain | 200+           | Definitely regional menus          |
| Global Chain   | International  | Different menus per country/region |

<Info>
  A chain with 30 locations might have identical menus everywhere. A national chain with 500+ locations will likely have regional differences—some items available only in certain markets.
</Info>

## Location-Specific Menus

When a chain has location-specific menus, you can scope SmartMenu search results to a single restaurant using `restaurantId`:

```graphql theme={null}
query SearchByRestaurant(
  $restaurantId: ID!
  $searchTerm: String
  $preferences: PreferencesInput
  $pagination: PaginationArgs
) {
  search(
    restaurantId: $restaurantId
    searchTerm: $searchTerm
    pagination: $pagination
    preferences: $preferences
  ) {
    matches {
      dish { id name category }
      matchStatus
    }
    counts { total }
  }
}
```

## Categories Within Menus

You can also query dish categories—with optional restaurant scoping—to understand how dishes are organized:

```graphql theme={null}
query GetCategoriesForRestaurant {
  categories(restaurantId: "rest_nyc_001") {
    name        # e.g., "Stir-Fry", "Salads", "Drinks"
    count       # Number of dishes in this category
    ordinal     # Display order
  }
}
```

```graphql theme={null}
query GetWidgetCategories {
  categories {
    name
    count
    ordinal
  }
}
```

## Visual Summary

```mermaid theme={null}
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#2563EB', 'primaryTextColor': '#fff', 'primaryBorderColor': '#1D4ED8', 'lineColor': '#64748b', 'secondaryColor': '#f1f5f9', 'tertiaryColor': '#e2e8f0'}}}%%
flowchart TD
    Brand["<strong>BRAND</strong><br/>Yum! Brands<br/><em>Brand Key</em>"]

    Chain1["<strong>CHAIN</strong><br/>Taco Bell<br/><em>Chain Key</em>"]
    Chain2["<strong>CHAIN</strong><br/>KFC<br/><em>Chain Key</em>"]
    Chain3["<strong>CHAIN</strong><br/>Pizza Hut<br/><em>Chain Key</em>"]

    Rest1["<strong>RESTAURANTS</strong><br/>NYC #1, NYC #2, ..."]
    Rest2["<strong>RESTAURANTS</strong><br/>LA #1, LA #2, ..."]
    Rest3["<strong>RESTAURANTS</strong><br/>Chicago #1, Chicago #2, ..."]

    Menu1["Breakfast Menu"]
    Menu2["Lunch Menu"]
    Menu3["Regional Menu"]

    Brand --> Chain1
    Brand --> Chain2
    Brand --> Chain3

    Chain1 --> Rest1
    Chain2 --> Rest2
    Chain3 --> Rest3

    Rest1 --> Menu1
    Rest1 --> Menu2
    Rest2 --> Menu1
    Rest2 --> Menu3
    Rest3 --> Menu2
    Rest3 --> Menu3

    classDef brand fill:#1D4ED8,stroke:#1e40af,color:#fff,stroke-width:2px
    classDef chain fill:#2563EB,stroke:#1D4ED8,color:#fff,stroke-width:1px
    classDef restaurant fill:#3B82F6,stroke:#2563EB,color:#fff,stroke-width:1px
    classDef menu fill:#e2e8f0,stroke:#94a3b8,color:#334155,stroke-width:1px

    class Brand brand
    class Chain1,Chain2,Chain3 chain
    class Rest1,Rest2,Rest3 restaurant
    class Menu1,Menu2,Menu3 menu
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Guest Preferences" icon="sliders" href="/docs/concepts/guest-preferences">
    Learn how to personalize results
  </Card>

  <Card title="Authentication" icon="key" href="/docs/authentication">
    Understand API keys and scopes in depth
  </Card>
</CardGroup>
