When there is a boundary relation for that city area (like political boundaries) you can use its name for a query via overpass-api or overpass-turbo.
So first find out about any good boundary relation within the OSM data:
go to http://nominatim.openstreetmap.org and try to find a boundary relation for your city ... for example type "Buxtehude" in its search box there (Buxtehude is a small city in the north of Germany) ... see the results and its detail links.
With that background knowledge vidit http://overpass-turbo.eu and use its wizard modus: Try "shop=* in Buxtehude" there ... without ""
Thus you can limit any query via overpass-api or overpass-turbo (or even QuickOSM-Plugin in QGIS) to any city area as long as we have boundaries for that in the OSM data.
Please refer to the documentation of overpass-api and overpass turbo at wiki.osm.org
If you get stuck about a boundary is present or not, tell us the name of the city we can use for testing purposes.
Tell us here about success or failure in general.
A little more digging found me the answer. Executing e.g.
vars(result.get_way(4755884))
gives the internal structure of the way object:
{'_attribute_modifiers': {'changeset': int,
'timestamp': <function overpy.Element.__init__.<locals>.<lambda>>,
'uid': int,
'version': int,
'visible': <function overpy.Element.__init__.<locals>.<lambda>>},
'_node_ids': [26229733,
291529159,
246189513,
2682629060,
291529223,
3723657411,
3723657424,
2018716449,
291530424,
2018716450,
291530803,
26229737,
1741942073,
4100724928,
4100724934],
'_result': <overpy.Result at 0x221fc5b17f0>,
'attributes': {},
'center_lat': None,
'center_lon': None,
'id': 4755884,
'tags': {'bicycle': 'yes',
'highway': 'residential',
'maxspeed': '20 mph',
'name': 'Reedley Road',
'postal_code': 'BS9',
'sidewalk': 'both'}}
I can therefore access the list of raw node IDs using e.g. result.get_way(4755884)._node_ids
.
Best Answer
See our Overpass by Example guide on how to extract street names for an area: https://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_API_by_Example#List_of_streets
NB: It's the first hit if you search for "overpass street names" in a well known search engine.