Knowledge graph API returning different results than site - api

When I Google for something and click on a heading from the Knowledge Graph, Google displays a list of the results just below the search bar:
Screenshot here
I typed in the same thing in my Knowledge Graph API:
https://kgsearch.googleapis.com/v1/entities:search?query=apple%20products&key=[MY_KEY]&indent=True&limit=100
and the results are not the same. Short of scraping, is there a way of obtaining the exact list shown within the results via a Google API? It doesn't seem to be Knowledge Graph, or at least the queries are not the same.

Short of scraping, is there a way of obtaining the exact list shown
within the results via a Google API? It doesn't seem to be Knowledge
Graph
Apparently not, you are using the correct API but unfortunately that is how the API works—it usually gives you a different result than if you do a simple Google search.
Why this is the case—I don't know. I decided scrape google instead.

The Knowledge Graph API doesn't have access to the same data sources as a simple Google search. You can read about here if interested (https://web.archive.org/web/20130329151128/http://zecblog.com/2012/09/16/the-short-life-of-the-open-knowledge-graph/).
But yes in short, you'll have to do your own scraping if you want the same information, although it's difficult because Google purposely obfuscates the HTML tags.

Related

fetching Ads using google custom search API

Is it possible to fetch ads is search results using the google custom search API ?
Need this to do a simple experiment. Search something and to see if any ad appears in the results.
Is it possible to do this ?
You probably want to screen scrap the search result window. Use some tool like phantomjs and inspect the results.
You could open one Google AdWords account and there you can make sample queries and experiments and whatever you want.
Google are not really a big fan of the experiments on their front-end, on Google AdSense, on Google CSE, CSA, etc. You could try, but you might get a wrong picture - there are some protection algorithms on the front-end.

Google Adwords Keyword Tool API to automatically extract data onto a website

Im looking to use Google Adwords Keyword tool data on a website. Ive been looking around in the API and I cant find much to match what I need. I noticed a lot of keyword research tool websites use google as their main source for their information. How would I go about doing this and extracting the data and have it run on a website automatically so it wouldnt need to be updated manually each month?
you can use the Traffic Estimator service in the AdWords API:
https://developers.google.com/adwords/api/docs/reference/v201409/TrafficEstimatorService
Be warned that this is notoriously inaccurate (which is odd given that you would think Google had its own data to call upon!)
I use the TargetingIdea service in the AdWords API to generate lists of keywords to use for building AdWords campaigns. (https://developers.google.com/adwords/api/docs/reference/v201409/TargetingIdeaService.TargetingIdea)
First off you need an API key - they're not that easy to get and your app needs to offer a whole lot of features to meet the required minimum functionality - take a look here https://developers.google.com/adwords/api/docs/requirements
Once you've jumped over that hurdle you get the data from Google by sending a request to the service. That request includes some targeting criteria like location and language and also a "seed" keyword. You can also specify if you want closely related results or broadly related results.
For example if you sold tractors you'd put 'tractors' in as a seed keyword and then the API would return either closely related terms like 'tractors for sale', 'used tractor spares' etc or more broadly related terms like 'agricultural machinery'.

What is the best way to get an image URL from a certain query?

I have a book recommendation project for school, and I want to add a picture for each book. I was thinking I could use a search engine API to return the first result, but I'm having trouble with them:
The Google .NET Api seems to be unsupported
The Bing API
The Flickr Api is well documented and it actually works, but the images on there aren't what I'm looking for
Have you tried http://jpg.to ?
[searchterm].jpg.to
i.e.
http://programmingfordummies.jpg.to/
http://clockworkorange.jpg.to/
http://fantasticmrfox.jpg.to/

Build a search-based-app using an API from a major search engine: google, bing, yahoo - who offers search API?

I need to provide search functionality as the cornerstone of my app (basically I think I can make a better interface than whats is offered by Google, bing, yahoo - bold claim I know). Therefore I will not build an entire search engine from scratch, I will rather use an API provider by a major search engine and simply modify the interface that present the results to my visitors. I am a Google fanboi and I initially tried to use Google Search AJAX API. However, I was very disappointed since I can barely change anything at all.
Specifically;
I need an API that will let me pull programmatically the results from a major search engine and let me output them with the style and goodies that I want.
I am not looking to alter the order in which the search results are presented to the user by inserting crap in between the good results (this is against my philosophy). But I would like to wrap massive php/javascript around each search results so that I can completely control how each result is graphically rendered.
I heard of the BING API 2.0, would that be more flexible than Google AJAX API? Could anyone provide output if any of the current search providers are offering API for this purpose right now?
After careful investigation it appears to me that the Bing 2.0 API is the most flexible and robust search API currently on the market.
The Bing API does require you to put their ads next to the results. You can place your own ads with the Yahoo API. The Yahoo API uses the same search technology (same results) and can be used starting from $0,40 per 1000 queries. The lowest, bulk price of the Google API is $4,00 per 1000 queries. Google's relevance is easily ten times higher for the somewhat more advanced queries.
And also Bing version 2 search API is free!
Whereas, Yahoo BOSS V2 has pricing and so Google does custom search API.

Google search results API usage?

My question is regarding the google AJAX search api. I have been trying to figure this out by exploring their site with no luck. How can I use this API on my site but have the results only be the google results from within my site (i.e. only shows the site:mydomain.com results and NOT the results from a standard google.com search)? Is this even allowed per their terms of usage? Thanks.
You can make a Google custom search and tie it to that.