A powerful Go library and set of tools for automating Resy restaurant reservations. Search restaurants, check availability, and book reservations programmatically.
- 🔍 Search restaurants by name
- 📅 Check availability for specific dates and party sizes
- 🎯 Sniper mode - automatically book when slots become available
- 🔗 URL booking - paste any Resy URL and book instantly
- 💳 Payment support - handles payment methods automatically
- ⚡ Fast - concurrent requests and efficient polling
git clone https://github.com/kvetrivel/resy-bot.git
cd resy-bot
go mod downloadCopy the credentials template in the examples directory:
cd examples
cp credentials.example.yaml credentials.yamlEdit credentials.yaml and add your Resy credentials:
api_key: "YOUR_RESY_API_KEY" # Extract from Resy
auth_token: "YOUR_RESY_AUTH_TOKEN" # Extract from ResyHow to get your credentials:
-
API Key:
- Open resy.com and log in
- Open Developer Tools (F12 or Cmd+Option+I)
- Go to Network tab and refresh
- Find any request to
api.resy.com - Look for the
Authorizationheader - Copy the API key from
ResyAPI api_key="..."
-
Auth Token:
- In the same request headers
- Find
X-Resy-Auth-Token - Copy the entire JWT token value
# From the examples directory
cd examples
# Search and explore the API
go run api_explorer.go
# Book from URL (easiest method)
go run book_from_url.go
# Book specific restaurant with confirmation
go run book_zensushi_safe.go# From the project root
go run cmd/sniper/main.go
# Or build it first
go build -o sniper cmd/sniper/main.go
./sniperThe easiest way to book. Just paste any Resy URL:
// book_from_url.go
resyURL := "https://resy.com/cities/new-york-ny/venues/idashi-omakase?date=2025-10-09&seats=2"Run it:
go run book_from_url.goThe script will:
- Parse venue, date, and party size from URL
- Search for the restaurant
- Show available time slots
- Let you choose and confirm
- Book the reservation
Monitor a restaurant and instantly book when your target time becomes available (perfect for catching cancellations):
// sniper.go
venueID := 6194
date := "2025-10-20"
partySize := 2
targetTime := "19:00"
duration := 5 * time.Minutego run sniper.goPolls every 100ms and books immediately when found.
Import and use as a library in your own Go projects:
package main
import (
"context"
"log"
resybot "github.com/kvetrivel/resy-bot/pkg/resybot"
)
func main() {
// Load credentials from YAML
creds, err := resybot.LoadCredentials("credentials.yaml")
if err != nil {
log.Fatal(err)
}
// Create client
client := resybot.NewClient(resybot.Config{
APIKey: creds.APIKey,
AuthToken: creds.AuthToken,
})
ctx := context.Background()
// Search restaurants
venues, _ := client.SearchRestaurants(ctx, "carbone")
// Check availability
slots, _ := client.CheckAvailability(ctx, venueID, "2025-10-20", 2)
// Get booking details (required step!)
details, _ := client.GetBookingDetails(ctx, slots[0].Config.Token, date, partySize)
// Book reservation
booking, _ := client.BookReservation(ctx, details.BookToken.Value, paymentID)
}To use this library in your project:
go get github.com/kvetrivel/resy-botresy-bot/
├── README.md # You are here
├── go.mod # Go module definition
├── go.sum # Dependency checksums
├── credentials.yaml # Root credentials (optional)
├── credentials.example.yaml # Root template
│
├── pkg/resybot/ # Core library (import this)
│ ├── client.go # HTTP client and auth
│ ├── credentials.go # YAML credential loader
│ ├── search.go # Restaurant search
│ ├── availability.go # Availability checking
│ ├── booking.go # Reservation booking
│ ├── user.go # User profile operations
│ └── types.go # Data structures
│
├── cmd/ # Command-line applications
│ └── sniper/
│ └── main.go # Sniper bot executable
│
├── examples/ # Example programs
│ ├── credentials.yaml # Example credentials (gitignored)
│ ├── credentials.example.yaml # Template for examples
│ ├── api_explorer.go # API exploration demo
│ ├── book_from_url.go # Book from Resy URL
│ └── book_zensushi_safe.go # Safe booking with prompts
│
└── docs/ # Documentation
├── API_DOCUMENTATION.md # Complete API reference
└── ARCHITECTURE.md # System design and patterns
Ready-to-run demonstration programs:
api_explorer.go- Interactive API explorer demonstrating all endpointsbook_from_url.go- Universal booking from any Resy URLbook_zensushi_safe.go- Safe booking with step-by-step confirmations
Standalone executable applications:
sniper- High-speed reservation sniper bot with 100ms polling- Single-venue mode: Target specific restaurant/time
- Multi-venue mode: First-available across multiple restaurants
- Automatic payment method handling
Core Go package for building your own tools:
- Full Resy API coverage
- Type-safe interfaces
- Context-aware operations
- Concurrent-safe client
All endpoints documented in docs/API_DOCUMENTATION.md:
POST /3/venuesearch/search- Search restaurantsGET /4/find- Check availabilityPOST /3/details- Get booking detailsPOST /3/book- Book reservationGET /4/user- Get user dataGET /3/venue- Get venue detailsGET /2/venue/calendar- Get venue calendar
See docs/ARCHITECTURE.md for detailed design patterns, token flow, and best practices.
Two-Token System:
- Config Token - From availability check
- Book Token - From booking details (real token)
Always call GetBookingDetails() before BookReservation():
// ❌ WRONG - will fail
booking, _ := client.BookReservation(ctx, slot.Config.Token, nil)
// ✅ CORRECT
details, _ := client.GetBookingDetails(ctx, slot.Config.Token, date, partySize)
booking, _ := client.BookReservation(ctx, details.BookToken.Value, paymentID)- Sniper mode: 100ms intervals (safe)
- Manual checks: 1-5 second intervals
- Production: Add exponential backoff
- Store payment ID from
GetBookingDetails() - Some restaurants require payment, others don't
- Use
nilif no payment required
- Auth tokens expire after ~45 days
- Refresh when you see 401 errors
- Store securely, never commit
booking, err := client.BookReservation(ctx, bookToken, paymentID)
if err != nil {
// Check if token expired
// Check if slot no longer available
// Check if payment required
}Never commit credentials:
- ✅
credentials.yamlfiles are in.gitignore - ✅ All examples load from local YAML files
- ✅ Documentation uses placeholder values
- ✅ Template files provided (
.example.yaml)
Before pushing to GitHub:
# Verify credentials are ignored
git status
# Should NOT see:
# - credentials.yaml
# - examples/credentials.yaml
#
# Should see:
# - credentials.example.yaml
# - examples/credentials.example.yaml- You used config token instead of book token
- Call
GetBookingDetails()first
- Auth token expired (refresh it)
- Token format incorrect
- Restaurant fully booked
- Try different date or party size
- Use sniper mode for cancellations
- Add credit card in Resy app/website
- Pass payment ID to
BookReservation()
This is a personal project, but feel free to fork and customize for your needs.
This tool is for educational and personal use only. Please use responsibly and respect Resy's terms of service. Don't abuse the API or harm the platform.
- Use reasonable polling intervals
- Don't run multiple snipers simultaneously for same restaurant
- Be a good citizen of the platform
MIT License - Use at your own risk
- Check API_DOCUMENTATION.md for API details
- Check ARCHITECTURE.md for design patterns
- Review example scripts for usage patterns
Built with ❤️ for food lovers who hate refreshing at midnight