Google Places API Reviews, changing the sorting order? - google-places-api

Well according to the docs https://developers.google.com/places/documentation/#PlaceDetails the Google Places API is now able to display 5 reviews from a specific location which is pretty awesome!
But these reviews are rolled out by "Most Helpful" which is the default order on a Google + Local page.
I think it would be a bit more helpful if these review where rolled out by latest so you can indicate when a review was last posted.
Is there any consideration in changing the reviews sorting order?
Or is there some way I can figure out when a new review gets posted via the API?

There is currently no way to figure out if a new review gets posted via the Places API. If you believe this or sorting of reviews would be useful feature you can submit a 'Places API - Feature Request' here.

The sorting method to use when returning reviews. Can be set to most_relevant (default) or newest.
For most_relevant (default), reviews are sorted by relevance; the service will bias the results to return reviews originally written in the preferred language.
For newest, reviews are sorted in chronological order; the preferred language does not affect the sort order.
Google recommends that you display how the reviews are being sorted to the end user.

Related

Is there a way to find all the relations that exists between two entities?

I need to populate an ontology in the domain of Music Artists. To get an understanding of the domain which I should populate, I need to find out,
1) All the possible objects related to the particular artist. (Song, Album, Movie etc.)
2) All the possible relations between this celebrity and the object. (Singer Object).
Is there any way to do this manually or through Google API?(I tried this manually by giving this on the google search bar. But it is a hard task to do it manually. Though if there is a way to speed this up, it would be sufficient at the moment.)
What you need is a way to query the web which will combine results from various websites and web pages and present a combined and coherent result to you based on your query. Currently this cannot be done for the web in general. However, the semantic web is an area of research that is trying to achieve exactly that.
Using semantic web technology it is possible to do such queries for parts of the web. DBpedia is a prominent semantic web project that aims to enable arbitrary queries across Wikipedia. DBPedia provides a live end-point that you can query using SPARQL. Referring to DBpedia will give you a brief overview of how this all fits together.
Accessing the live end-point you can run the following SPARQL-query that will give a list of musicians. Clicking on the links in the result page will provide you with more information on each musician.
SELECT ?subject
WHERE {
?subject a dbo:MusicalArtist .
}
Good luck!
Found a method to retrieve entities related to a particular object through google knowledge graph API.
Google Knowledge Graph API

Places API types

I am creating a travel website with 2 apps and am getting mixed results from the Places API.
My results include cities and countries which is fine, however, there are also local communities, city districts, US states and other not so relevant results available which I would rather have excluded. Is it feasible to do so?
Ideally, it would be of great help if there was a way to lookup the type of places that could be sourced from the API, for me to review and inform my developers which I would like to include.
Any help on this topic would be strongly appreciated!
Many thanks,
Thomas
At this point the best list of supported data types returned by our APIs is listed on Supported Place Types.

How can I get ESPN Developer to return more golfers?

I just created an account with ESPN Developer, and I'm trying to get a list of all the Professional Golfers. I made the following request:
http://api.espn.com/v1/sports/golf/athletes?&apikey=[mykey]
Unfortunately, the browser only shows a handful of names (which are in alphabetical order). How can I get the API request to return all the golfers?
According to my research, you should be seeing all of the Golfers that they have.
If you use http://api.espn.com/v1/sports/golf?apikey=KEY, you will get a list of "all organizing bodies" in the sport. You can (if you have the patience) go through that list, and check to see if they are listed in the data returned from your (correct) API URI, along with the members of each section.
You can also use http://api.espn.com/v1/sports/golf/pga/athletes?apikey=KEY to get a list of athletes in that organization. Be sure to replace "pga" if you are looking for something else.
I just now created a Developer account there and requested a key to assist you with your question, so I could be wrong. If I am I will certainly come back to better answer your question.
I am reading this post http://www.javacodegeeks.com/2013/06/parsing-espn-api-using-java-and-google-gson.html
The NBA request http://api.espn.com/v1//sports/basketball/nba/athletes?apikey=KEY returns only 50 athletes, you have to use the offset parameter to get more
http://api.espn.com/v1//sports/basketball/nba/athletes?apikey=KEY&offset=51
So in your case
http://api.espn.com/v1/sports/golf/athletes?&apikey=KEY&offset=51
I am still reading the post but now I see I can return more players and the first request only got to players last name ending with B so geeze to get all athletes the JSON response would be huge!
I can't find this on the ESPN docs, so I don't know how developers are supposed to know this, there may be a better way but at least now I know how to get all the players.

Google is indexing future dates on my codeigniter datepicker

If I do a google search for "harbour holidays 2 strand" then it returns my clients site www.padstow-self-catering.co.uk
The problem is that google has decided to index and future date which can be seen from the datapicker on the right sidebar. Nearly all searches for specific holiday properties has this issue and the future date is different for each.
I have no idea why this is happening?
The "2016" comes from the URL that's been indexed:
http://www.padstow-self-catering.co.uk/properties/map/46/2016/12
Presumably somewhere there's a page with that URL on, and Google indexed that.
Personally I'd probably make the date picker parameters URL parameters instead:
http://www.padstow-self-catering.co.uk/properties/map/46?year=2016&month=12
... or remove it entirely from your links. Either way, it's not that Google has "decided to index" pages for a future date - they're just pages.
(Note: I work for Google, but have nothing to do with web search. This answer should not be seen as being an "insider" post in any way, nor as representing the view of Google.)

How to write a Google Analytics filter to record site searches

I what to record all my website searches with google analytics but the problem is my search links look like this
**www.mywebsite.com/search/category/your+query+here**
From what i found out i must give GA the query parameter (mywebsite.com/search.php?q=your+query+here) but i have none (and don't want any).
Is there a way to rewrite the URL with a google analytics filter? If yes how.
Yes, you can create a custom filter that rewrites URL /search/<category>/<query> to ?q=<query>&c=<category>.
Go to Analytics Settings › Filter Manager, and click Add Filter. Choose Custom Filter in the Filter Type drop-down list, select Search and Replace radio button, and then set two Request URI fields with the corresponding values. For further details, see ’How do I create a filter?’ page in Google Analytics Help Center.
Keep in mind! Since past visitor data cannot be reprocessed, always keep a ’raw’ profile that you do not apply filters against. For further details, see chapter ’Best Practices for Filters & Profiles’ in presentation ’Filters in Google Analytics’.
Site Search is processed BEFORE Filters are applied.
I went through a week of testing to realize this. Yes, the Filter logic is correct, but as of Nov 1, 2009 this will not work with Site Search.
We accomplished this by appeding the ?search= parameter to the page URI in the GA script. Then we strip search params in the Profile Settings and we get the pure URI's in the content section as well as the Searches tracked in Site Search.
I know this is old, but to expand on the prev accepted answer, use a 'virtual url' in the _trackPageview call, so for www.mywebsite.com/search/category/your+query+here have
gat._trackPageview( "/search/content/your+query+here?query=your+query+here&cat=category" )
This means that URLs won't be changed, so everything else works (as noted in the previous answer) - if you really want to you could remove the search params, but unless you're running into a URL limit I'd probably prefer to keep them present so they can be seen in the content reports.

Resources