Most studies on residential segregation in China have primarily relied on decennial population census data, which lacks the granularity and timeliness needed to capture segregation dynamics with higher frequency. Drawing on georeferenced housing market transaction data between 2012 and 2023 in Shanghai and Beijing, and employing fine-grained spatial segregation analysis techniques, including k-nearest neighbor approaches (k−NN) and modifiable grids, we find that housing segregation by price and size increased between 2012 and 2018, followed by a decline thereafter, particularly in the larger-sized and higher-priced market segments. While segregation levels are generally comparable between the two cities, Shanghai exhibits higher segregation for the top 20 % of apartments, while Beijing shows greater segregation for the bottom 20 %. Segregation is highest for prices, followed by rents, with housing size showing the lowest segregation. Expanding the analysis to 11 major Chinese cities, we suggest that high and rising housing prices are associated with increasing segregation, particularly in cities with lower initial segregation. Methodologically, this paper demonstrates that leveraging big transaction and listing data, alongside utilizing fine-grained spatial analysis, can advance our understanding of urban inequalities.