Social security administrative data are increasingly becoming available in many countries. These data have a long panel structure (large N, large T) and allow for the measurement of many different variables with high accuracy. It also captures shortterm unemployment spells which are normally unavailable in survey data due to its design. However, the measurement of unemployment differs in both types of datasets. The resulting gap between total unemployment and registered unemployment is not constant across workers characteristics or time. In this paper, I present a simple, systematic method to expand the raw Spanish Social Security administrative data. I identify unemployed workers who are not receiving unemployment benefits, using information from the institutional framework and using the Labour Force Survey as a benchmark. The resulting unemployment rates and labour market flows are comparable across both datasets. Administrative data can also overcome some of the problems of the Labour Force Survey, such as changes in the structure of the survey. This paper aims to provide a comprehensive guide on how to adapt administrative datasets to make them useful for studying unemployment. Keywords Administrative data • Survey data • Unemployment • Temporary contracts JEL Classification J21 • J60 • J80 I would like to thank the National Statistics Institute (INE) and the Ministry of Employment and Social Security of Spain for kindly providing the data. I would like to thank my supervisors Maia Güell and Ludo Visschers for all of their support and advice; I have also benefited from the comments and suggestions of