Grubhub MCP server for AI agents
Let Claude, ChatGPT or your own agent read and act on Grubhub: 19 typed functions through one MCP server. No Grubhub API key needed.
- Site
- grubhub.com
- Functions
- 19
- Sign-in
- For account actions
- Works with
- MCP, HTTP, Node, Python
Connect
An MCP server for Grubhub alone, with one tool per function. Paste it into Claude, ChatGPT, Cursor or any MCP client as a remote server.
https://api.bowmark.ai/mcp/site/grubhubOne MCP server for Grubhub and every other site Bowmark covers. Your agent looks up what it needs and calls it.
https://api.bowmark.ai/mcpSet it up in your clientBoth need a Bowmark API key. The quickstart gets you one and a first result in a few minutes. Functions that need a login use the person's own account: how sign-in works.
Functions
Open a function to see its arguments, what it returns and how to call it.
getCartReads what is in the Grubhub cart.Arguments
Name Type Required cartKeystringNo Returns
GrubhubCartinterface GrubhubCartLine { /** The id removeFromCart/updateCartItem take. */ lineId: string; itemId: string; restaurantId: string; name: string; quantity: number; /** One unit, in cents, before options. */ unitPriceCents: number; /** This line's total in cents, options and quantity included. */ totalCents: number; specialInstructions: string; /** Chosen option ids, as getMenuItem().choices[].options[].id. */ optionIds: string[]; } interface GrubhubCart { /** Pass to the cart functions in a LATER run to reach this same cart; within one run they find it on their own. null while no cart exists. */ cartKey: string | null; cartId: string | null; items: GrubhubCartLine[]; itemCount: number; subtotalCents: number; currency: string; restaurantIds: string[]; // Where the PERSON finishes: the restaurant page, with these items to add again (the cart is an anonymous Grubhub session no link can open). A refusal when the cart is empty or spans no single restaurant. Bowmark never orders. checkout: GrubhubCheckoutHandoff; } // The checkout handoff: where the PERSON finishes. Bowmark never pays, books or orders. // Switch on `status`; a status you do not recognise means "show the person `url` and stop". interface GrubhubCheckoutHandoff { status: "ready_to_checkout" | "needs_login" | "unavailable"; url: string; // the https page to open on the site urlKind?: "carries_items" | "signed_in_cart" | "product_page"; // ready_to_checkout only: does the link carry the items, or only open the item's page reason?: string; // unavailable only: out_of_stock | not_available_for_dates | not_sold_online | region_not_served | quantity_unavailable | empty_cart detail?: string; // unavailable only: one sentence saying why account: { site: string; hint: string; signedInAs?: string }; summary: { items: { title: string; variant: string | null; quantity: number; unitPrice: string | null; lineTotal: string | null; url?: string; id?: string }[]; total: string | null; currency: string } | null; warnings: string[]; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/grubhub/getCartCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.grubhub.getCart();import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.grubhub.getCart())curl -X POST https://api.bowmark.ai/v1/sites/grubhub/getCart \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.grubhub.getCart();getDeliveryEstimateWhether a Grubhub restaurant delivers to a place and at what fee, order minimum, ETA, distance and next arrival time.Arguments
Name Type Required idstringThe restaurant id search() returns.Yes placestringWhere to deliver: a US place, or lat+lng.No latnumberNo lngnumberNo Returns
GrubhubDeliveryEstimateinterface GrubhubMoney { /** Cents, as Grubhub reports it. */ cents: number; currency: string; } interface GrubhubDeliveryEstimate { restaurantId: string; name: string | null; /** false when this point is outside the restaurant's delivery area. */ deliversHere: boolean; open: boolean; openForDelivery: boolean; openForPickup: boolean; distanceMiles: number | null; deliveryFee: GrubhubMoney | null; deliveryFeeBeforeDiscounts: GrubhubMoney | null; orderMinimum: GrubhubMoney | null; deliveryMinutes: number | null; pickupMinutes: number | null; /** ISO instant the next delivery placed now would arrive. */ nextDeliveryTime: string | null; point: { lat: number; lng: number }; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/grubhub/getDeliveryEstimateCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.grubhub.getDeliveryEstimate({ id: "469121", lat: 40.7484, lng: -73.9857 });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.grubhub.getDeliveryEstimate({"id": "469121", "lat": 40.7484, "lng": -73.9857}))curl -X POST https://api.bowmark.ai/v1/sites/grubhub/getDeliveryEstimate \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"id":"469121","lat":40.7484,"lng":-73.9857}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.grubhub.getDeliveryEstimate({ id: "469121", lat: 40.7484, lng: -73.9857 });getFavoriteRestaurantsThe signed-in diner's favourite Grubhub restaurants, with ids getRestaurant() and getMenu() take.Arguments
None.
Returns
GrubhubFavorite[]interface GrubhubFavorite { /** What getRestaurant()/getMenu() take. */ id: string | null; name: string | null; url: string | null; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/grubhub/getFavoriteRestaurantsCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.grubhub.getFavoriteRestaurants();import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.grubhub.getFavoriteRestaurants())curl -X POST https://api.bowmark.ai/v1/sites/grubhub/getFavoriteRestaurants \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.grubhub.getFavoriteRestaurants();getMenuThe menu of one Grubhub restaurant by search()'s id: categories → items with price, description, availability and image.Arguments
Name Type Required idstringYes Returns
GrubhubMenuCategory[]interface GrubhubMoney { /** Cents, as Grubhub reports it. */ cents: number; currency: string; } interface GrubhubMenuItem { id: string; name: string; description: string | null; price: GrubhubMoney | null; available: boolean; popular: boolean; image: string | null; } interface GrubhubMenuCategory { id: string; name: string; items: GrubhubMenuItem[]; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/grubhub/getMenuCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.grubhub.getMenu("469121");import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.grubhub.getMenu("469121"))curl -X POST https://api.bowmark.ai/v1/sites/grubhub/getMenu \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"id":"469121"}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.grubhub.getMenu("469121");getMenuItemOne Grubhub menu item (ids from getMenu()) with every customization group and option, surcharges in cents, nested choices, price range and dish tags.Arguments
Name Type Required args{ restaurantId: string; itemId: string }Yes Returns
GrubhubMenuItemDetailinterface GrubhubMoney { /** Cents, as Grubhub reports it. */ cents: number; currency: string; } interface GrubhubMenuItem { id: string; name: string; description: string | null; price: GrubhubMoney | null; available: boolean; popular: boolean; image: string | null; } interface GrubhubChoiceOption { id: string; name: string; /** Surcharge on top of the item price. */ price: GrubhubMoney | null; available: boolean; /** Nested choices this option opens (e.g. a size that has its own toppings). */ choices: GrubhubChoiceGroup[]; } interface GrubhubChoiceGroup { id: string; name: string; minChoices: number; /** null when Grubhub sets no cap. */ maxChoices: number | null; options: GrubhubChoiceOption[]; } interface GrubhubMenuItemDetail extends GrubhubMenuItem { restaurantId: string; category: string | null; /** Cheapest and dearest the item can come to with its choices. */ priceRange: { min: GrubhubMoney | null; max: GrubhubMoney | null }; tags: string[]; choices: GrubhubChoiceGroup[]; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/grubhub/getMenuItemCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.grubhub.getMenuItem({ restaurantId: "469121", itemId: "24017014" });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.grubhub.getMenuItem({"restaurantId": "469121", "itemId": "24017014"}))curl -X POST https://api.bowmark.ai/v1/sites/grubhub/getMenuItem \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"restaurantId":"469121","itemId":"24017014"}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.grubhub.getMenuItem({ restaurantId: "469121", itemId: "24017014" });getOrderHistoryThe signed-in diner's past Grubhub orders.Arguments
None.
Returns
GrubhubOrderSummary[]interface GrubhubOrderSummary { /** What getOrderStatus() takes. */ id: string | null; restaurantId: string | null; restaurantName: string | null; /** Grubhub's own status word, UNMEASURED signed in. */ status: string | null; placedAt: string | null; totalCents: number | null; currency: string | null; itemCount: number | null; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/grubhub/getOrderHistoryCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.grubhub.getOrderHistory();import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.grubhub.getOrderHistory())curl -X POST https://api.bowmark.ai/v1/sites/grubhub/getOrderHistory \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.grubhub.getOrderHistory();getOrderStatusOne Grubhub order's status, ETA and line items, by the id getOrderHistory() returns.Arguments
Name Type Required orderIdstringYes Returns
GrubhubOrderStatusinterface GrubhubOrderSummary { /** What getOrderStatus() takes. */ id: string | null; restaurantId: string | null; restaurantName: string | null; /** Grubhub's own status word, UNMEASURED signed in. */ status: string | null; placedAt: string | null; totalCents: number | null; currency: string | null; itemCount: number | null; } interface GrubhubOrderItem { name: string | null; quantity: number | null; } interface GrubhubOrderStatus extends GrubhubOrderSummary { /** Minutes until arrival; null when the order has no live ETA (delivered, cancelled). */ etaMinutes: number | null; items: GrubhubOrderItem[]; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/grubhub/getOrderStatusCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.grubhub.getOrderStatus("0");import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.grubhub.getOrderStatus("0"))curl -X POST https://api.bowmark.ai/v1/sites/grubhub/getOrderStatus \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"orderId":"0"}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.grubhub.getOrderStatus("0");getPaymentMethodsThe signed-in diner's saved Grubhub payment methods.Arguments
None.
Returns
GrubhubPaymentMethod[]interface GrubhubPaymentMethod { id: string | null; type: "credit_card" | "paypal" | "venmo" | "amazon_pay" | "cash_app"; /** Card brand (Visa, Amex …); null for a wallet. */ brand: string | null; /** Last four digits of a card, Grubhub never sends more. */ last4: string | null; /** Card expiry as Grubhub returns it, when it does. */ expires: string | null; /** A wallet's handle: PayPal/Amazon email, Venmo or Cash App username. */ account: string | null; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/grubhub/getPaymentMethodsCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.grubhub.getPaymentMethods();import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.grubhub.getPaymentMethods())curl -X POST https://api.bowmark.ai/v1/sites/grubhub/getPaymentMethods \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.grubhub.getPaymentMethods();getPromoOffersActive promo codes, spend-based thresholds and the delivery-fee badge Grubhub shows for one restaurant, priced for a delivery point.Arguments
Name Type Required idstringThe restaurant id search() returns.Yes placestringNo latnumberNo lngnumberNo Returns
GrubhubPromoOffersinterface GrubhubMoney { /** Cents, as Grubhub reports it. */ cents: number; currency: string; } interface GrubhubPromoCode { code: string | null; title: string | null; description: string | null; amount: GrubhubMoney | null; orderMinimum: GrubhubMoney | null; firstTimeOnly: boolean; /** ISO instant, or null when Grubhub set none. */ expiresAt: string | null; } interface GrubhubPromoOffers { restaurantId: string; name: string | null; /** false when this restaurant did not turn up in the sampled search results at this point. */ found: boolean; promoCodes: GrubhubPromoCode[]; /** Spend thresholds that unlock a site-wide perk (e.g. free delivery over $X). */ spendBasedThresholds: GrubhubMoney[]; /** The promo badge Grubhub shows next to the delivery fee in search, e.g. "$0 delivery". */ deliveryFeeBadge: string | null; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/grubhub/getPromoOffersCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.grubhub.getPromoOffers({ id: "2803486", lat: 34.0522, lng: -118.2437 });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.grubhub.getPromoOffers({"id": "2803486", "lat": 34.0522, "lng": -118.2437}))curl -X POST https://api.bowmark.ai/v1/sites/grubhub/getPromoOffers \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"id":"2803486","lat":34.0522,"lng":-118.2437}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.grubhub.getPromoOffers({ id: "2803486", lat: 34.0522, lng: -118.2437 });getRestaurantReads one Grubhub restaurant by search()'s id: address, cuisines, rating, price level, pickup and its full menu.Arguments
Name Type Required idstringYes Returns
GrubhubRestaurantinterface GrubhubMoney { /** Cents, as Grubhub reports it. */ cents: number; currency: string; } interface GrubhubAddress { street: string | null; city: string | null; state: string | null; zip: string | null; } interface GrubhubMenuItem { id: string; name: string; description: string | null; price: GrubhubMoney | null; available: boolean; popular: boolean; image: string | null; } interface GrubhubMenuCategory { id: string; name: string; items: GrubhubMenuItem[]; } interface GrubhubRestaurant { id: string; name: string; url: string; address: GrubhubAddress; cuisines: string[]; rating: number | null; ratingCount: number | null; priceRating: number | null; pickup: boolean; menu: GrubhubMenuCategory[]; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/grubhub/getRestaurantCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.grubhub.getRestaurant("469121");import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.grubhub.getRestaurant("469121"))curl -X POST https://api.bowmark.ai/v1/sites/grubhub/getRestaurant \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"id":"469121"}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.grubhub.getRestaurant("469121");getRestaurantReviewsA page of diner reviews for one Grubhub restaurant: stars, text, date, sentiment and items ordered, with the total count.Arguments
Name Type Required idstringYes limitnumber1-50, default 10.No pagenumber1-based, default 1.No Returns
GrubhubReviewsinterface GrubhubReview { id: string; /** The diner's first name, as Grubhub shows it. */ reviewer: string | null; stars: number | null; text: string | null; /** ISO date the review was written. */ date: string | null; sentiment: string | null; items: { id: string; name: string }[]; } interface GrubhubReviews { restaurantId: string; totalCount: number; page: number; totalPages: number; reviews: GrubhubReview[]; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/grubhub/getRestaurantReviewsCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.grubhub.getRestaurantReviews({ id: "469121", limit: 5 });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.grubhub.getRestaurantReviews({"id": "469121", "limit": 5}))curl -X POST https://api.bowmark.ai/v1/sites/grubhub/getRestaurantReviews \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"id":"469121","limit":5}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.grubhub.getRestaurantReviews({ id: "469121", limit: 5 });getSavedAddressesThe signed-in diner's saved Grubhub delivery addresses: label, street, unit, city, state, ZIP, coordinates and delivery instructions.Arguments
None.
Returns
GrubhubSavedAddress[]interface GrubhubSavedAddress { id: string | null; label: string | null; street: string | null; unit: string | null; city: string | null; state: string | null; zip: string | null; lat: number | null; lng: number | null; instructions: string | null; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/grubhub/getSavedAddressesCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.grubhub.getSavedAddresses();import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.grubhub.getSavedAddresses())curl -X POST https://api.bowmark.ai/v1/sites/grubhub/getSavedAddresses \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.grubhub.getSavedAddresses();listCuisinesCuisine tags carried by restaurants delivering near a place, most common first with a count of how many of the sampled restaurants carry each.Arguments
Name Type Required placestringA US place to sample, geocoded via OpenStreetMap.No latnumberNo lngnumberNo sampleSizenumberHow many nearby restaurants to sample cuisines from, 1-50, default 50.No Returns
GrubhubCuisinesinterface GrubhubCuisine { name: string; /** How many of the sampled restaurants carry this cuisine tag. */ restaurantCount: number; } interface GrubhubCuisines { point: { lat: number; lng: number }; /** How many restaurants were actually sampled (≤ sampleSize). */ sampledRestaurants: number; /** Grubhub's own count of restaurants delivering to this point. */ totalResults: number; /** Cuisine tags carried by the sampled restaurants, most common first. */ cuisines: GrubhubCuisine[]; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/grubhub/listCuisinesCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.grubhub.listCuisines({ lat: 40.7484, lng: -73.9857, sampleSize: 20 });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.grubhub.listCuisines({"lat": 40.7484, "lng": -73.9857, "sampleSize": 20}))curl -X POST https://api.bowmark.ai/v1/sites/grubhub/listCuisines \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"lat":40.7484,"lng":-73.9857,"sampleSize":20}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.grubhub.listCuisines({ lat: 40.7484, lng: -73.9857, sampleSize: 20 });searchSearches Grubhub for restaurants delivering to (or offering pickup near) a place.Arguments
Name Type Required querystringWhat to look for, a cuisine, dish or restaurant name, e.g. "pizza".No placestringA US place to deliver to, geocoded via OpenStreetMap, e.g. "Union Square, New York, NY".No latnumberNo lngnumberNo mode"delivery" | "pickup""delivery" (default) or "pickup".No limitnumber1-50, default 20.No pagenumber1-based page, default 1.No Returns
GrubhubSearchResultinterface GrubhubMoney { /** Cents, as Grubhub reports it. */ cents: number; currency: string; } interface GrubhubAddress { street: string | null; city: string | null; state: string | null; zip: string | null; } interface GrubhubRestaurantRow { /** The id getRestaurant/getMenu take. */ id: string; name: string; url: string; address: GrubhubAddress; cuisines: string[]; rating: number | null; ratingCount: number | null; /** 1-4 dollar signs. */ priceRating: number | null; distanceMiles: number | null; open: boolean; delivery: boolean; pickup: boolean; deliveryFee: GrubhubMoney | null; deliveryMinimum: GrubhubMoney | null; deliveryMinutes: { low: number; high: number } | null; pickupMinutes: number | null; logo: string | null; } interface GrubhubSearchResult { restaurants: GrubhubRestaurantRow[]; totalResults: number; page: number; totalPages: number; point: { lat: number; lng: number }; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/grubhub/searchCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.grubhub.search({ query: "pizza", lat: 40.7484, lng: -73.9857, limit: 5 });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.grubhub.search({ "query": "pizza", "lat": 40.7484, "lng": -73.9857, "limit": 5 }))curl -X POST https://api.bowmark.ai/v1/sites/grubhub/search \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"query":"pizza","lat":40.7484,"lng":-73.9857,"limit":5}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.grubhub.search({ query: "pizza", lat: 40.7484, lng: -73.9857, limit: 5 });
addToCartAdds a menu item with options, quantity and instructions to an anonymous Grubhub cart and returns the cart with a cartKey for later runs.Arguments
Name Type Required restaurantIdstringYes itemIdstringYes quantitynumber1-50, default 1.No optionIdsstring[]Option ids from getMenuItem().choices[].options[].id.No instructionsstringNo cartKeystringA cart from an earlier run; omit to use (or start) this run's cart.No Returns
GrubhubCartinterface GrubhubCartLine { /** The id removeFromCart/updateCartItem take. */ lineId: string; itemId: string; restaurantId: string; name: string; quantity: number; /** One unit, in cents, before options. */ unitPriceCents: number; /** This line's total in cents, options and quantity included. */ totalCents: number; specialInstructions: string; /** Chosen option ids, as getMenuItem().choices[].options[].id. */ optionIds: string[]; } interface GrubhubCart { /** Pass to the cart functions in a LATER run to reach this same cart; within one run they find it on their own. null while no cart exists. */ cartKey: string | null; cartId: string | null; items: GrubhubCartLine[]; itemCount: number; subtotalCents: number; currency: string; restaurantIds: string[]; // Where the PERSON finishes: the restaurant page, with these items to add again (the cart is an anonymous Grubhub session no link can open). A refusal when the cart is empty or spans no single restaurant. Bowmark never orders. checkout: GrubhubCheckoutHandoff; } // The checkout handoff: where the PERSON finishes. Bowmark never pays, books or orders. // Switch on `status`; a status you do not recognise means "show the person `url` and stop". interface GrubhubCheckoutHandoff { status: "ready_to_checkout" | "needs_login" | "unavailable"; url: string; // the https page to open on the site urlKind?: "carries_items" | "signed_in_cart" | "product_page"; // ready_to_checkout only: does the link carry the items, or only open the item's page reason?: string; // unavailable only: out_of_stock | not_available_for_dates | not_sold_online | region_not_served | quantity_unavailable | empty_cart detail?: string; // unavailable only: one sentence saying why account: { site: string; hint: string; signedInAs?: string }; summary: { items: { title: string; variant: string | null; quantity: number; unitPrice: string | null; lineTotal: string | null; url?: string; id?: string }[]; total: string | null; currency: string } | null; warnings: string[]; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/grubhub/addToCartCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.grubhub.addToCart({ restaurantId: "<restaurantId>", itemId: "<itemId>" });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.grubhub.addToCart({"restaurantId": "<restaurantId>", "itemId": "<itemId>"}))curl -X POST https://api.bowmark.ai/v1/sites/grubhub/addToCart \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"restaurantId":"<restaurantId>","itemId":"<itemId>"}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.grubhub.addToCart({ restaurantId: "<restaurantId>", itemId: "<itemId>" });applyPromoCodeApplies a promo code to the anonymous Grubhub cart and says whether it applied, and why not when it did not.Arguments
Name Type Required args{ code: string; cartKey?: string }Yes Returns
GrubhubPromoResultinterface GrubhubCartLine { /** The id removeFromCart/updateCartItem take. */ lineId: string; itemId: string; restaurantId: string; name: string; quantity: number; /** One unit, in cents, before options. */ unitPriceCents: number; /** This line's total in cents, options and quantity included. */ totalCents: number; specialInstructions: string; /** Chosen option ids, as getMenuItem().choices[].options[].id. */ optionIds: string[]; } interface GrubhubCart { /** Pass to the cart functions in a LATER run to reach this same cart; within one run they find it on their own. null while no cart exists. */ cartKey: string | null; cartId: string | null; items: GrubhubCartLine[]; itemCount: number; subtotalCents: number; currency: string; restaurantIds: string[]; // Where the PERSON finishes: the restaurant page, with these items to add again (the cart is an anonymous Grubhub session no link can open). A refusal when the cart is empty or spans no single restaurant. Bowmark never orders. checkout: GrubhubCheckoutHandoff; } // The checkout handoff: where the PERSON finishes. Bowmark never pays, books or orders. // Switch on `status`; a status you do not recognise means "show the person `url` and stop". interface GrubhubCheckoutHandoff { status: "ready_to_checkout" | "needs_login" | "unavailable"; url: string; // the https page to open on the site urlKind?: "carries_items" | "signed_in_cart" | "product_page"; // ready_to_checkout only: does the link carry the items, or only open the item's page reason?: string; // unavailable only: out_of_stock | not_available_for_dates | not_sold_online | region_not_served | quantity_unavailable | empty_cart detail?: string; // unavailable only: one sentence saying why account: { site: string; hint: string; signedInAs?: string }; summary: { items: { title: string; variant: string | null; quantity: number; unitPrice: string | null; lineTotal: string | null; url?: string; id?: string }[]; total: string | null; currency: string } | null; warnings: string[]; } interface GrubhubPromoResult { /** The code as Grubhub knows it (its own casing). */ code: string; /** true only when Grubhub attached it to the cart. */ applied: boolean; /** What the code is for, e.g. "Get $2 off your first order"; null when Grubhub has no such code. */ description: string | null; /** Why it was not applied, Grubhub's own reason ("This promo code has expired", "CODE_NOT_AVAILABLE_TO_ORDER_TYPE"); null when applied. */ reason: string | null; cart: GrubhubCart; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/grubhub/applyPromoCodeCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.grubhub.applyPromoCode({});import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.grubhub.applyPromoCode({}))curl -X POST https://api.bowmark.ai/v1/sites/grubhub/applyPromoCode \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.grubhub.applyPromoCode({});removeFromCartRemoves one line from the Grubhub cart and returns what is left.Arguments
Name Type Required args{ lineId: string; cartKey?: string }Yes Returns
GrubhubCartinterface GrubhubCartLine { /** The id removeFromCart/updateCartItem take. */ lineId: string; itemId: string; restaurantId: string; name: string; quantity: number; /** One unit, in cents, before options. */ unitPriceCents: number; /** This line's total in cents, options and quantity included. */ totalCents: number; specialInstructions: string; /** Chosen option ids, as getMenuItem().choices[].options[].id. */ optionIds: string[]; } interface GrubhubCart { /** Pass to the cart functions in a LATER run to reach this same cart; within one run they find it on their own. null while no cart exists. */ cartKey: string | null; cartId: string | null; items: GrubhubCartLine[]; itemCount: number; subtotalCents: number; currency: string; restaurantIds: string[]; // Where the PERSON finishes: the restaurant page, with these items to add again (the cart is an anonymous Grubhub session no link can open). A refusal when the cart is empty or spans no single restaurant. Bowmark never orders. checkout: GrubhubCheckoutHandoff; } // The checkout handoff: where the PERSON finishes. Bowmark never pays, books or orders. // Switch on `status`; a status you do not recognise means "show the person `url` and stop". interface GrubhubCheckoutHandoff { status: "ready_to_checkout" | "needs_login" | "unavailable"; url: string; // the https page to open on the site urlKind?: "carries_items" | "signed_in_cart" | "product_page"; // ready_to_checkout only: does the link carry the items, or only open the item's page reason?: string; // unavailable only: out_of_stock | not_available_for_dates | not_sold_online | region_not_served | quantity_unavailable | empty_cart detail?: string; // unavailable only: one sentence saying why account: { site: string; hint: string; signedInAs?: string }; summary: { items: { title: string; variant: string | null; quantity: number; unitPrice: string | null; lineTotal: string | null; url?: string; id?: string }[]; total: string | null; currency: string } | null; warnings: string[]; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/grubhub/removeFromCartCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.grubhub.removeFromCart({});import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.grubhub.removeFromCart({}))curl -X POST https://api.bowmark.ai/v1/sites/grubhub/removeFromCart \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.grubhub.removeFromCart({});saveRestaurantAdds a restaurant (search()'s id) to the signed-in diner's Grubhub favourites and returns the updated list.Arguments
Name Type Required idstringYes Returns
GrubhubFavorite[]interface GrubhubFavorite { /** What getRestaurant()/getMenu() take. */ id: string | null; name: string | null; url: string | null; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/grubhub/saveRestaurantCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.grubhub.saveRestaurant("<id>");import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.grubhub.saveRestaurant("<id>"))curl -X POST https://api.bowmark.ai/v1/sites/grubhub/saveRestaurant \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"id":"<id>"}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.grubhub.saveRestaurant("<id>");updateCartItemSets the quantity of one Grubhub cart line, keeping its options, and returns the cart.Arguments
Name Type Required args{ lineId: string; quantity: number; cartKey?: string }Yes Returns
GrubhubCartinterface GrubhubCartLine { /** The id removeFromCart/updateCartItem take. */ lineId: string; itemId: string; restaurantId: string; name: string; quantity: number; /** One unit, in cents, before options. */ unitPriceCents: number; /** This line's total in cents, options and quantity included. */ totalCents: number; specialInstructions: string; /** Chosen option ids, as getMenuItem().choices[].options[].id. */ optionIds: string[]; } interface GrubhubCart { /** Pass to the cart functions in a LATER run to reach this same cart; within one run they find it on their own. null while no cart exists. */ cartKey: string | null; cartId: string | null; items: GrubhubCartLine[]; itemCount: number; subtotalCents: number; currency: string; restaurantIds: string[]; // Where the PERSON finishes: the restaurant page, with these items to add again (the cart is an anonymous Grubhub session no link can open). A refusal when the cart is empty or spans no single restaurant. Bowmark never orders. checkout: GrubhubCheckoutHandoff; } // The checkout handoff: where the PERSON finishes. Bowmark never pays, books or orders. // Switch on `status`; a status you do not recognise means "show the person `url` and stop". interface GrubhubCheckoutHandoff { status: "ready_to_checkout" | "needs_login" | "unavailable"; url: string; // the https page to open on the site urlKind?: "carries_items" | "signed_in_cart" | "product_page"; // ready_to_checkout only: does the link carry the items, or only open the item's page reason?: string; // unavailable only: out_of_stock | not_available_for_dates | not_sold_online | region_not_served | quantity_unavailable | empty_cart detail?: string; // unavailable only: one sentence saying why account: { site: string; hint: string; signedInAs?: string }; summary: { items: { title: string; variant: string | null; quantity: number; unitPrice: string | null; lineTotal: string | null; url?: string; id?: string }[]; total: string | null; currency: string } | null; warnings: string[]; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/grubhub/updateCartItemCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.grubhub.updateCartItem({});import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.grubhub.updateCartItem({}))curl -X POST https://api.bowmark.ai/v1/sites/grubhub/updateCartItem \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.grubhub.updateCartItem({});
Use it from code
- Node
npm i @bowmark/web - Python
pip install bowmark-web - HTTP
POST /v1/sites/grubhub/<function> - OpenAPI
/v1/sites/grubhub/openapi.json