Population growth in urban centres and the intensification of segregation phenomena associated with international mobility require improved urban planning and decision-making. More effective planning in turn requires better analysis and geospatial modelling of residential locations, along with a deeper understanding of the factors that drive the spatial distribution of various migrant groups. This study examines the factors that influence the distribution of migrants at the local level and evaluates their importance using machine learning, specifically the variable importance measures produced by the random forest algorithm. It is conducted on high spatial resolution (100×100 grid cells) register data in Amsterdam and Copenhagen, using demographic, housing and neighbourhood attributes for 2018. The results distinguish the ethnic and demographic composition of a location as an important factor in the residential distribution of migrants in both cities. We also examine whether certain migrant groups pay higher prices in the most attractive areas, using spatial statistics and mapping for 2008 and 2018. We find evidence of segregation in both cities, with Western migrants having higher purchasing power than non-Western migrants in both years. The method sheds light on the determinants of migrant distribution in destination cities and advances our understanding of the application of geospatial artificial intelligence to urban dynamics and population movements.