I don't didn't know a way to get this data straight away as a file with just the names. But [here's an then @mnd corrected [my example][1] on how to get all the named roads within a bounding box. Check the several output formats for one that fits your purpose to quickly create the list of names If you need. GeoJSON is nice with QGIS. There you'll run [his variant][2], you get a nice attribute table you could export. The Level0 version clean CSV file straight away. Only thing left to do is also pretty simple. Pasted in a spreadsheet, you could just sort the rows to get the name data.
remove duplicates.
The query was generated with the wizard you see at the top of the screen. I only wrote: highway=* and name=* . For buildings, you would just need to change highway to building.
[1]: http://overpass-turbo.eu/s/de1http://overpass-turbo.eu/s/de1
[2]: http://overpass-turbo.eu/s/de2