Google search results API usage? - api

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.

Related

How to get same Localized results from Google CSE Json API

i am using the Google CSE Json API in order to receive results on generic queries from Google.
I have configured the Google Engine to return results from all web sites.
i though that this setting would make me use Google as if i was using it from the Google web site via the regular search engine.
BUT - i don't get same results that i would have expected to get from the site. i have major differences and i was wondering why.
From the past reading that i have made, i know that the API uses a certain server(s) around UK, making the results not the same due to the locale settings.
i have read the documentation on the CSE site and saw that there are 2 parameters that i thought would have improved the state:
googlehost - specifying the domain to use. this parameter is deprecated according to the documentation, hence i used the second parameter
gl - specify a country code for the search
both parameters didn't affect my results at all.
i am struggling with this for quite a long time and would appreciate a proper solution for it.
all i want is to have a CSE that acts the same as the google website. Running a search here and there should not differ in the returned results.
your help is highly appreciated.
Regards,
attiass

Is google custom search api gets results as similar to google assistant?

I have question regarding Google Custom Search API, is that works similar such as providing results as results provided from Google Assistant ?
our requirement is get result for user query and result should be content rather than web URL's/ links which Google Custom Search API is resulting.
Can you please suggest whether Google Custom Search API will work in getting results such as getting results from Google assistant ?
we have seen "This API brings to you the same Machine Learning technology that both powers Google’s ability to find specific answers to user questions in Google search and is the language understanding system behind the Google Assistant."
Do we get any code samples / API to utilize above system build which is used by the Google Assistant ?

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.

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.

Live Google search results in my website - can it be done?

I'm playing around with ideas for my dissertation.
Is it possible to get live search results from Google in my own webpage?
I found this example of a live search (similar to Twitters) but it uses it's own database, has Google got an API that I can access to pull through search results in a similar manner?
Example: http://demos.9lessons.info/instantsearch.php
Please refer to custom search JSON api. You would need Search engine ID and API key which can be obtained from Google Cloud Console.