The ideal duration for a visit to Barcelona depends on your interests and the level of exploration you desire. However, a recommended timeframe is around 3 to 5 days. This allows you to experience the city's main attractions, such as Sagrada Família, Park Güell, and Casa Batlló, and explore different neighbourhoods while also having time to relax and soak in the local culture.