JDBC Driver for Google Search

Build 23.0.8839

WebSearch

Query the web on Google.

テーブル固有の情報

このテーブルのクエリでは、Search Terms パラメータを指定する必要があります。例えば、WebSearch で語句'technology' を検索するには、次のクエリを使用します。

SELECT * FROM WebSearch WHERE SearchTerms = 'technology'

特定のクエリを除外して他のクエリを含めるには、SearchTerms フィールドで複数の演算子を使用します。

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

検索にサイトを含めるには、次のようなクエリを実行します。

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

同様に、検索でサイトを除外するには、次のようなクエリを実行します。

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

Google 検索には、Count(*) と同様のTotalResults() という集計関数があります。

TotalResults() は、クエリに基づく結果数を取得する場合に使用できます。

Google Search API は、返されるアイテムの数を100 に制限するため、count(*) は実際の検索結果の数にはなりません。

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

SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。

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.

使用できる値は次のとおりです。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.

使用できる値は次のとおりです。cc_publicdomain, cc_attribute, cc_sharealike, cc_noncommercial, cc_nonderived

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

使用できる値は次のとおりです。high, medium, off

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

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 23.0.8839