Tag Archives: Google Custom Search

Bringing the Power of Knowledge Graph to Custom Search

We're happy to announce that Custom Search Engine (CSE) owners can now use Knowledge Graph entities to configure their CSE.  The Knowledge Graph (KG) is used by Google Search to help users discover information more quickly and easily, and contains millions of entries that describe real-world entities like people, places, and things.

CSE owners can use KG Entities to

  • Define which pages the CSE searches
  • Create Refinements to narrow down search results within a CSE.

For more information about using Knowledge Graph Entities to define and refine your Custom Search Engine, visit our developer documentation.

Here are some examples of what you can do:

Searching the entire web for specific Entities

CSE's KG Entity support makes it easy to search the entire web for pages (or images) about specific topics.
We've configured this CSE to search the entire web for pages about Alphabet companies, using the CSE control panel as shown below:

Try out the CSE here: https://cse.google.com/cse?cx=000888210889775888983:b2bhygxt4le

Searching specific pages for Entities

Instead of searching the entire web, you can combine KG entities with CSE's existing site search functionality.
For example, we've configured this CSE to search Wikipedia for pages about the entity Pittsburgh:

Try out the CSE here: https://cse.google.com/cse?cx=000888210889775888983:x1jaj-jlc3e

Defining Refinements with Entities

CSE's refinements feature allows users to drill down into their search results. Now, CSE owners can use KG entities to define the refinements if their CSE.

For example, we defined this CSE to be about the Knowledge Graph Entity "basketball":

Then we add refinements for basketball subtopics, like the NBA, WNBA, College, Olympic basketball, and basketball gear.  For example, this refinement returns pages that are about both Basketball (from the top-level CSE definition) and Sports Equipment, Shoes, or Jerseys:

Try out the CSE here: https://cse.google.com/cse?cx=000888210889775888983:-nzsrilglze

Introducing Callbacks for even more rendering control

For our power users that are interested in customizing the rendering of search results beyond what is possible through our standard controls in the Custom Search Engine control panel, we are introducing a new set of Callback functions that will unlock new capabilities to customize your search result rendering even further.

Callbacks provide an opportunity to customize the experience during the rendering flow of the search results in powerful new ways. We are introducing callbacks for when the search begins, when the results are ready, and when the results are rendered. If you would like to augment your results with additional information or increased interactivity, callbacks provide an easy way to build on top of the already existing customizations you have for Custom Search Engine.

Please note that this feature only applies to the Custom Search Element API of the Custom Search Engine. These Callbacks are not applicable to the JSON API of the Custom Search Engine. Also, these callbacks only modify the organic search results; they do not modify any of the advertising or the rendering of the advertising returned from the Custom Search Element API.

Learn how to use these new functions in the Search Callbacks section of the Custom Search Element API for more details.

We are excited to see what new customizations our vibrant and creative publisher ecosystem will bring to Customized Search Engines with these new callbacks.

We would like to hear your feedback and comments on this new functionality. We invite you to share your thoughts in our user forum.

The Google Custom Search Engine Team

Improving our mobile layout

We are pleased to announce a new mobile layout that should provide an improved experience for mobile device users. We’ve changed the look of the search box and refinements, increased the size of the thumbnails, and simplified the pagination.
Before                                                                                  After
Most of these changes only affect mobile devices, but the refinements have also been updated for desktop.
Before                                                                                  After
The mobile-specific changes can be optionally disabled by setting the "mobileLayout" attribute of the search element to “disabled”.

Expanding our Custom Search Engine offerings.

We are excited to announce an expansion of our Custom Search Engine offerings. We offer the following implementation options for Custom Search Engine.
  • Standard Search Element - This free, ads supported search element is easily added to your site with simple javascript, is available for everyone, and has no daily query limit.
  • Nonprofit Search Element - This free search element is available for non-profit groups (such as charities, schools, and governments), and is similar to the Standard Search Element but does not have advertising.
  • JSON API - This API costs $5 per thousand queries, allows programmatic access, and does not have advertising or Google branding. However, this API is limited to 10,000 queries per day.
Today, we are excited to add a fourth implementation option.
  • Site Restricted JSON API - This API is similar to the JSON API above, but there is no daily query cap for Custom Search Engines that search 10 sites or fewer.
Learn more about how to use the Site Restricted JSON API from the developer site, or learn more about the differences between these offerings to help select the implementation option that works best for you.

Improving our offering for Nonprofits and Schools

