JDBC Driver for Google Search

Build 21.0.7930

WebSearch

Query the web on Google.

Table Specific Information

When querying this table the SearchTerms parameter must be specified. For example, to search in WebSearch for the term 'technology' use the following query:

SELECT * FROM WebSearch WHERE SearchTerms = 'technology'

To filter out certain queries and include other queries, use a mix of operators on the SearchTerms field:

SELECT * FROM WebSearch WHERE SearchTerms = 'search1' AND SearchTerms != 'search2' AND SearchTerms > 'x' AND SearchTerms < 'y' or SearchTerms = 'or this'

To include a site in the search, execute a query like the following:

SELECT * FROM WebSearch WHERE SearchTerms = 'technology' AND Site = 'https://news.google.com/'

Likewise, to exclude a site in the search, execute a query like the following:

SELECT * FROM WebSearch WHERE SearchTerms = 'technology' AND Site != 'https://news.google.com/'

Google search has an aggregate function called TotalResults() that is similar like Count(*).

TotalResults() can be used if you want to get the number of result based on your query.

The Google Search API limits the number of item returned to 100 so count(*) will not be the actual number of search results.

SELECT TotalResults() FROM WebSearch WHERE SearchTerms='ancient artifact' 

Columns

Name Type References Description
SearchTerms String The search expression.
Title String The title of the search result, in plain text.
HtmlTitle String The title of the search result, in HTML.
Link String The full URL the search result points to.
DisplayLink String An abridged version of the search result URL.
Snippet String The snippet of the search result, in plain text.
HtmlSnippet String The snippet of the search result, in HTML.
FormattedUrl String The formatted URL of the search result.
HtmlFormattedUrl String The HTML-formatted URL of the search result.

Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
TraditionalChineseSearch Boolean Enable or disable searches in both Simplified and Traditional Chinese Search.
CountryRestrictions String Restrict search results to documents originating in a particular country. This input accepts ISO 3166 2-digit codes.
Date Datetime Filter events created after this date.
FileType String Filter the results to match the specified file types.
DuplicateFilter Boolean Turn on or off the duplicate content filter.
Geolocation String Focus the search to a two-letter country code.
UserInterfaceLanguage String Specify the interface language (host language) of your user interface.
LinkSite String Specifies that all search results should contain a link to a particular URL.
LanguageRestrictions String Restrict the search results to certain languages. For example: lang_en.

The allowed values are lang_ar, lang_bg, lang_ca, lang_cs, lang_da, lang_de, lang_el, lang_en, lang_es, lang_et, lang_fi, lang_fr, lang_hr, lang_hu, lang_id, lang_is, lang_it, lang_iw, lang_ja, lang_ko, lang_lt, lang_lv, lang_nl, lang_no, lang_pl, lang_pt, lang_ro, lang_ru, lang_sk, lang_sl, lang_sr, lang_sv, lang_tr, lang_zh-cn, lang_zh-tw.

RelatedSite String Include results that have a URL to the specified related URL.
Rights String Filter results based on the reserved rights: cc_publicdomain, cc_attribute, cc_sharealike, cc_noncommercial, or cc_nonderived.

The allowed values are cc_publicdomain, cc_attribute, cc_sharealike, cc_noncommercial, cc_nonderived.

SearchSafety String Search safety level: high, medium, or off.

The allowed values are high, medium, off.

Site String Restrict all search results to pages from the specified site.

Copyright (c) 2021 CData Software, Inc. - All rights reserved.
Build 21.0.7930