We develop an urban-search model in which firms post wages. When all workers are identical, there is a unique wage in equilibrium even in the presence of search and spatial frictions. This wage is affected by spatial and labor costs. When workers differ according to the value imputed to leisure, we show that, under some conditions, two wages emerge in equilibrium. The commuting cost not only affects the land market but also the labor market through wages. Workers productivity also affects housing prices and this impact can be positive or negative depending on the location in the city. We then run some numerical simulations to reproduce some stylized facts about the labor-market outcomes of black and white workers. We find that a reduction in commuting costs for all workers reduces the unemployment rate of white workers and the profit of all firms but increases the wage of all workers (black and white) and raises the fraction of firms posting the high wage.