Answered by:
Google APIs using SQL

Question
-
Hi All,
I am getting some troubles with Google APIs and SQL together.
I have a text which represents Location in a city. (Lets say all these locations are residing in a table). Now I want to know all the nearby areas (Locations) which lies under a radius of 5 km. For this I have Google Places API. Using that I can find put nearby areas.
Now the problem arrives.
1. Google Places API does not give areas when <location> passed as a parameter in
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=18.566644000000000000,73.915406900000000000&radius=5000&types=location&sensor=false&key="Key Here"
so when I pass (lets say ATM) as types then I get all the nearby ATMs. in following format
<?xml version="1.0" encoding="UTF-8"?> -<PlaceSearchResponse> <status>OK</status> -<result> <name>ICICI Bank Ltd - VimanNagar</name> <vicinity>Panchshil Tech Park, Near Ganapathi Chowk, Pune</vicinity> <type>atm</type> <type>bank</type> <type>finance</type> <type>establishment</type> -<geometry> -<location> <lat>18.5666440</lat> <lng>73.9154070</lng> </location> </geometry> <icon>http://maps.gstatic.com/mapfiles/place_api/icons/generic_business-71.png</icon> <reference>CoQBegAAAJIFq0icxZBa31crVRFTVQUc3sr0SPKdHQwNZf525u3mcCDAAB5HyyEQ1ZA_3RXMUjsLQrqi44crhzzXwmM4XTqLKUVhfB9Z1UguRtwHv7rJpZXC9Z43QfBWPmzP6M_isZFd7AvLPA-qg9Pwnyvo9swgZQ_ALBHxhsMBn_6Q1ElcEhCXsg2QuaojnznYGg_x_dlDGhQK019_tGAb0fILFte6OhGklx5whQ</reference> <id>b9bca84d59aa55dc79abfa11cb798a2b569131f7</id> -<opening_hours> <open_now>true</open_now> </opening_hours> </result> </PlaceSearchResponse>
Now the area(location) field in the above XML is in the vicinity tag. I need that information to be stored somewhere in a table adjacent to the location which I passed as parameter.
2. I have many such areas, so manually I cant pass these parameters. I have to automate this.
3. Google have stringent policies about being a BOT. so when i query it more than 10 times in 5 seconds it blocks me. So my code should have a time factor also inside some kind of loop.
Please help me out in this.
Himanshu Sharma
Friday, July 19, 2013 6:03 AM
Answers
-
- Proposed as answer by Allen Li - MSFT Sunday, July 21, 2013 6:58 AM
- Marked as answer by Allen Li - MSFT Sunday, July 28, 2013 3:30 AM
Friday, July 19, 2013 6:42 AM -
- Proposed as answer by Allen Li - MSFT Sunday, July 21, 2013 6:59 AM
- Marked as answer by Allen Li - MSFT Sunday, July 28, 2013 3:30 AM
Friday, July 19, 2013 7:22 AM
All replies
-
- Proposed as answer by Allen Li - MSFT Sunday, July 21, 2013 6:58 AM
- Marked as answer by Allen Li - MSFT Sunday, July 28, 2013 3:30 AM
Friday, July 19, 2013 6:42 AM -
Hello Olaf,
I just needed something which can be done via SQL. (If there is any way to query that html link via SQL engine)
Himanshu Sharma
Friday, July 19, 2013 6:57 AM -
Powerview and Excel 2013 has the capabilities to read data from html pages, but I am not sure if it could be applied here.
Satheesh
Friday, July 19, 2013 7:04 AM -
- Proposed as answer by Allen Li - MSFT Sunday, July 21, 2013 6:59 AM
- Marked as answer by Allen Li - MSFT Sunday, July 28, 2013 3:30 AM
Friday, July 19, 2013 7:22 AM -
Satheesh,
This is wrong. Power View is a canvas for showing data that has been extracted or sourced already into Excel
You may be referring to Power Query or Power View.
Regards
Sign here
Thursday, November 28, 2013 3:06 PM