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

983 questions
7
votes
1 answer

Inconsistent search results using Google's Custom Search JSON API

We are using Google's Custom Search JSON API for higher-education research, where we essentially are parsing through a large amount of URLs to find information on various organizations' responses to COVID-19. We are using Google's API to find top…
nxl10
  • 113
  • 5
7
votes
2 answers

How to embed Google Custom Search in React App?

I need to embed a JS widget in a React app. Is there a way to do it? The JS widget is Google Custom Search: (function() { var cx = '111:xxx'; var gcse = document.createElement('script'); gcse.type = 'text/javascript'; …
markkazanski
  • 439
  • 7
  • 20
7
votes
1 answer

Reserved words in Google Custom Search API

I am working with the Google Search API, and I am running into some trouble. This request (in Python, using the requests library) works fine res = requests.get("https://www.googleapis.com/customsearch/v1", params={ "cx": , "key":…
user4052054
  • 395
  • 1
  • 6
  • 22
7
votes
1 answer

how to get google custom search result in json array

I want to get google search results as json arrays in google latest custom search. How to implement the code. For Example : { "responseData": {` ` "results": [ { ` ` "GsearchResultClass ": "GwebSearch", …
user5245988
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,909
  • 1
  • 15
  • 16
7
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…
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
  • 117
  • 6
7
votes
1 answer

How to do a Google Image Search in an android app

I'm developing an Android app that will do a Google Image Search and return the images to the user in a list. I've looked around on StackOverflow and have run into some problems. First off, I'm a total newbie programmer with only 4 months' worth of…
7
votes
1 answer

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,705
  • 3
  • 12
  • 18
7
votes
3 answers

How to use "dateRestrict" parameter in Custom Search API

I am trying to modify some java code which uses the Google API. One of the features I have not been able to get is the dateRestrict. Information about this can be found here: GoogleAPI To implement this I attach the following string after my…
applecrusher
  • 5,508
  • 5
  • 39
  • 89
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
  • 361
  • 2
  • 3
  • 13
6
votes
1 answer

Google CustomSearchControl showing inconsistent pagination links

When using CustomSearchControl the number of result pages vary depending on which page you are viewing. For example, go to this site and search for: car On the first result page, it will show links to 3 pages, but when you click on 2 or 3, it ends…
userBG
  • 6,860
  • 10
  • 31
  • 39
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
  • 363
  • 2
  • 4
  • 14
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,718
  • 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…
Set
  • 934
  • 6
  • 25
1 2
3
65 66