Questions tagged [google-custom-search]

for questions related to implementing Google Custom Search on a web site, or using the Google Custom Search APIs.

Custom Search helps users find the right page by showing them a snippet—a small sample of content that gives search users an idea of what's in the webpage. To learn more about snippets, see the Webmaster Central blog post on the anatomy of a search result. If you do not like the standard snippets created by the Custom Search algorithm, you can create your own snippets. You can showcase key information—such as image thumbnails, summaries, dates, authorship, ratings, and prices—directly in your snippets. Having the most relevant information in your search results makes the webpages in your site more compelling to your users. The following figures demonstrate various ways you can customize the snippets in your search results.

Custom Search snippets

Custom Search is a fast way to generate a search function, which can be restricted to one or more websites if you choose. Both javascript and *CSS** are generated automatically. Either the graphical Control Panel tool or an XML file can be used to customize the search or it's results. It can also be integrated with Google AdSense to earn money when users search other websites.

XML look and feel documentation

975 questions
7
votes
3 answers

How to use Google Custom Search on https to avoid non secure content prompt?

Is there a way to get the script for search results from an HTTPS site instead of http://www.google.com/afsonline/show_afs_search.js I am using the custom google business search on a HTTPS site. When search is submitted web browser shows…
Dominik Szopa
  • 1,769
  • 1
  • 13
  • 16
7
votes
1 answer

Force verbatim mode in Google Custom Search

Is it possible to force Google Custom Search to use verbatim mode be default? For the purpose I am using it, verbatim mode will produce the most relevant results but users may not know to put their search in quotes. I have an idea I should be able…
Will
  • 113
  • 5
7
votes
2 answers

Is there a working sample of the Google custom search rest API?

I need to create a screen which automates Google search. I know JavaScript and I'm trying to get GSE works. I have a search engine and an API key. The problem is Google's documentation is cyclic i.e. pages point to each other. There is no working…
Aniruddh Joshi
  • 1,545
  • 3
  • 11
  • 17
7
votes
1 answer

Allow only Google CSE and disallow Google standard search in ROBOTS.txt

I have a site that I am using a Google Custom Search Engine on. I want Google CSE to crawl my site but I want it to stay out of the results of a regular Google search. I put this in my robots.txt file hoping that google CSE bots would ignore it…
Bender
  • 351
  • 2
  • 3
  • 13
6
votes
1 answer

Java SSLException: hostname in certificate didn't match for www.googleapis.com

Environment: Mac OS X Lion & Linux Debian squeeze/sid, JDK 1.7.0 & JDK 1.6.0_27 Error: javax.net.ssl.SSLException: hostname in certificate didn't match: != <*.googleapis.com> OR OR…
Jagan Veeraraghavan
  • 311
  • 2
  • 4
  • 13
6
votes
3 answers

Use an external CSS stylesheet to customise the appearance of the Google CSE

I have created a search engine for my website using Google Webmaster Tools. Now I'd like to customise the format of results given by the CSE. Google offers me to download the CSS file in whole, but when I attach it to my PHP document inside the head…
Luka
  • 1,670
  • 3
  • 19
  • 29
6
votes
1 answer

Google Custom Search refinement redirect

So I'm using Google Custom Search (Google CSE) and I'm trying to use the refinement functionality to redirect search queries to Google Scholar. Basically I'm following exactly the documentation found here. However it turns out that, despite there…
Thoth
  • 863
  • 4
  • 24
6
votes
3 answers

How to get more than 100 results from Google Custom Search API

I am trying to use Google Custom Search API for research purposes in Java. As a result I'm gonna need a big result set for each query. However it seems that I'm limited with first 100 results which is much less than what I need. I use the list…
6
votes
1 answer

Date range search using Google Custom Search API

I am using the Google Custom Search API to search for images. My implementation is using Java, and this is how I build my search string: URL url = new URL("https://ajax.googleapis.com/ajax/services/search/images?" +…
Amr
  • 2,190
  • 2
  • 12
  • 25
6
votes
1 answer

How do I get Google search results from urlfetch in google apps script

I have been trying the following code var response = UrlFetchApp.fetch("https://www.google.com/#q=this+is+a+test"); var contentText = response.getContentText(); Logger.log(contentText); var…
Kevrone
  • 530
  • 1
  • 7
  • 21
6
votes
6 answers

How can I set a custom width on my Google search iframe?

I am trying to use google search for my site: http://www.houseofhawkins.com/search.php It is not playing nice with some screen resolutions. Here is the code given from google: