The National Library of Spain (Spanish: Biblioteca Nacional de España) is in Madrid. It is Spain's largest library. It is also one of the world's largest libraries. It was started by King Philip V of Spain in 1712.