Part of the fun of traveling to different cities is interacting with locals and meeting new people.

Some cities are better for this than others.

Hostelworld set out to find the world's most sociable cities by surveying 12,000 people in 39 cities across 28 countries.

The resulting rankings are based on each city's score in three different categories:

Social activity: how often residents see friends, go out to eat or drink with friends, and use social media.

Attitude to socializing: the value placed on face-to-face interactions, entertaining at home, and sociable versus selfish values.

Social milieu: how often residents party, and how open, tolerant, and trusting they are.

Keep scrolling to see the cities that made the top 20.

20. Kuala Lampur, Malaysia

Eating out and drinking with friends is a popular social activity in Kuala Lumpur. The city ranked number four in terms of the average number of times its residents eat out per year, coming in behind big cities like New York City, Chicago, and Boston.

19. Berlin, Germany

Berlin residents put a lot of trust in one another. The city ranked second in the trust in friends' guidance category.

18. Milan, Italy

Milan ranked first in the openness index, meaning people in the city are open-minded — especially while traveling.

A high percentage of residents feels that engaging in the authentic culture of a place, along with partying, are the most important things to do while on a trip.

17. Vancouver, Canada

(Kenny Louie/Flickr (Kenny Louie/Flickr)

Vancouver ranked in the top 10 in terms of social activity, meaning that its inhabitants enjoy socializing with friends, eating out and drinking with friends, and using social media.

16. Helsinki, Finland

Helsinki ranked second in terms of the value they place on face-to-face interactions with friends. Residents of the city prefer these interactions to activities like playing sports, watching TV, and shopping.

15. Warsaw, Poland

Warsaw ranked third in terms of how much they enjoy entertaining guests at home. A high percentage of the city's residents prefer doing this over other activities like gaming and watching TV.

14. Baltimore, Maryland

Baltimore placed in the top five for the average number of days its residents use social media in a year.

13. Paris, France

(Getty Images/iStockphoto (Getty Images/iStockphoto)

Parisians enjoy in-person interactions. The city ranked third, behind the Scandinavian cities of Copenhagen and Helsinki, for the value its residents place on face-to-face socializing.

12. Sydney, Australia

Sydney ranked in the top 10 on the sociable versus self-oriented concerns index, meaning that residents place more value on gaining new experiences and being a part of community life rather than owning more material goods and achieving their own goals.

11. Toronto, Canada

Toronto ranked within the top five in the trust in friends' guidance category.

10. Dublin, Ireland

Dublin placed fourth in terms of how much value its inhabitants place on socializing, coming in behind the three Scandinavian cities of Gothenburg, Copenhagen, and Stockholm.

9. Hamburg, Germany

Hamburg, Germany (Getty Images/iStockphoto)

Hamburg took third place in the social milieu category. Residents of the city are fun, open, tolerant, and trusting.

8. Rome, Italy

Like Milan, Rome also ranked high on the openness index, meaning locals think that it's crucial to engage in the authentic culture of the place you're traveling to, and to experience the nightlife of that place.

7. Madrid, Spain

Madrid residents like to have a good time. The city ranked first on the "propensity to party" index; a high percentage of residents agreed that they would use any excuse to celebrate.

6. Copenhagen, Denmark

The new Inderhavnsbroen bridge is known locally as 'the kissing bridge' (Wikicommons)

Copenhagen came in second after Gothenburg, Sweden, for the value its inhabitants place on socializing. More specifically, those in Copenhagen enjoy entertaining friends at home (the city ranked first in this index).

The city also ranked second on the tolerance index, meaning they're accepting of various sexual orientations.

5. New York City, New York

While New York City was named the fifth most sociable city in the world, where it really shone was the overall category of social activity. On average, New Yorkers eat out and drink with friends more than any other of the surveyed cities in a given year.

4. Boston, Massachusetts

Boston came in third, behind Chicago and New York City, for overall social activity. The city ranked third in both the average number of times its residents socialize with friends in a year and the average number of times they eat out and drink with friends in a year.

3. Chicago, Illinois

Chicago beat out both Boston and New York to earn the title of the third most sociable city in the world. The city came second overall in the social activity category, meaning Chicagoans socialize with friends often, either by eating out, getting drinks, or using social media.

2. Stockholm, Sweden

Stockholm ranked second in the social milieu category, meaning that residents of the city enjoy partying, are social when they travel, trust their friends, and are tolerant in social situations. In fact, the city ranked first on the tolerance index.

1. Gothenburg, Sweden

Gothenburg's waterfront (Shutterstock)

Another Swedish city took the top ranking overall.

Gothenburg ranked number one in both the social values and social milieu categories. This means that the city's inhabitants value face-to-face interactions, they enjoy partying, trust their friends, are social when they travel, and are open and tolerant in social situations.

Read more: