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.
Related
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
How do you exclude streets from coming up when using the Google Places API? I want only cities and states to show if a user types in a location in the input field
I think you want to add types to your Place Autocomplete requests.
Concretely, types=(regions) will limit Autocomplete predictions to cities, states, and a few more. See Place Types in the API documentation for more details.
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.
I'm using Google Places API to get nearby places, but I've noticed that while I get the place names and addresses, the results don't include the Country.
Is there a way to get the country included in the results?
This is the call I'm using:
https://maps.googleapis.com/maps/api/place/nearbysearch/xml?location=<lat,lng>&radius=100&sensor=true&key=<api_key>
Thanks!
The Geocoding API is what you want.
Try
http://maps.googleapis.com/maps/api/geocode/json?address=Calgary,%20Alberta&sensor=false
it'll return fully formatted address info in several ways (split by administrative level, formatted as an address,etc.)
also the place Types blog in google api will help..link is here
I'm responsible for designing a homework assignment to teach a class of ~100 students about AJAX. They have a solid knowledge of CSS/xHTML, but most are new to Javascript. I don't want the assignment to require use of JQuery or any other framework.
I want them to build something with AJAX. The server side will be handled either by the course staff, or by using some external service. (Like Twitter, Google, or Facebook... what else?)
One idea I had was to ask students for an app with the following functionality:
list tweets by username, including date and "in reply to" info
find profile image by user
ability to click on "in reply to" info to see info by that user
list followers and friends by username
The point of this assignment isn't necessarily to build something new or useful, but to equip students with a solid understanding of AJAX so they can build their own apps in the future.
if you dont use a framework, you'll have to talk about going into half a dozen try catches to create the actual object in multiple browsers (or is that not a concern?). If not, I would go with the w3schools one.
I'd suggest a public API like the bing search API since it returns results in XML format.
For example, http://api.search.live.net/xml.aspx?Appid=...&query=chocolates&sources=web
to see an XML document for the query term "chocolates." You'll need to register at http://www.bing.com/developer to get an APPID but you can share it with your students.
Another possible web service is GeoNames: Geonames