How to Google Instant(ise) a Custom Search Engine (CSE) – Revisited

Previously I posted How to Google Instant(ise) a Custom Search Engine (CSE), which like a lot of my pet projects is perpetual beta (my general fallback to explain away bad coding or user interface). In particular it wasn’t until I took Chris Jobling’s Google Custom Search Engine for #PLENK2010 and ‘instantise’ it that a couple of issues became very apparent:

  1. Wouldn’t it be good to allow a traditional search on hitting the return key or clicking ‘search’.
  2. It would be great to make it easier to share the joy of Instant Custom Search Engines.
  3. Google Scribe was more of a hinder than help

So I’ve come up with Instant CSE v2 (UPDATE: Code is available from Github). This version has been beatified slightly using the Google search styling and also pulls the traditional Google CSE ‘search element’ results in when the search form is submitted. You can also instantise your own custom search by extracting your CSE ID and adding it to the url e.g. (I haven’t fully tested this feature so feedback is very welcome).

If you are interested in making your own custom searches for courses or events I recommend reading Alan Levine’s OPML to CSE recipe (OPML is one way to output the source url for a collection of RSS feeds) or Tony Hirst’s work on hashtag communities.

A couple of Instant CSE’s to play with:


  1. tanx a lot mr.martin

    in default google cse have ads but your last code

    ignore it.please help me to show search result in multi pages with this code.


    1. The AJAX search won’t pull all results just first 8-10 (can’t remember exact figure) the user needs to hit return to get paged results. Ads are removed by an option in Google CSE Control panel – Business settings. You should only enable this if you are a charity or non-profit as per terms and conditions

  2. ok tanx for help

    i want a good search for my sites
    Whether there is php code and it able reed result from google cse?

  3. I have created adsense custom search engine which show results from web not from my website. How do I make it instance enable?
    It should display ads also.Please help me

Comments are closed.