Design Airbnb Dynamic Pricing
On this page
Problem Description
In this interview, we're going to design price suggestions for a holiday rental marketplace, similar to Airbnb's Smart Pricing or Vrbo's pricing tools. Hosts list their home with a nightly price, and many don't know what to charge: some leave one price all year, others copy a neighbour. The system suggests a price for every night of the next year in the host's calendar, higher when many guests want that place on those dates, lower to fill quiet nights, each with a short reason. Hosts can accept a suggestion, edit it, or turn on automatic pricing, which applies the suggestions for them; suggestions never go below the minimum or above the maximum the host sets. Guests search and book at the host's price. The system keeps learning from which nights get booked at which prices. You can use existing building blocks: a listings service that stores every listing with its calendar, prices and the host's limits, and the company's event stream, which already records every guest search (place and dates), every booking and every price change. This interview is about the price suggestions, not about search, booking or payments.
Out of Scope
- Ranking listings in guest search – the search team's system; it uses whatever price the host sets.
- Payments, fees and taxes – added on top of the nightly price by other services.
- Discounts for long stays and minimum-stay rules – a good follow-up question.
- Pricing a brand-new listing with no bookings yet – it starts from similar listings nearby; a good follow-up question.
- Local laws on short-term rentals – the listings service enforces them.
Good Clarifying Questions
- How many listings and nights? – About 7M listings, each priced for the next 365 nights: about 2.5B listing-nights. Hosts open their calendar about 2M times a day.
- Whose goal comes first? – Hosts' earnings per available night, without guests booking less. Prices that jump sharply from day to day look unfair and cost trust.
- How fast? – The calendar with suggestions loads within 300 ms. Suggestions are computed in the background; the nightly run must finish within 4 hours.
- How fresh? – Every suggestion is recomputed nightly. When demand jumps, for example a festival is announced, the affected nights should update within an hour. A host's new minimum or maximum applies at once.
- What if pricing fails? – Hosts see their own prices, automatic pricing keeps the last prices it applied, and guests keep booking. Nothing about booking may depend on the pricing system.
Requirements
Functional Requirements
- Suggest a Price for Every Night – Hosts see a suggested price with a short reason for every night of the next 365 days, and can accept it, edit it, or turn on automatic pricing.
- Stay Within the Host's Limits – Suggestions and automatic prices never go below the host's minimum or above their maximum.
- Record What Gets Booked – The system records the price of every open night each day, which suggestions hosts saw and accepted, guests' searches, and which nights were booked at what price.
- Keep Learning – The system trains a new model from these records at least weekly and uses it only after it proves at least as good as the current one.
Non-Functional Requirements
- Scale – 7M listings × 365 nights = 2.5B prices to compute every night; trying 20 prices each is 50B predictions. About 2M calendar views a day.
- Latency – Calendar with suggestions under 300 ms at p99; the nightly run done within 4 hours.
- Freshness – All suggestions recomputed nightly; nights hit by a demand jump within 1 hour; a host's new limits at once.
- Availability – 99.9%. If pricing fails, hosts see their own prices and automatic pricing keeps its last prices; booking never depends on it.
Try it yourself first
You have the full problem. Sketch your answer, then sign up free to read the complete walkthrough.
- The complete design, flow by flow, with pictures
- Deep dives into the hard parts
- What mid, senior and staff candidates are expected to say
- Full company question lists
Free forever. No card needed.