Based on the documentation it would appear that there is no way to have the phone numbers for a google place to be returned with the Place Search data ?
Which means that if I do a Place Search request I then need to make 20 more "Place Details" requests to get the phone number for each search result.
To mean this seems like a a fundamental piece of information I would expect back from the
"Place Search" request ?
Am I missing something or or is there no way or getting the phone numbers returned based on a search request ?
Any help would be much appreciated.
Thanks in advance
This is correct, there is no way to get the phone number of a business without issuing a Place Details request.
This is in place to encourage compliance with Google Maps APIs Terms of Service - Section 10.2 Restrictions on the Types of Applications that You are Permitted to Build with the Maps API(s): (b) No Business, Residential, or Telephone Listings Services.
You should only need to issue a Places Details request if a user action indicates that they would like more information about a Place.
Related
I need to know what does mean timestamp_last_interaction in User Usage Reports (API Admin SDK) gmail parameter description. The documentation doesn't have too much information about it and i would like to know what exactly is counted to this parameter because my reports do not represent the what a think they should do.
After some testing and checking up. I can confirm you that everything you do counts towards this parameter.
Taking any action or even log in gmail would actually update this parameter.
I'm looking for a way to determine if a place_id and the Google Maps URL obtained by firing a details request for that place_id to the Google Places API Web Service is being redirected to another Google Maps result.
I thought this question about getting the redirected Photo URL would be relevant, but it appears to be behavior different than what I'm seeing.
Here goes:
The Good Listing
Place ID: ChIJF07Dwbbv3IARm-54MM1clQE represents a listing with the following NAP:
Full House Casino Events
17941 Sky Park Cir Suite B, Irvine, CA 92614, USA
(949) 439-5207
Its Maps ID is 114099401919098523. Visiting that URL on Google Maps returns me a listing with the same NAP as the API details request.
The Redirected Listing
Place ID: ChIJF07Dwbbv3IARv0ORjjGlaFg represents a listing with the following NAP:
Full House Casino Events
24752 Cutter, Laguna Niguel, CA 92677, USA
(949) 439-5207
Note that the name and phone are the same as the first place_id
NOTE: The API HTTP response returns a 200 (not a 30x) with the same ID as the one requested. So this rules out following a redirect or checking for a different ID in the reply.
Its Maps ID is 6370523305179431871. Visiting that URL on Google Maps redirects me to a listing with a different address as the details API request.
Moreover, it has been redirected to the first listing pointed out above.
From the consumer's perspective, this makes sense because the latter is likely a duplicate of the former, and has been merged to send user traffic in the browser to the correct location.
The Question
How would I determine this programmatically? I have stepping through the redirects one by one using curl. However, the IDs end up getting mangled into some encoded hex value that I don't understand how to parse yet.
If there isn't some feasible way to determine this other than checking the resulting listing in the browser, I might check with the Google Maps team to see what they suggest.
Thanks for any approach you might have to suggest, or clarity you can offer on the relationship among place_ids and Google Maps IDs.
UPDATE(2016-09-19): This issue is fixed in Places API now: a Details request for The Redirected Listing (ChIJF07Dwbbv3IARv0ORjjGlaFg) returns The Good Listing (ChIJF07Dwbbv3IARm-54MM1clQE)
Previously, redirected places would show up in the Places API with a flag:
permanently_closed: true
There is a feature request to Add redirecting Place or Maps ID in "Place Details" request that you may be interested in. If so, star it to receives updates.
If you're curl-downloading URLs from Google Maps (not the API) and relying on HTTP redirects... well, that's bound to change at any unpredictable time, I'd recommend very much against it.
I have an application using Bing Maps API to retrieve coordinates for a postal code and then I perform spatial queries based on the result. There are times where I get empty results, but when I wait a few minutes it succeeds. I added logic that retried a handful of times if there's a failure but that doesn't seem to be helping. Here's the empty result I get back:
{"authenticationResultCode":"ValidCredentials","brandLogoUri":"http://dev.virtualearth.net/Branding/logo_powered_by.png","copyright":"Copyright © 2014 Microsoft and its suppliers. All rights reserved. This API cannot be accessed and the content and any results may not be used, reproduced or transmitted in any manner without express written permission from Microsoft Corporation.","resourceSets":[{"estimatedTotal":0,"resources":[]}],"statusCode":200,"statusDescription":"OK","traceId":"7a6bfca3f89b4f94a4693a410da4feb7|CH10043840|02.00.107.2300|CH1SCH050102529"}
And here's the URL I'm calling:
http://dev.virtualearth.net/REST/v1/Locations?q=50613&o=json&key=MyApiKey
Is there a way I can retrieve further information based on the traceId? Or is this something that's just accepted when using Bing Maps API?
You should firstly check the number of requests you're doing in a specific time and put it in relation with the type of Bing Maps Key you're using. Basic keys are rate limited which means that if you exceed the allowed number of request in a specific duration, you will be blocked.
Bing Maps Trial and basic key and rate limitation information
Those types of key are rate limited for security and logicial reasons (on 24h period and with time between the request) and that's the reason why you're getting a blank response without any information regarding the fact that it failed to geocode.
See the Terms of Use regarding the limitations and other restrictions (load and stress tests as well as hammering are part of it): http://www.microsoft.com/maps/product/terms.html
So, in order to try to analyze where your problem comes from, you might:
Check the type of key you're using and how many calls you're making on a specific period
Check the header of the response, it should include a specific header value: X-MS-BM-WS-INFO set to 1 if you are rate limited
See the MSDN about error handling: http://msdn.microsoft.com/en-us/library/ff701703.aspx
If you're not in this case (if you have an enterprise account), reach the technical support so they can officialy get back to you and check the key.
I am trying to get bus stop details from the Google Places API. I have been able to get the actual bus stops but now I'd like to grab the details.
For example: This is the URL Google gives me from the response. https://maps.google.com/maps/place?cid=14960400563022267569
I'd like to get a JSON representation of this information (if its available). Appending output=json just returns an empty json document.
Does anyone know how to grab the info without putting it through a parser?
EDIT: So continuing to dig through the flow I got SOME information from this URL but still doesn't seem to show me the bus numbers or anything. http://maps.google.com/maps?cid=14960400563022267569&q=a&output=json
Currently, there seems to be no option in google apis to retrieve the public transit information the way you are seeing on google maps. Your best bet is to use google places api and to filter for bus_station to get details about the bus stations , but the information returned will be limited these result details . Another option is to use google directions api, where you can search for directions by keeping your bus station as the source and a suitable destination and the returned results will provide some transit details which include departure time, headways, etc.
I'm trying to use Google Places API for a business locator app, but am having trouble creating an exhaustive database of business.
1.The API call only returns 20 results back.
2.The "type" restriction (e.g. type=restaurant) does not pick up all businesses by type in a given zip. I could use "keyword" but not all restaurants have restaurant in their name, and not all spas have "spa" in their name.
3. Each call produces the same set of results from day to day, and with only 20 returns per call, how am I to get a more exhaustive database of businesses?
I can try to get around the above three constraints by looping through a very well degraded search of businesses: say by zip code, some list of keywords, category type. But I still won't get close to picking up the 50 million or so businesses in google places.
In fact, even when I make a call for restaurants and bars in my own neighborhood, I don't pick up popular places down the block from me.
How is the API usable for an app that locates places then?
Any suggestions on how to create a more exhaustive search?
Thanks,
Nad
I'm not able to answer your question regarding Google Places API.
But for your requirements ('business locator app', 'I don't pick up popular places down the block from me') I suggest you try Yelp Search API:
Yelp's API program enables you to access trusted Yelp information in real time, such as business listing info, overall business ratings and review counts, deals and recent review excerpts.
Yelp is a popular review website with a capable API and you may test the quality of database and the devoted user base they have at Yelp homepage.
Note:
They keep some data for themselves and do not return everything in response.
The (free) dev account has a limit of 100 calls per 24 hours.
I know I'm late but maybe it helps someone these days.
By default, each Nearby Search or Text Search returns up to 20
establishment results per query; however, each search can return as
many as 60 results, split across three pages.
You need to use the field nextPageToken that you will receive on the first search to get the next page.
https://developers.google.com/places/web-service/search
An issue in stack overflow says:
There is no way to get more than 60 results in Places API. Some people
tried to file a feature request in Google issue tracker, but Google
rejected it with the following comment Unfortunately Places API is not
in a position to return more than 60 results. Besides technical
reasons (latency, among others) returning more than 60 results would
make the API be more like a database or general-purpose search engine.
We'd rather improve search quality so that users don't need to go so
far down a long list of results.
google places api more than 60 results
I faced the same difficulties that you did and decided to use the Yelp API instead. It is free, very complete and returns up to 1000 results. You should however check the terms of service before doing anything. It does not provide the website of the business (only the Yelp website link).
https://www.yelp.com/developers/documentation/v3/business_search
Other options I investigated at that time:
Foursquare ventures. (It was very expensive, and only returned up to around 100 results)
Here places API
Factual Places (I don't think this one is an API)
Sygic Travel API (Specific for touristical spots)
Planet.osm (OpenStreetMap)