|
Methods defined here:
- __init__(self)
- list = method(self, **kwargs)
- Returns metadata about the search performed, metadata about the custom search engine used for the search, and the search results.
Args:
sort: string, The sort expression to apply to the results
filter: string, Controls turning on or off the duplicate content filter.
Allowed values
0 - Turns off duplicate content filter.
1 - Turns on duplicate content filter.
start: string, The index of the first result to return
cx: string, The custom search engine ID to scope this search query
googlehost: string, The local Google domain to use to perform the search.
safe: string, Search safety level
Allowed values
high - Enables highest level of safe search filtering.
medium - Enables moderate safe search filtering.
off - Disables safe search filtering.
q: string, Query (required)
num: string, Number of search results to return
lr: string, The language restriction for the search results
Allowed values
lang_ar - Arabic
lang_bg - Bulgarian
lang_ca - Catalan
lang_cs - Czech
lang_da - Danish
lang_de - German
lang_el - Greek
lang_en - English
lang_es - Spanish
lang_et - Estonian
lang_fi - Finnish
lang_fr - French
lang_hr - Croatian
lang_hu - Hungarian
lang_id - Indonesian
lang_is - Icelandic
lang_it - Italian
lang_iw - Hebrew
lang_ja - Japanese
lang_ko - Korean
lang_lt - Lithuanian
lang_lv - Latvian
lang_nl - Dutch
lang_no - Norwegian
lang_pl - Polish
lang_pt - Portuguese
lang_ro - Romanian
lang_ru - Russian
lang_sk - Slovak
lang_sl - Slovenian
lang_sr - Serbian
lang_sv - Swedish
lang_tr - Turkish
lang_zh-CN - Chinese (Simplified)
lang_zh-TW - Chinese (Traditional)
cr: string, Country restrict(s).
gl: string, Geolocation of end user.
cref: string, The URL of a linked custom search engine
Returns:
An object of the form
{
"promotions": [
{
"link": "A String",
"displayLink": "A String",
"image": {
"source": "A String",
"width": 42,
"height": 42,
},
"bodyLines": [
{
"url": "A String",
"link": "A String",
"title": "A String",
},
],
"title": "A String",
},
],
"kind": "customsearch#search",
"url": {
"type": "application/json",
"template": "https://www.googleapis.com/customsearch/v1?q={searchTerms}&num={count?}&start={startIndex?}&hr={language?}&safe={safe?}&cx={cx?}&cref={cref?}&sort={sort?}&filter={filter?}&gl={gl?}&cr={cr?}&googlehost={googleHost?}&alt=json",
},
"items": [
{
"kind": "customsearch#result",
"title": "A String",
"displayLink": "A String",
"cacheId": "A String",
"pagemap": {
},
"snippet": "A String",
"htmlSnippet": "A String",
"link": "A String",
"htmlTitle": "A String",
},
],
"context": {
"facets": [
[
{
"anchor": "A String",
"label": "A String",
},
],
],
"title": "A String",
},
"queries": {
},
}
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|