Back to articles
How to Scrape Maps and Location Data (Google, OpenStreetMap, Mapbox)

How to Scrape Maps and Location Data (Google, OpenStreetMap, Mapbox)

via Dev.to WebdevАлексей Спинов

Location data powers logistics, real estate, and local business tools. OpenStreetMap (Free, Open) Overpass API — completely free, no key: async function searchOSM ( query , bbox ) { const overpass = `https://overpass-api.de/api/interpreter?data=[out:json];node["name"~" ${ query } "]( ${ bbox } );out;` ; const res = await fetch ( overpass ); return res . json (); } Nominatim (Geocoding, Free) https://nominatim.openstreetmap.org/search?q=coffee+shop+new+york&format=json Google Maps Places API ($200/mo credit) async function nearbySearch ( lat , lng , type , apiKey ) { const url = `https://maps.googleapis.com/maps/api/place/nearbysearch/json?location= ${ lat } , ${ lng } &radius=1000&type= ${ type } &key= ${ apiKey } ` ; return fetch ( url ). then ( r => r . json ()); } Mapbox (Free Tier) https://api.mapbox.com/geocoding/v5/mapbox.places/coffee.json?access_token=TOKEN Data Available Business name and address Coordinates (lat/lng) Category and type Opening hours Ratings and reviews Resourc

Continue reading on Dev.to Webdev

Opens in a new tab

Read Full Article
6 views

Related Articles