If you are a nonprofit or a school looking for high quality, customizable search experiences for your site, organization, or school, we are excited to announce that Custom Search Engine is now integrating with Google For Nonprofits, https://www.google.com/nonprofits/, and with Google For Education, https://edu.google.com/products/productivity-tools/, to offer Custom Search Engine for free without advertising. Learn how to sign up for these programs in our help center.

Refocusing and looking forward on Custom Search Engine

We have several important announcements that may affect your Custom Search Engine or may require you to make changes to your Custom Search Engine. Please read this post carefully.

Custom Search Engine (CSE) is a great way to build custom search experiences for your website visitors. The search space is evolving rapidly and we want to make sure that CSE continues to evolve to meet the needs of your users, whether they are visiting from desktop or mobile devices. In order for us to achieve this, we first need to clean up some older access points that cannot support the improvements we will be adding.

Beginning in April 2017, the following API access points, and some associated features, will no longer be available:

How to tell if you are using it
What to do instead
V1 API and AutoCSE
Look for the javascript google.search.CustomSearchControl
Move to the current API.
Look for an http request containing a ‘cref’ parameter
Use the CSE control panel to set your CSE configuration.
Webmasters that host annotation files on their website
Use the CSE control panel to input or upload your annotations.
Dynamically extracted links
An included or excluded site uses the “Dynamically extract links from this page” option
Use the CSE control panel to input or upload your annotations
Autocomplete Removals
Search Features → Autocomplete → Custom Autocompletions → excluded or excluded patterns
There will no longer be a way to exclude certain autocompletions.
Autocomplete Promotions
Search Features → Autocomplete → Custom Autocompletions → promotions
There will no longer be a way to show promotions inside autocompletions; however, normal promotions will continue to work.
Ads UI style customization
Look for custom Ad Styles in the AdSense frontend under My Ads → Search Ads → Settings
The Ads UI will now be updated to use the styling of organic search results, which can be updated in the Look and Feel tab of the CSE control panel
We recognize that making these changes may be inconvenient, but cleaning up these old interfaces will allow us to focus on many new and exciting improvements to CSE. We will be modernizing the look and feel of CSE for both desktop and mobile users, improving uptime and latency, and working on the quality of our search results and autocomplete. We look forward to delivering a better CSE experience for webmasters and your website visitors alike.

Create a search engine with schema.org types

We are happy to announce the integration of Google Custom Search with the schema.org standard. Schema.org is a structured data markup schema including a shared markup schema vocabulary that is supported by major search providers. This integration enables you to create powerful and expressive topical search engines by simply specifying schema.org types in your Google Custom Search Engine definition. 

How would you go about using this new feature? Say you are the webmaster of a site about movies. You might want to create a movie search engine that can search for pages about movies either from your website, your affiliated websites or from the millions of sites that use schema.org. Achieving this functionality is now only a click away thanks to the integration of Google Custom Search with schema.org. All you have to do is add the schema type “Movie” to your Custom Search Engine definition, as shown below, and you’re done! Users of your movie search engine will then only see result pages that have the “Movie” schema annotation.

You can even refine schema.org-based search engines with other advanced search features. For example, you might make an engine for pages that describe http://schema.org/JobPosting, with a country restriction of "France", or a language restriction of "French".

To know more about creating Custom Search Engines with schema.org types, visit our developer documentation.

Posted by: Neelesh Bodas, Custom Search Engine team.

Use your expertise – build a topical search engine

Did you know that a topical search engine can help your users find content from more than a single domain? You can use your expertise to provide a delightful user experience targeting a particular topic on the Web.

There are two main types of engines built with Google Custom Search: site search and topical search. While site search is relatively straightforward - it lets you implement a search for a blog or a company website - topical search is an entirely different story.

Topical search engines focus on a particular topic and therefore usually cover a part of the Web that is larger than a single domain. Because of this topical engines need to be carefully fine-tuned to bring the best results to the users.


A nice example of a topical search engine is Kritikos - a search engine for visual media relevant to higher education developed by the Engineering Department at Liverpool University. Developed in its pilot phase exclusively for Engineering students, Kritikos is now able to add new academic subjects simply by changing one line of code in the API call.

Kritikos is using a mix of Custom Search tuning techniques to find the most relevant results and then matches the results with the data stored in the local node of the Learning Registry. The additional data is displayed as an overlay in the search results page, providing valuable reference for the engine’s users. This method allows Kritikos to also include a social mechanism into their results - e.g. it is able to show users votes or comments about the usefulness of particular resources. Here is what Andrew Green, the Technical Director of Kritikos from the University of Liverpool says about the project.

