{"id":1046,"date":"2021-02-08T03:58:13","date_gmt":"2021-02-08T03:58:13","guid":{"rendered":"https:\/\/www.webharvy.com\/blog\/?p=1046"},"modified":"2021-04-26T13:38:18","modified_gmt":"2021-04-26T13:38:18","slug":"how-to-scrape-google-maps-location-coordinates-latitudelongitude","status":"publish","type":"post","link":"https:\/\/www.webharvy.com\/blog\/how-to-scrape-google-maps-location-coordinates-latitudelongitude\/","title":{"rendered":"How to Scrape Google Maps Location Coordinates?"},"content":{"rendered":"\n<p>This article explains how the <a href=\"https:\/\/www.webharvy.com\/tour71.html\">Keyword Scraping<\/a> feature of <a href=\"https:\/\/www.webharvy.com\/index.html\">WebHarvy <\/a>can be used to scrape geo location coordinates (latitude and longitude) of a list of addresses from <a href=\"https:\/\/www.google.com\/maps\" target=\"_blank\" rel=\"noreferrer noopener\">Google Maps<\/a>. <\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Scraping geo coordinates (latitude, longitude) of locations from Google Maps using WebHarvy\" width=\"1200\" height=\"675\" src=\"https:\/\/www.youtube.com\/embed\/zVTR2Tm6P1A?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>Given below is a sample list of addresses for which we will scrape geo location coordinates from <a href=\"https:\/\/www.google.com\/maps\" target=\"_blank\" rel=\"noreferrer noopener\">Google Maps<\/a> using <a href=\"https:\/\/www.webharvy.com\/index.html\">WebHarvy<\/a> as shown in the above video. Note that these addresses do not include special characters like comma, hyphen or semicolon. In case you wish to have commas or other special characters within address text, then each address should be enclosed within quotes. (Ex : &#8220;6657 PEDEN RD, FT WORTH, TX&#8221;) <\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>6657 PEDEN RD FT WORTH TX<br>17425 DALLAS PKWY DALLAS TX<br>12121 COIT RD DALLAS TX<br>9100 WATERFORD CENTRE BLVD AUSTIN TX<br>13223 CHAMPIONS CENTRE DR HOUSTON TX<br>1221 N WATSON RD ARLINGTON TX<br>5313 CARNABY ST IRVING TX<\/p><\/blockquote>\n\n\n\n<p>To scrape Google Maps location coordinates of these addresses, load the following URL within WebHarvy&#8217;s configuration browser.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>https:\/\/www.google.com\/maps\/place\/6657 PEDEN RD FT WORTH TX<\/p><\/blockquote>\n\n\n\n<p>Note that the first address (6657 PEDEN RD FT WORTH TX) in the list of addresses is used &#8216;as-it-is&#8217; in the above URL. Once this URL is loaded in WebHarvy&#8217;s browser view, <a href=\"https:\/\/www.webharvy.com\/tour.html\" target=\"_blank\" rel=\"noreferrer noopener\">Start Configuration<\/a>. Then,  <a href=\"https:\/\/www.webharvy.com\/tour41.html#EditStartURL\">edit the Start URL<\/a> of the configuration and paste the same URL which we loaded (https:\/\/www.google.com\/maps\/place\/6657 PEDEN RD FT WORTH TX). <\/p>\n\n\n\n<p>Now we can <a href=\"https:\/\/www.webharvy.com\/tour71.html#addkeywordslater\">add keywords to the configuration<\/a>. Keywords in this case are the list of addresses. It is important to note that the first keyword in the list which we add, should be same as the one used in the Start URL. Since we are selecting only a single row of data from each page, we can <a href=\"https:\/\/www.webharvy.com\/tour41.html#DisablePatterns\">disable pattern detection<\/a>.<\/p>\n\n\n\n<p>The latitude\/longitude values are selected from the entire page HTML using regular expressions. To get the entire page HTML, click anywhere on the page and then double click on the <a href=\"https:\/\/www.webharvy.com\/tour1.html#ScrapeHTML\">Capture HTML toolbar button<\/a> in the resulting Capture window displayed. <\/p>\n\n\n\n<p>The <a href=\"https:\/\/www.webharvy.com\/tour1.html#ScrapeByRegEx\">regular expression <\/a>strings used to get latitude and longitude values are given below.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>www\\.google\\.com%2Fmaps%2F[\\s\\S]?%2F%40([^%])<\/p><p>www\\.google\\.com%2Fmaps%2F[\\s\\S]?%2F%40[^%]%2C([^%]*)<\/p><\/blockquote>\n\n\n\n<p>If you are new to WebHarvy we recommended that you download and try using the free evaluation version available in our website. To get started please follow the link below.<\/p>\n\n\n\n<p><a href=\"https:\/\/www.webharvy.com\/articles\/getting-started.html\">Getting started with web scraping using WebHarvy<\/a><\/p>\n\n\n\n<p>In case you have any questions please feel free to <a href=\"https:\/\/www.webharvy.com\/support.html\">contact our technical support team<\/a>. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article explains how the Keyword Scraping feature of WebHarvy can be used to scrape geo location coordinates (latitude and longitude) of a list of addresses from Google Maps. Given below is a sample list of addresses for which we will scrape geo location coordinates from Google Maps using WebHarvy as shown in the above &#8230; <a title=\"How to Scrape Google Maps Location Coordinates?\" class=\"read-more\" href=\"https:\/\/www.webharvy.com\/blog\/how-to-scrape-google-maps-location-coordinates-latitudelongitude\/\" aria-label=\"Read more about How to Scrape Google Maps Location Coordinates?\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,5,8],"tags":[155],"class_list":["post-1046","post","type-post","status-publish","format-standard","hentry","category-use-case","category-howto","category-webharvy","tag-google-maps"],"_links":{"self":[{"href":"https:\/\/www.webharvy.com\/blog\/wp-json\/wp\/v2\/posts\/1046","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webharvy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webharvy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webharvy.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webharvy.com\/blog\/wp-json\/wp\/v2\/comments?post=1046"}],"version-history":[{"count":4,"href":"https:\/\/www.webharvy.com\/blog\/wp-json\/wp\/v2\/posts\/1046\/revisions"}],"predecessor-version":[{"id":1093,"href":"https:\/\/www.webharvy.com\/blog\/wp-json\/wp\/v2\/posts\/1046\/revisions\/1093"}],"wp:attachment":[{"href":"https:\/\/www.webharvy.com\/blog\/wp-json\/wp\/v2\/media?parent=1046"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webharvy.com\/blog\/wp-json\/wp\/v2\/categories?post=1046"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webharvy.com\/blog\/wp-json\/wp\/v2\/tags?post=1046"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}