fetching Ads using google custom search API - google-custom-search

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.

Related

Do ads display by default when using Custom Search JSON/Atom API?

This is probably a very easy answer, but Google's documentation is not helpful in detailing what to expect with ads.
I am updating a site from the old paid GSS (since it will soon be phased out), and transitioning them to Google CSE. If we use the JSON/Atom API, will ads be displayed? Google is insistent on telling you that CSE is free because they display ads, but it's not clear if ads show up when using/paying for search queries through the JSON API.
Thanks!
In case anyone is trying to find the answer to this in the future, the answer is no; ads do not display by default when results are pulled using the JSON API.
This is pretty much what I expected since the ads themselves would have to be pulled from JSON, and we're not pulling in any ads. This means that sites that need the CSE but don't want Ads can get around it by implementing their search with the API. You just have to keep the query limit in mind and pay if you expect more than 100/day.
Alternatively, if you qualify as a non-profit, you can follow the prompts in the CSE control panel to register as such and implement the CSE with the provided script as usual without any ads or branding.

Knowledge graph API returning different results than site

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.

Can I “reuse” Google search results in my application?

I would like to understand if and how it is possible to achieve the following:
Create an app that sends search requests to Google (search requests
inputted by a user!)
Fetch the search results present in a different
format/graphics/layout the search results to the user.
Is that possible or Google would prevent me from doing such a thing? (via a
CAPTCHA for example)
If it is possible what kind of instrument would I need to use to capture (parse?) the search results???
My application would be developed for Android.
Screen-scraping the search results from the Google search site is a violation of their terms of service. I don't think they would use CAPTCHA to prevent you from doing so, but you might get a letter from their lawyers.
However, you could use the Google Custom Search API which allows you to search Google and customize layout of the results. However, you need to acquire a developer key and also follow their terms of service.
Also, Android has a search component built into it that you can probably use. See http://developer.android.com/guide/topics/search/index.html.

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.