In developing Kritikos, we wanted to build upon existing search engines, rather than try and build our own. We discovered that, once we found the documentation, the Google Custom Search Engine API was incredibly easy to use. The call to the API, based on the user’s subject of interest, search terms and preferred media type, is constructed in only a dozen lines of code. The resulting JSON data was easily parsed in order to generate the thumbnail images that give Kritikos its visual impact. 

This shows the first 3 results for the term query term “fracture”, as seen by an Engineering student. The icons in the top right corners indicate that other students have interacted with these resources in some way.

Here are the results for the same search term (“fracture”), this time as viewed by a Medical student.

Andrew Green 
Technical Director, Kritikos
The University of Liverpool

You can read more about their adventures with Custom Search on the project’s blog.

From talking to developers working with Custom Search and looking at different engines out there on the Web, I learned a few trends present in many of the solutions. Here they are - a few things to keep in mind when building a topical search engine.

Choose your index wisely

There is a lot of mess on the Internet. You don’t want to distract your users and make them spend time on random sites. The point of making a topical search engine is to make it focused and targeted.

An index is a list of sites - or url patterns - that your engine is operating on. Choosing what should go into the engine’s index and what should be left out is a matter of expected quality. Sometimes even sites that are on topic can be left out of the index or de-prioritized in order to promote other content, that you - the author of the engine - consider more valuable to your users. 

Guess your user intention

The usability rule - Don’t make me think - plays nicely with topical search engines. You build the engine to make your users life easier, finding the information faster and more efficient. Usually your engine is functioning in some particular context - it is included in a topical website, it is addressed to some specific audience etc. You can apply this context to the search process, to make your users more productive and happier with the experience. There are a number of techniques that allow you to add context to your users’ queries - for details check out the Topical CSE article on Google Developers site.

Provide delightful experience with custom rendering

Search does not need to be boring. You can add all sorts of fireworks to your search results - custom design, non-linear browsing experience, user interactions or displaying additional data.

Google Custom Search allows you to change almost any aspect of the presentation layer of the results - as long as it is not misleading to the users.

What is coming

Structured data is gaining more and more momentum on the Web. It is a way of expressing real-world concepts in a machine-readable format - for example information about places, events, businesses etc. It already powers some of Google’s products and features, like Rich snippets, Knowledge Graph panels or Google Now cards.

You can harness the power of structured data in a topical search engine by filtering results by a schema.org types and properties or creating your own custom rich snippets.

Stay tuned, we will post more about the integration of Google Custom Search and schema.org standard soon. 

Learn how

In the Advanced Topics section of developer’s documentation, you can find an article about creating a Topical CSE. It describes in more detail the techniques needed to obtain the results discussed in this blog post.

If you have an interesting topical search engine and would like to share it, give us a shout at twitter at @googlecse, we’d love to see what you came up with. Happy coding!

Ewa Gasperowicz, Developer Programs Engineer

Bootstrapping your CSEs from keywords

Custom Search provides upto 5000 URL patterns to define a “slice” of the web to search over. However, if you’re creating a Custom Search Engine on a topic, such as “global warming”, finding more than a few good sites for a topic can be hard. We recently launched suggested sites to help suggest more sites for your search engine similar to  your included sites.

Today, we’re introducing another tool that is hopefully intuitive as well as interesting : You can discover hundreds of sites to include in your CSE starting just with keywords! For example, for a CSE on “global warming”, adding keywords like [pollution], [global warming] and [greenhouse effect] can lead you to discover global warming related sites within minutes.

This tool attempts to combine Google’s knowledge with the topic expertise you have - Google suggests sites, but you can control the topic expansion, and guide the tool towards your topic in a fine grained way.

The tool is accessible off of the New Search Engine page on the Custom Search control panel.  Give the tool a whirl, see more details on how the tool works in our documentation, and let us know what you think on the product forum.

Suggested sites for CSEs

Have a CSE to search over your favorite topic (e.g. cars)? Here is a new feature to help you expand your CSE’s definition. This feature recommends more url patterns relevant to the ones you already have in your search engine. We also provide a set of sample pages for each of the recommended patterns.

You can find more documentation here.

Make your CSEs better and richer. Try this out now on your CSE’s homepage !

Posted by: Chirag Sethi, Custom Search Team