Using Google Search "Did you mean?" for Books API - google-search-api

I'm currently building a book search application using the Google Books API. I am sending the search term to Google Books API via a query parameter string in URL.
Let's say I am searching for the book The Game of Chess by Harry Golombek.
If I submit to the API: "the game of chess h goiombek" with the name spelled wrong, the search results will not include the book that I am after.
However if I go to book search on Google and use the same search term, it will suggest "Did you mean: the game of chess h golombek". Only after clicking this will the correct book appear.
So how can I use Google's search engine to autocorrect my search terms? There are many resources on how to build you own did-you-mean functionality, however I want to use Google's.
Is there a way to do this?
Thank you!

Well i guess tihs is what you are looking for-
Autocomplete

Related

Is there an API to get results similar to Google's "people also search for"?

I'm looking for an API that would give similar results to the Google's "people also search for" feature. So that, for instance, when I search for Stanley Kubrik, I see all the other film directors that people search for.
I know about the Freebase API but it simply provides information about the search item, not what other search items it may be related to.
There is also a TargetingIdeaSelector tool in Google AdWords API that shows related keywords, but that doesn't really range the results semantically.
Finally, there's a very simple Bing API that shows related searches (also here), but, again, it does not range information semantically.
Do you know of any API or maybe if there is something like that in Google's APIs that would show me related searches ranged semantically?
Google used to offer such API but it was decapricated a few years back. I am unsure why this was the case but my guess is because it housed no real benefit for them and likely cost a lot to maintain. most major search engines tend to not have search API's in my experience.
You could however try an make your own using a PHP and DOM Parser to parse the results from somewhere like google and export the data out as JSON.
available for download here http://simplehtmldom.sourceforge.net
This should pull out all the links from Google which you can then format out. You can parse all data and can target objects see the documentation for more
$search = $_GET['search'];
> $google_search = file_get_html('https://www.google.co.uk/?gws_rd=ssl#q=' . $search);
>
> foreach($google_search->find('a') as $item) {
> echo $item->href . '<br>';
> }
Hope that helps
The results that Google shows is based on massive amount of data that i guess built on "what X who searched for Y also searched for", "what other people similar to X who also searched for Y searched for" and so on. In addition maybe there is some reliance on semantic information coming from Freebase.
On an initiative to understand what kind of properties Google shows in their infoboxes, i.e. Why when we search for France we get a card with map, flag, capital, population ... etc. amongst the hundreds of properties relate to France i created a "Knowledge Base Extractor " that is able to parse the Google infobox and expose the data as RDF using the Fresnel Vocabulary.
The Algorithm implemented is the following:
Query DBpedia for all concepts (types) for which there is at least one instance that has a link to a Freebase ID
For each of these concepts pick (n) instances randomly
For each instance, issue a Google Search query:
if an infobox is available -> scrap the infobox to extract the properties
if no infoxbox is available, check if Google suggests "do you mean ... ?" and if so, traverse the link and look for an infobox
if no infobox or correction is available, disambiguate the concept (type) used in the search query and check if an infobox is returned
if Google suggests disambiguation in an infobox parse all the links in it -> it is best to find which suggestion maps to the current data-type we are using -> check the Freebase - DBpedia mappings
Cluster properties for each concept
I also capture that "people searched for" section, but you might also want to tweak it a bit more.
Also note that you might want to check the CSS selectors for the infobox as Google changes them often (maybe auto-generated). This is done in the options.json
"knowledgeBox" : "#kno-result",
"knowledgeBox_disambiguate" : ".kp-blk",
"property" : "._Nl",
"property_value" : ".kno-fv",
"label" : ".kno-ecr-pt",
"description" : ".kno-rdesc",
"type" : "._kx",
"images" : ".bicc",
"special_property" : ".kno-sh",
"special_property_value" : "._Zh",
"special_property_value_link" : "a._dt"

google finance api alternative for monitoring/modifying portfolio?

I used to use google finance to create portfolios/change them and then display them on my site but since its being removed I'm wondering if there's any good free alternatives?
Basically I have a program that creates different portfolios based on different factors(20 right now), so each of the 20 links on my site direct people to a page that displays the portfolios. I am looking for something that I can use to automatically update the portfolios.
If it helps, my site is basically a free tutorial site that helps people learn how to manage their own portfolios. There's different lessons and then using market data & news(which I already get) I automatically generate a sample portfolio to show them how everything comes together. I liked google finance because they could see all of google's data but they could also click around and dig deeper if they want.
Is there anything I can use to get this result?
I'm not sure I understand exactly what you want, but it sounds like #DirkEddelbuettel's BeanCounter will do what you need.
Or, if you're just looking for quotes see http://www.gummy-stuff.org/Yahoo-data.htm and http://developer.yahoo.com/yql/

Getting Website Category Against Keywords Using Google Search API

As the question suggest, does the Google Custom Search API have function to return category (music, entertainment, news, gaming, etc) based on input keywords?
You can use Adwords Keyword Planner tool or display plannertool for getting related ideas of keywords.

Foursquare places

We would like to be able to pull out certain places from foursquare an categorize them on our website along with comments from foursquare users. I have the following questions:
1- Can we pull out places and categorize them the way we want on our website? e.g: restaurants/bar/lounge/club/landmarks/others.
2- can we pull out as well phone numbers (when available) and addresses (longitude-lattitude) of places ?
3- Does foursquare have any general descriptive summaries of each place?
Thanks for the help.
Chris
Foursquare has an API, more information can be found at this link
To answer your questions:
Yes, check out the Venues Platform in 4sq API, specifically, the search. When you query the API, as part of the result set for each venue, you get a category
If available, you will get them back under the 'contact' field, check out the response venue object from the search function
Yes, description field, you will need to make an API request to get the complete venue object.
Edit: one last thing, attribute and play nice :)
From my experience, you do not get a lot of venues with 'contact' and 'description' information. But foursquare is not very popular where I test my application, so it might be bad experience - experiment with it yourself.
FourSquare has a great category tree that you can use for categorizing restaurants
http://aboutfoursquare.com/foursquare-categories/
Actually, I'm using this tree in my website:
Dishes Map

How can I track incoming search keywords

Does anyone know how I could track what search terms people are using to arrive at my site. For instance, someone searchs google for 'giant inflatable house' and clicks through to my site. I want to be able to capture those keywords and which search engine they came from.
You must parse the referer. For exemple a google search query will contains: http://www.google.be/search?q=oostende+taxi&ie=UTF-8&oe=UTF-8&hl=en&client=safari
It's a real life query, yes I'm in Oostebde right now :)
See the query string. You can determine pretty easily what I was looking for.
Not all search engines are seo friendly, must major players are.
How to get the referer ? It depends on the script language you use.
You should use a tool like Google analytics.
Besides the Google Analytics, Google Webmaster Tools is also very useful. It can report a detail analysis of the search queries' impressions, clicks, CTR, position etc.