Is it necessary to give the generation number in GeoCoder API? Will it take the latest generation number automatically? Even though I did not give the generation number, I am getting the output correctly. So, is the API automatically assuming the latest gen number?
The Geocoder API documentation (here) on the subject does sort of state that not using the gen={n} param will result in using the latest generation of the API as stated here:
If your application requires response output produced by an earlier
generation of the Geocoder API, include the appropriate generation
number in the request by including the request parameter gen.
But I also see how this can be confusing. In the API's list of params, that param does not have a default, but it does have a default in the linked documentation above as "gen=0 default behavior", but what is that exactly?
Various Geocoder API examples also exclude the gen param as potential evidence it is not needed for anything other than backwards compatibility.
Related
I am just getting started and thought I might see if anyone knew a good place to start...
I want to do a filtered list of Here Places in a mobile app. Every time I think I've found the right path, like Here Places, it appears deprecated.
Where is the right place to start?
You can check GS7 services in Here Here Maps.
Please find below details for your use-case scenario.
Services Overview
Discover provides users the ability to find a known place or address (partial or complete), as well as discover an unknown place. The latter requires information to help the end-user make a decision whether or not to visit. The expectation is that multiple items may be returned and the end-user will select the most appropriate.
Autosuggest provides term and query suggestions as the end-user types. Spell correction is included.
Geocode returns the geocoordinates for a single requested address. (NOTE: If the query is ambiguous, the API may return multiple items.)
Autocomplete provides completion of the entered keystrokes to the valid addresses. No spell correction is included.
Browse enables end-users to slice and dice HERE Map Content through various filters.
Lookup by ID finds one result based on its unique location ID.
Reverse Geocode returns the nearest address to known geo-coordinates.
Endpoint URLs
The following are the current endpoint URLs for submitting API requests:
autosuggest - https://autosuggest.search.hereapi.com/v1/autosuggest
search - https://discover.search.hereapi.com/v1/discover
geocode - https://geocode.search.hereapi.com/v1/geocode
autocomplete - https://autocomplete.search.hereapi.com/v1/autocomplete
browse - https://browse.search.hereapi.com/v1/browse
lookup by ID - https://lookup.search.hereapi.com/v1/lookup
revgeocode - https://revgeocode.search.hereapi.com/v1/revgeocode
Please check the following link for more information.
If you want to start with a mobile app, I would recommend the HERE SDK for Flutter. There is a good staring point to search for HERE places.
Even better, there is also a free app with all the source code you need. It's open source, so you can use it for your own projects. Just try it out and see if it gives you what you need.
Searching for places is not requiring much code:
_searchEngine.searchByText(query, searchOptions, (SearchError? searchError, List<Place>? list) async {
if (searchError != null) {
return;
}
// If error is null, list is guaranteed to be not empty.
for (Place searchResult in list) {
...
}
});
This code is written in Dart, so you can compile and run it on iOS and Android devices.
When using the Google Translate API, it just returns one translation for a given word. For example, when I let it translate the English word "hide" to Italian, it just responds with "nascondere".
However, Google Translate on the web offers much more: they don't just show one translation (or list of possible translations), but also the frequency as well as the precise meaning of a specific translation:
I'd like to get these results via an API.
Is there a public API that offers the same results?
Of course, I could just use the endpoint /translate_a/single that is used by the Google Translate website. But this endpoint does not include an API key, so if I send too many requests, they will most likely block me.
Also, the endpoint /translate_a/single returns many fields of which I do not know the precise meaning, so its usage would most likely involve some reverse engineering.
I want to know if there is any api that can allow me to get the number of reviews from an url.
I know that google offers the possibility to get this number by using the placeid, but the only information I have is the url of the website of a company.
Any ideas please?
Maybe, but probably not.
Places API Text Search seems to be able to find places by their URL:
https://maps.googleapis.com/maps/api/place/textsearch/json?key=YOURKEY&query=http://www.starbucks.com/store/1014527/us/303-congress-street/303-congress-street-boston-ma-02210
However, this is not a documented feature of the API and I do not think this can be relied upon, so I'd recommend filing a feature request, to make this a supported, reliable feature.
As for the amount of reviews, you may be interested in:
Issue 3484: Add # of reviews to the Place Details Results
I've written an API like this for Reviewsmaker, but I target specific business names not URLs. See this example (I activated a key for this purpose for now):
http://reviewsmaker.com/api/google/?business=life%20made%20a%20little%20easier&api_key=4a2819f3-2874-4eee-9c46-baa7fa17971c
Or, try yourself with any business name:
http://reviewsmaker.com/api/google/?business=Toys R Us&api_key=4a2819f3-2874-4eee-9c46-baa7fa17971c
The following call would return a JSON object which shows:
{
"results":{
"business_name":"Life Made A Little Easier",
"business_address":"1702 Sheepshead Bay Rd, Brooklyn, NY 11235, USA",
"place_id":"ChIJ_xjIR2REwokRH2qEigdFCvs",
"review_count":38
},
"api":{
"author":"Ilan Patao",
"home":"www.reviewsmaker.com"
}
}
Pinging this EP using a Chronjob for example once every hour or two and return the review_count can pretty much build your own review monitoring app;
You can probably do what you're looking for if you query the Places API Text Search or the CSE (Custom Search Engine) API to lookup the URL, return back the matching name of the business associated with this URL and calling an endpoint like this one to return back the associated review count.
You can probably code this in py or PHP. Not sure how familiar you are with data parsing, but I was able to build my API based on Google's CSE API. CSE provides metadata in its results which contain the total reviews, so if you create a CSE engine and use the CSE API looking for business schemas, review schemas, etc; you can return back items and within the PageMap node there are objects with data that you need very little tweaking to do (such as string replacing, trimming) which will return back the values you're looking for.
Hope my answer helped, at least to lead you in the right direction :)
I am working on a school project in R where I am attempting to map where the most popular youtube videos are posted around the world. I am able to get the data for the 50 most popular videos, but am having trouble understanding how to use pageToken.
The current get request I am using is with the following:
https://www.googleapis.com/youtube/v3/videospart=snippet%2CrecordingDetails&chart=mostPopular&maxResults=50&key={api_key}
Is it possible to retrieve more than 50 results using "pageToken" (I am unfamiliar with how this works).
Any help would be appreciated thanks!
Videos: list
pageToken string The pageToken parameter identifies a specific
page in the result set that should be returned. In an API response,
the nextPageToken and prevPageToken properties identify other pages
that could be retrieved.
Note: This parameter is supported for use in conjunction with the
myRating parameter, but it is not supported for use in conjunction
with the id parameter.
So when you get the results from the first request you should have an option called page token if you send that to the next request
&pageToken=api_pageToken
it should give you the next bunch of rows.
Note: I am not an R programmer so I cant help with the code for a loop over the results to find out if there are page tokens or not.
I am building an internal reporting tool that I want to update with Googles pagerank once per week.
The list of keywords would be predefined at this point.
any ideas?
They do have an Adwords API that may get you closer to what you are looking to do.
API - http://code.google.com/apis/adwords/docs/
Specifically the TrafficEstimatorService allows you to specify keyword parameters and estimate what traffic you could receive.