Cities have a common characteristic in the form of land utilisation, which is dominated by built-up areas. Tourism is an essential aspect of city development because it can involve the identity of the city. Historical buildings, landmarks, shopping centres and museums are generally interesting places for tourists to visit. Yogyakarta, the research area, is synonymous as a city of culture and of students. Knowledge of the spatial clustering patterns of tourists can be one of the references for urban development. Social media data were used in the study as an alternative to direct data collection, which requires considerable resources. Flickr and Twitter were used as proxies to dete rmine the distribution of tourists, and the DBSCAN and HDBSCAN clustering algorithms were used to determine the centres of tourist activity. Furthermore, Flickr data were analysed temporally to determine the impact of the COVID-19 pandemic on tourism in Yogyakarta City. The clustering of social media data results shows that there are several city hotspots, besides the already well-known tourist attractions. Apart from city landmarks, several other tourist hotspots were revealed through the clustering process, such as accommodation, shopping centres, entertainment venues and souvenir shops, which also support tourism activities. The impact of COVID-19 on tourism in Yogyakarta City can be reflected through the number of uploaded photos by tourists on Flickr, which has decreased since March 2020.