Skip to main content

Quickstart

Get up and running with the EveryBite API in just a few minutes.

Prerequisites

  • An EveryBite developer account
  • A Menu Key for your authorized brand
Don’t have a Menu Key yet? Sign up and request access to a brand’s menu data.

Step 1: Get Your Menu Key

Your Menu Key identifies which restaurant brand’s menu data your app can access. You’ll receive this when your access request is approved.
# Your Menu Key looks like this:
MENU_KEY="hg_live_abc123def456..."

Step 2: Set Up Your Environment

The EveryBite API is GraphQL-based. You can use any GraphQL client or simple HTTP requests.
curl -X POST https://api.everybite.com/graphql \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_MENU_KEY" \
  -d '{"query": "{ __typename }"}'

Step 3: Fetch Available Filters

Before building your filter UI, discover what options are available:
query GetFilterOptions {
  filterOptions(menuKey: "your_menu_key") {
    diets {
      type
      displayName
    }
    allergens {
      type
      displayName
      icon
    }
    nutrients {
      type
      displayName
      unit
      defaultMin
      defaultMax
    }
    categories {
      id
      name
      dishCount
    }
  }
}
{
  "data": {
    "filterOptions": {
      "diets": [
        { "type": "Vegan", "displayName": "Vegan" },
        { "type": "Vegetarian", "displayName": "Vegetarian" },
        { "type": "GlutenFree", "displayName": "Gluten-Free" }
      ],
      "allergens": [
        { "type": "Dairy", "displayName": "Dairy", "icon": "🥛" },
        { "type": "Peanut", "displayName": "Peanut", "icon": "🥜" },
        { "type": "Gluten", "displayName": "Gluten", "icon": "🌾" }
      ],
      "categories": [
        { "id": "cat_1", "name": "Stir-Fry", "dishCount": 12 },
        { "id": "cat_2", "name": "Salads", "dishCount": 8 }
      ]
    }
  }
}

Step 4: Query Dishes with Filters

Now fetch dishes that match your diner’s preferences:
query GetDishes {
  dishes(
    menuKey: "your_menu_key",
    filters: {
      diets: [Vegan],
      excludeAllergens: [Dairy, Egg],
      calorieRange: { max: 600 }
    },
    pagination: { first: 20 }
  ) {
    results {
      dish {
        id
        name
        description
        imageUrl
        calories
        nutrition {
          protein
          carbohydrates
          fatTotal
        }
        allergens { type, displayName }
        diets { type }
      }
      matchStatus
    }
    counts {
      total
      matches
      partialMatches
      notAMatch
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}

Step 5: Display Results

Use the response to build your UI:
const { results, counts } = data.dishes;

// Show match summary
console.log(`${counts.matches} Match | ${counts.partialMatches} Partial | ${counts.notAMatch} Not a Match`);

// Render dish cards
results.forEach(({ dish, matchStatus }) => {
  console.log(`${dish.name} - ${dish.calories} cal - ${matchStatus}`);
});

Next Steps