PracHub
QuestionsPremiumLearningGuidesInterview PrepNEWCoaches
|Home/System Design/Airbnb

Design API for split-stay combinations

Last updated: May 6, 2026

Quick Overview

This question evaluates HTTP API design and scalable search service competencies for split‑stay combinations, including data and schema modeling, pagination, idempotency, ranking and deduplication, caching, low‑latency indexing, and correct handling of availability windows.

  • hard
  • Airbnb
  • System Design
  • Software Engineer

Design API for split-stay combinations

Company: Airbnb

Role: Software Engineer

Category: System Design

Difficulty: hard

Interview Round: Technical Screen

Design an HTTP API endpoint that, given a date range and a set of listings with their available day numbers, returns all valid two-listing split-stay combinations as defined above. Specify request and response schemas, query parameters (e.g., start_day, end_day, max_results, sort_by), pagination, idempotency, and how to represent multiple valid split days per pair. Describe ranking and deduplication, caching, and rate limiting. Explain how the service achieves low latency at scale (e.g., precomputed prefix/suffix coverage, interval indexes) and handles edge cases such as time zones, minimum stays, cleaning-day gaps, and overlapping availability. Provide example success and error payloads.

Quick Answer: This question evaluates HTTP API design and scalable search service competencies for split‑stay combinations, including data and schema modeling, pagination, idempotency, ranking and deduplication, caching, low‑latency indexing, and correct handling of availability windows.

Related Interview Questions

  • Design a Scalable Job Scheduler - Airbnb
  • Design a Rental Marketplace Backend - Airbnb (hard)
  • Design a booking system - Airbnb (medium)
  • Design a group chat system - Airbnb (medium)
  • Design a real-time chat system with hot groups - Airbnb (hard)
Airbnb logo
Airbnb
Sep 6, 2025, 12:00 AM
Software Engineer
Technical Screen
System Design
33
0

Design an HTTP API for Two‑Listing Split‑Stay Search

Context

You are building a search service for split stays: when a guest's date range cannot be covered by a single listing, find pairs of listings that together cover the entire stay with exactly one move. The client supplies a date range and a set of candidate listings along with their available day numbers within that range.

Assumptions to make the task self-contained:

  • Trip is defined by check-in date and check-out date. Nights count N = (check_out - check_in) in the requested time zone.
  • Available day numbers are 1-based indices over the trip nights: 1..N. Night i corresponds to the overnight between calendar day i and i+1 in the chosen time zone.
  • A split at day s means: Listing A covers nights 1..(s-1); Listing B covers nights s..N. The move occurs on the morning of day s.
  • Optionally, a cleaning-day gap of up to g nights may be allowed between A and B.

Requirements

  1. Specify HTTP endpoint(s), request/response schemas, and query parameters (e.g., start_date, end_date, start_day, end_day, max_results, sort_by).
  2. Define pagination, idempotency, and how to represent multiple valid split days per pair.
  3. Describe ranking, tie-breaking, and deduplication rules.
  4. Describe caching and rate limiting.
  5. Explain how the service achieves low latency at scale (e.g., precomputed prefix/suffix coverage, interval indexes).
  6. Handle edge cases: time zones, minimum stays, cleaning-day gaps, overlapping availability, invalid inputs.
  7. Provide example success and error payloads.

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Airbnb•More Software Engineer•Airbnb Software Engineer•Airbnb System Design•Software Engineer System Design
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.