blob: c8925b2897de18db3367df878bcaedbfe20b2295 [file] [log] [blame]
John Asmuth614db982014-04-24 15:46:26 -04001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
Bu Sun Kim65020912020-05-20 12:08:20 -070075<h1><a href="customsearch_v1.html">Custom Search API</a> . <a href="customsearch_v1.cse.html">cse</a></h1>
John Asmuth614db982014-04-24 15:46:26 -040076<h2>Instance Methods</h2>
77<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070078 <code><a href="customsearch_v1.cse.siterestrict.html">siterestrict()</a></code>
79</p>
80<p class="firstline">Returns the siterestrict Resource.</p>
81
82<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070083 <code><a href="#close">close()</a></code></p>
84<p class="firstline">Close httplib2 connections.</p>
85<p class="toc_element">
86 <code><a href="#list">list(num=None, c2coff=None, highRange=None, exactTerms=None, imgType=None, googlehost=None, lr=None, q=None, hl=None, fileType=None, siteSearch=None, orTerms=None, imgSize=None, excludeTerms=None, safe=None, gl=None, imgDominantColor=None, searchType=None, relatedSite=None, filter=None, linkSite=None, siteSearchFilter=None, rights=None, imgColorType=None, dateRestrict=None, start=None, sort=None, lowRange=None, cr=None, cx=None, hq=None, x__xgafv=None)</a></code></p>
87<p class="firstline">Returns metadata about the search performed, metadata about the engine used for the search, and the search results.</p>
John Asmuth614db982014-04-24 15:46:26 -040088<h3>Method Details</h3>
89<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070090 <code class="details" id="close">close()</code>
91 <pre>Close httplib2 connections.</pre>
92</div>
93
94<div class="method">
95 <code class="details" id="list">list(num=None, c2coff=None, highRange=None, exactTerms=None, imgType=None, googlehost=None, lr=None, q=None, hl=None, fileType=None, siteSearch=None, orTerms=None, imgSize=None, excludeTerms=None, safe=None, gl=None, imgDominantColor=None, searchType=None, relatedSite=None, filter=None, linkSite=None, siteSearchFilter=None, rights=None, imgColorType=None, dateRestrict=None, start=None, sort=None, lowRange=None, cr=None, cx=None, hq=None, x__xgafv=None)</code>
96 <pre>Returns metadata about the search performed, metadata about the engine used for the search, and the search results.
John Asmuth614db982014-04-24 15:46:26 -040097
98Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070099 num: integer, Number of search results to return. * Valid values are integers between 1 and 10, inclusive.
100 c2coff: string, Enables or disables [Simplified and Traditional Chinese Search](https://developers.google.com/custom-search/docs/xml_results#chineseSearch). The default value for this parameter is 0 (zero), meaning that the feature is enabled. Supported values are: * `1`: Disabled * `0`: Enabled (default)
101 highRange: string, Specifies the ending value for a search range. * Use `lowRange` and `highRange` to append an inclusive search range of `lowRange...highRange` to the query.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700102 exactTerms: string, Identifies a phrase that all documents in the search results must contain.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700103 imgType: string, Returns images of a type. Acceptable values are: * `&quot;clipart&quot;` * `&quot;face&quot;` * `&quot;lineart&quot;` * `&quot;stock&quot;` * `&quot;photo&quot;` * `&quot;animated&quot;`
104 Allowed values
105 imgTypeUndefined - No image type specified.
106 clipart - Clipart-style images only.
107 face - Images of faces only.
108 lineart - Line art images only.
109 stock - Stock images only.
110 photo - Photo images only.
111 animated - Animated images only.
112 googlehost: string, **Deprecated**. Use the `gl` parameter for a similar effect. The local Google domain (for example, google.com, google.de, or google.fr) to use to perform the search.
113 lr: string, Restricts the search to documents written in a particular language (e.g., `lr=lang_ja`). Acceptable values are: * `&quot;lang_ar&quot;`: Arabic * `&quot;lang_bg&quot;`: Bulgarian * `&quot;lang_ca&quot;`: Catalan * `&quot;lang_cs&quot;`: Czech * `&quot;lang_da&quot;`: Danish * `&quot;lang_de&quot;`: German * `&quot;lang_el&quot;`: Greek * `&quot;lang_en&quot;`: English * `&quot;lang_es&quot;`: Spanish * `&quot;lang_et&quot;`: Estonian * `&quot;lang_fi&quot;`: Finnish * `&quot;lang_fr&quot;`: French * `&quot;lang_hr&quot;`: Croatian * `&quot;lang_hu&quot;`: Hungarian * `&quot;lang_id&quot;`: Indonesian * `&quot;lang_is&quot;`: Icelandic * `&quot;lang_it&quot;`: Italian * `&quot;lang_iw&quot;`: Hebrew * `&quot;lang_ja&quot;`: Japanese * `&quot;lang_ko&quot;`: Korean * `&quot;lang_lt&quot;`: Lithuanian * `&quot;lang_lv&quot;`: Latvian * `&quot;lang_nl&quot;`: Dutch * `&quot;lang_no&quot;`: Norwegian * `&quot;lang_pl&quot;`: Polish * `&quot;lang_pt&quot;`: Portuguese * `&quot;lang_ro&quot;`: Romanian * `&quot;lang_ru&quot;`: Russian * `&quot;lang_sk&quot;`: Slovak * `&quot;lang_sl&quot;`: Slovenian * `&quot;lang_sr&quot;`: Serbian * `&quot;lang_sv&quot;`: Swedish * `&quot;lang_tr&quot;`: Turkish * `&quot;lang_zh-CN&quot;`: Chinese (Simplified) * `&quot;lang_zh-TW&quot;`: Chinese (Traditional)
114 q: string, Query
115 hl: string, Sets the user interface language. * Explicitly setting this parameter improves the performance and the quality of your search results. * See the [Interface Languages](https://developers.google.com/custom-search/docs/xml_results#wsInterfaceLanguages) section of [Internationalizing Queries and Results Presentation](https://developers.google.com/custom-search/docs/xml_results#wsInternationalizing) for more information, and (Supported Interface Languages)[https://developers.google.com/custom-search/docs/xml_results_appendices#interfaceLanguages] for a list of supported languages.
116 fileType: string, Restricts results to files of a specified extension. A list of file types indexable by Google can be found in Search Console [Help Center](https://support.google.com/webmasters/answer/35287).
117 siteSearch: string, Specifies a given site which should always be included or excluded from results (see `siteSearchFilter` parameter, below).
118 orTerms: string, Provides additional search terms to check for in a document, where each document in the search results must contain at least one of the additional search terms.
119 imgSize: string, Returns images of a specified size. Acceptable values are: * `&quot;huge&quot;` * `&quot;icon&quot;` * `&quot;large&quot;` * `&quot;medium&quot;` * `&quot;small&quot;` * `&quot;xlarge&quot;` * `&quot;xxlarge&quot;`
120 Allowed values
121 imgSizeUndefined - No image size specified.
122 HUGE - Only the largest possible images.
123 ICON - Only very small icon-sized images.
124 LARGE - Only large images.
125 MEDIUM - Only medium images.
126 SMALL - Only small images.
127 XLARGE - Only very large images.
128 XXLARGE - Only extremely large images.
129 excludeTerms: string, Identifies a word or phrase that should not appear in any documents in the search results.
130 safe: string, Search safety level. Acceptable values are: * `&quot;active&quot;`: Enables SafeSearch filtering. * `&quot;off&quot;`: Disables SafeSearch filtering. (default)
131 Allowed values
132 safeUndefined - SafeSearch mode unspecified. (Falls back to engine&#x27;s configuration.)
133 active - Turn SafeSearch on.
134 high - Deprecated, equivalent to &quot;active&quot;.
135 medium - Deprecated, equivalent to &quot;active&quot;.
136 off - Turn SafeSearch off.
137 gl: string, Geolocation of end user. * The `gl` parameter value is a two-letter country code. The `gl` parameter boosts search results whose country of origin matches the parameter value. See the [Country Codes](https://developers.google.com/custom-search/docs/xml_results_appendices#countryCodes) page for a list of valid values. * Specifying a `gl` parameter value should lead to more relevant results. This is particularly true for international customers and, even more specifically, for customers in English- speaking countries other than the United States.
138 imgDominantColor: string, Returns images of a specific dominant color. Acceptable values are: * `&quot;black&quot;` * `&quot;blue&quot;` * `&quot;brown&quot;` * `&quot;gray&quot;` * `&quot;green&quot;` * `&quot;orange&quot;` * `&quot;pink&quot;` * `&quot;purple&quot;` * `&quot;red&quot;` * `&quot;teal&quot;` * `&quot;white&quot;` * `&quot;yellow&quot;`
139 Allowed values
140 imgDominantColorUndefined - No dominant color specified.
141 black - Predominantly black images only.
142 blue - Predominantly blue images only.
143 brown - Predominantly brown images only.
144 gray - Predominantly gray images only.
145 green - Predominantly green images only.
146 orange - Predominantly orange images only.
147 pink - Predominantly pink images only.
148 purple - Predominantly purple images only.
149 red - Predominantly red images only.
150 teal - Predominantly teal images only.
151 white - Predominantly white images only.
152 yellow - Predominantly yellow images only.
153 searchType: string, Specifies the search type: `image`. If unspecified, results are limited to webpages. Acceptable values are: * `&quot;image&quot;`: custom image search.
154 Allowed values
155 searchTypeUndefined - Search type unspecified (defaults to web search).
156 image - Image search.
157 relatedSite: string, Specifies that all search results should be pages that are related to the specified URL.
158 filter: string, Controls turning on or off the duplicate content filter. * See [Automatic Filtering](https://developers.google.com/custom-search/docs/xml_results#automaticFiltering) for more information about Google&#x27;s search results filters. Note that host crowding filtering applies only to multi-site searches. * By default, Google applies filtering to all search results to improve the quality of those results. Acceptable values are: * `0`: Turns off duplicate content filter. * `1`: Turns on duplicate content filter.
159 linkSite: string, Specifies that all search results should contain a link to a particular URL.
160 siteSearchFilter: string, Controls whether to include or exclude results from the site named in the `siteSearch` parameter. Acceptable values are: * `&quot;e&quot;`: exclude * `&quot;i&quot;`: include
161 Allowed values
162 siteSearchFilterUndefined - Filter mode unspecified.
163 e - Exclude results from the listed sites.
164 i - Include only results from the listed sites.
165 rights: string, Filters based on licensing. Supported values include: `cc_publicdomain`, `cc_attribute`, `cc_sharealike`, `cc_noncommercial`, `cc_nonderived` and combinations of these. See [typical combinations](https://wiki.creativecommons.org/wiki/CC_Search_integration).
166 imgColorType: string, Returns black and white, grayscale, transparent, or color images. Acceptable values are: * `&quot;color&quot;` * `&quot;gray&quot;` * `&quot;mono&quot;`: black and white * `&quot;trans&quot;`: transparent background
167 Allowed values
168 imgColorTypeUndefined - No image color type specified.
169 mono - Black and white images only.
170 gray - Grayscale images only.
171 color - Color images only.
172 trans - Images with transparent background
173 dateRestrict: string, Restricts results to URLs based on date. Supported values include: * `d[number]`: requests results from the specified number of past days. * `w[number]`: requests results from the specified number of past weeks. * `m[number]`: requests results from the specified number of past months. * `y[number]`: requests results from the specified number of past years.
174 start: integer, The index of the first result to return. The default number of results per page is 10, so `&amp;start=11` would start at the top of the second page of results. **Note**: The JSON API will never return more than 100 results, even if more than 100 documents match the query, so setting the sum of `start + num` to a number greater than 100 will produce an error. Also note that the maximum value for `num` is 10.
175 sort: string, The sort expression to apply to the results. The sort parameter specifies that the results be sorted according to the specified expression i.e. sort by date. [Example: sort=date](https://developers.google.com/custom-search/docs/structured_search#sort-by-attribute).
176 lowRange: string, Specifies the starting value for a search range. Use `lowRange` and `highRange` to append an inclusive search range of `lowRange...highRange` to the query.
177 cr: string, Restricts search results to documents originating in a particular country. You may use [Boolean operators](https://developers.google.com/custom-search/docs/xml_results_appendices#booleanOperators) in the cr parameter&#x27;s value. Google Search determines the country of a document by analyzing: * the top-level domain (TLD) of the document&#x27;s URL * the geographic location of the Web server&#x27;s IP address See the [Country Parameter Values](https://developers.google.com/custom-search/docs/xml_results_appendices#countryCollections) page for a list of valid values for this parameter.
178 cx: string, The Programmable Search Engine ID to use for this request.
179 hq: string, Appends the specified query terms to the query, as if they were combined with a logical AND operator.
Bu Sun Kim65020912020-05-20 12:08:20 -0700180 x__xgafv: string, V1 error format.
John Asmuth614db982014-04-24 15:46:26 -0400181 Allowed values
Bu Sun Kim65020912020-05-20 12:08:20 -0700182 1 - v1 error format
183 2 - v2 error format
John Asmuth614db982014-04-24 15:46:26 -0400184
185Returns:
186 An object of the form:
187
Bu Sun Kim65020912020-05-20 12:08:20 -0700188 { # Response to a custom search request.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700189 &quot;promotions&quot;: [ # The set of [promotions](https://developers.google.com/custom-search/docs/promotions). Present only if the custom search engine&#x27;s configuration files define any promotions for the given query.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700190 { # Promotion result.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700191 &quot;displayLink&quot;: &quot;A String&quot;, # An abridged version of this search&#x27;s result URL, e.g. www.example.com.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700192 &quot;title&quot;: &quot;A String&quot;, # The title of the promotion.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700193 &quot;htmlTitle&quot;: &quot;A String&quot;, # The title of the promotion, in HTML.
194 &quot;link&quot;: &quot;A String&quot;, # The URL of the promotion.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700195 &quot;image&quot;: { # Image belonging to a promotion.
196 &quot;source&quot;: &quot;A String&quot;, # URL of the image for this promotion link.
197 &quot;width&quot;: 42, # Image width in pixels.
198 &quot;height&quot;: 42, # Image height in pixels.
199 },
200 &quot;bodyLines&quot;: [ # An array of block objects for this promotion. See [Google WebSearch Protocol reference](https://developers.google.com/custom-search/docs/xml_results) for more information.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700201 { # Block object belonging to a promotion.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700202 &quot;htmlTitle&quot;: &quot;A String&quot;, # The block object&#x27;s text in HTML, if it has text.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700203 &quot;title&quot;: &quot;A String&quot;, # The block object&#x27;s text, if it has text.
204 &quot;url&quot;: &quot;A String&quot;, # The URL of the block object&#x27;s link, if it has one.
205 &quot;link&quot;: &quot;A String&quot;, # The anchor text of the block object&#x27;s link, if it has a link.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700206 },
207 ],
208 },
209 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700210 &quot;spelling&quot;: { # Spell correction information for a query.
211 &quot;htmlCorrectedQuery&quot;: &quot;A String&quot;, # The corrected query, formatted in HTML.
212 &quot;correctedQuery&quot;: &quot;A String&quot;, # The corrected query.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700213 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700214 &quot;searchInformation&quot;: { # Metadata about a search operation.
215 &quot;formattedTotalResults&quot;: &quot;A String&quot;, # The total number of search results, formatted according to locale style.
216 &quot;formattedSearchTime&quot;: &quot;A String&quot;, # The time taken for the server to return search results, formatted according to locale style.
217 &quot;searchTime&quot;: 3.14, # The time taken for the server to return search results.
218 &quot;totalResults&quot;: &quot;A String&quot;, # The total number of search results returned by the query.
219 },
220 &quot;queries&quot;: { # Query metadata for the previous, current, and next pages of results.
221 &quot;previousPage&quot;: [ # Metadata representing the previous page of results, if applicable.
222 { # Custom search request metadata.
223 &quot;imgDominantColor&quot;: &quot;A String&quot;, # Restricts results to images with a specific dominant color. Supported values are: * `red` * `orange` * `yellow` * `green` * `teal` * `blue` * `purple` * `pink` * `white` * `gray` * `black` * `brown`
224 &quot;startIndex&quot;: 42, # The index of the current set of search results into the total set of results, where the index of the first result is 1.
225 &quot;language&quot;: &quot;A String&quot;, # The language of the search results.
226 &quot;cx&quot;: &quot;A String&quot;, # The identifier of an engine created using the Programmable Search Engine [Control Panel](https://programmablesearchengine.google.com/). This is a custom property not defined in the OpenSearch spec. This parameter is **required**.
227 &quot;hq&quot;: &quot;A String&quot;, # Appends the specified query terms to the query, as if they were combined with a logical `AND` operator.
228 &quot;searchTerms&quot;: &quot;A String&quot;, # The search terms entered by the user.
229 &quot;safe&quot;: &quot;A String&quot;, # Specifies the [SafeSearch level](https://developers.google.com/custom-search/docs/xml_results#safeSearchLevels) used for filtering out adult results. This is a custom property not defined in the OpenSearch spec. Valid parameter values are: * `&quot;off&quot;`: Disable SafeSearch * `&quot;active&quot;`: Enable SafeSearch
230 &quot;gl&quot;: &quot;A String&quot;, # Boosts search results whose country of origin matches the parameter value. See [Country Codes](https://developers.google.com/custom-search/docs/xml_results#countryCodes) for a list of valid values. Specifying a `gl` parameter value in WebSearch requests should improve the relevance of results. This is particularly true for international customers and, even more specifically, for customers in English-speaking countries other than the United States.
231 &quot;lowRange&quot;: &quot;A String&quot;, # Specifies the starting value for a search range. Use `cse:lowRange` and `cse:highrange` to append an inclusive search range of `lowRange...highRange` to the query.
232 &quot;searchType&quot;: &quot;A String&quot;, # Allowed values are `web` or `image`. If unspecified, results are limited to webpages.
233 &quot;rights&quot;: &quot;A String&quot;, # Filters based on licensing. Supported values include: * `cc_publicdomain` * `cc_attribute` * `cc_sharealike` * `cc_noncommercial` * `cc_nonderived`
234 &quot;startPage&quot;: 42, # The page number of this set of results, where the page length is set by the `count` property.
235 &quot;imgType&quot;: &quot;A String&quot;, # Restricts results to images of a specified type. Supported values are: * `clipart` (Clip art) * `face` (Face) * `lineart` (Line drawing) * `photo` (Photo) * `animated` (Animated) * `stock` (Stock)
236 &quot;inputEncoding&quot;: &quot;A String&quot;, # The character encoding supported for search requests.
237 &quot;fileType&quot;: &quot;A String&quot;, # Restricts results to files of a specified extension. Filetypes supported by Google include: * Adobe Portable Document Format (`pdf`) * Adobe PostScript (`ps`) * Lotus 1-2-3 (`wk1`, `wk2`, `wk3`, `wk4`, `wk5`, `wki`, `wks`, `wku`) * Lotus WordPro (`lwp`) * Macwrite (`mw`) * Microsoft Excel (`xls`) * Microsoft PowerPoint (`ppt`) * Microsoft Word (`doc`) * Microsoft Works (`wks`, `wps`, `wdb`) * Microsoft Write (`wri`) * Rich Text Format (`rtf`) * Shockwave Flash (`swf`) * Text (`ans`, `txt`). Additional filetypes may be added in the future. An up-to-date list can always be found in Google&#x27;s [file type FAQ](https://support.google.com/webmasters/answer/35287).
238 &quot;outputEncoding&quot;: &quot;A String&quot;, # The character encoding supported for search results.
239 &quot;cr&quot;: &quot;A String&quot;, # Restricts search results to documents originating in a particular country. You may use [Boolean operators](https://developers.google.com/custom-search/docs/xml_results#booleanOperators) in the `cr` parameter&#x27;s value. Google WebSearch determines the country of a document by analyzing the following: * The top-level domain (TLD) of the document&#x27;s URL. * The geographic location of the web server&#x27;s IP address. See [Country (cr) Parameter Values](https://developers.google.com/custom-search/docs/xml_results#countryCollections) for a list of valid values for this parameter.
240 &quot;exactTerms&quot;: &quot;A String&quot;, # Identifies a phrase that all documents in the search results must contain.
241 &quot;orTerms&quot;: &quot;A String&quot;, # Provides additional search terms to check for in a document, where each document in the search results must contain at least one of the additional search terms. You can also use the [Boolean OR](https://developers.google.com/custom-search/docs/xml_results#BooleanOrqt) query term for this type of query.
242 &quot;dateRestrict&quot;: &quot;A String&quot;, # Restricts results to URLs based on date. Supported values include: * `d[number]`: requests results from the specified number of past days. * `w[number]`: requests results from the specified number of past weeks. * `m[number]`: requests results from the specified number of past months. * `y[number]`: requests results from the specified number of past years.
243 &quot;excludeTerms&quot;: &quot;A String&quot;, # Identifies a word or phrase that should not appear in any documents in the search results.
244 &quot;highRange&quot;: &quot;A String&quot;, # Specifies the ending value for a search range. Use `cse:lowRange` and `cse:highrange` to append an inclusive search range of `lowRange...highRange` to the query.
245 &quot;relatedSite&quot;: &quot;A String&quot;, # Specifies that all search results should be pages that are related to the specified URL. The parameter value should be a URL.
246 &quot;count&quot;: 42, # Number of search results returned in this set.
247 &quot;filter&quot;: &quot;A String&quot;, # Activates or deactivates the automatic filtering of Google search results. See [Automatic Filtering](https://developers.google.com/custom-search/docs/xml_results#automaticFiltering) for more information about Google&#x27;s search results filters. Valid values for this parameter are: * `0`: Disabled * `1`: Enabled (default) **Note**: By default, Google applies filtering to all search results to improve the quality of those results.
248 &quot;linkSite&quot;: &quot;A String&quot;, # Specifies that all results should contain a link to a specific URL.
249 &quot;siteSearchFilter&quot;: &quot;A String&quot;, # Specifies whether to include or exclude results from the site named in the `sitesearch` parameter. Supported values are: * `i`: include content from site * `e`: exclude content from site
250 &quot;disableCnTwTranslation&quot;: &quot;A String&quot;, # Enables or disables the [Simplified and Traditional Chinese Search](https://developers.google.com/custom-search/docs/xml_results#chineseSearch) feature. Supported values are: * `0`: enabled (default) * `1`: disabled
251 &quot;sort&quot;: &quot;A String&quot;, # Specifies that results should be sorted according to the specified expression. For example, sort by date.
252 &quot;totalResults&quot;: &quot;A String&quot;, # Estimated number of total search results. May not be accurate.
253 &quot;title&quot;: &quot;A String&quot;, # A description of the query.
254 &quot;googleHost&quot;: &quot;A String&quot;, # Specifies the Google domain (for example, google.com, google.de, or google.fr) to which the search should be limited.
255 &quot;imgSize&quot;: &quot;A String&quot;, # Restricts results to images of a specified size. Supported values are: * `icon` (small) * `small | medium | large | xlarge` (medium) * `xxlarge` (large) * `huge` (extra-large)
256 &quot;siteSearch&quot;: &quot;A String&quot;, # Restricts results to URLs from a specified site.
257 &quot;imgColorType&quot;: &quot;A String&quot;, # Restricts results to images of a specified color type. Supported values are: * `mono` (black and white) * `gray` (grayscale) * `color` (color)
258 &quot;hl&quot;: &quot;A String&quot;, # Specifies the interface language (host language) of your user interface. Explicitly setting this parameter improves the performance and the quality of your search results. See the [Interface Languages](https://developers.google.com/custom-search/docs/xml_results#wsInterfaceLanguages) section of [Internationalizing Queries and Results Presentation](https://developers.google.com/custom-search/docs/xml_results#wsInternationalizing) for more information, and [Supported Interface Languages](https://developers.google.com/custom-search/docs/xml_results_appendices#interfaceLanguages) for a list of supported languages.
259 },
260 ],
261 &quot;request&quot;: [ # Metadata representing the current request.
262 { # Custom search request metadata.
263 &quot;searchTerms&quot;: &quot;A String&quot;, # The search terms entered by the user.
264 &quot;inputEncoding&quot;: &quot;A String&quot;, # The character encoding supported for search requests.
265 &quot;excludeTerms&quot;: &quot;A String&quot;, # Identifies a word or phrase that should not appear in any documents in the search results.
266 &quot;totalResults&quot;: &quot;A String&quot;, # Estimated number of total search results. May not be accurate.
267 &quot;cr&quot;: &quot;A String&quot;, # Restricts search results to documents originating in a particular country. You may use [Boolean operators](https://developers.google.com/custom-search/docs/xml_results#booleanOperators) in the `cr` parameter&#x27;s value. Google WebSearch determines the country of a document by analyzing the following: * The top-level domain (TLD) of the document&#x27;s URL. * The geographic location of the web server&#x27;s IP address. See [Country (cr) Parameter Values](https://developers.google.com/custom-search/docs/xml_results#countryCollections) for a list of valid values for this parameter.
268 &quot;safe&quot;: &quot;A String&quot;, # Specifies the [SafeSearch level](https://developers.google.com/custom-search/docs/xml_results#safeSearchLevels) used for filtering out adult results. This is a custom property not defined in the OpenSearch spec. Valid parameter values are: * `&quot;off&quot;`: Disable SafeSearch * `&quot;active&quot;`: Enable SafeSearch
269 &quot;imgSize&quot;: &quot;A String&quot;, # Restricts results to images of a specified size. Supported values are: * `icon` (small) * `small | medium | large | xlarge` (medium) * `xxlarge` (large) * `huge` (extra-large)
270 &quot;filter&quot;: &quot;A String&quot;, # Activates or deactivates the automatic filtering of Google search results. See [Automatic Filtering](https://developers.google.com/custom-search/docs/xml_results#automaticFiltering) for more information about Google&#x27;s search results filters. Valid values for this parameter are: * `0`: Disabled * `1`: Enabled (default) **Note**: By default, Google applies filtering to all search results to improve the quality of those results.
271 &quot;count&quot;: 42, # Number of search results returned in this set.
272 &quot;cx&quot;: &quot;A String&quot;, # The identifier of an engine created using the Programmable Search Engine [Control Panel](https://programmablesearchengine.google.com/). This is a custom property not defined in the OpenSearch spec. This parameter is **required**.
273 &quot;imgDominantColor&quot;: &quot;A String&quot;, # Restricts results to images with a specific dominant color. Supported values are: * `red` * `orange` * `yellow` * `green` * `teal` * `blue` * `purple` * `pink` * `white` * `gray` * `black` * `brown`
274 &quot;googleHost&quot;: &quot;A String&quot;, # Specifies the Google domain (for example, google.com, google.de, or google.fr) to which the search should be limited.
275 &quot;lowRange&quot;: &quot;A String&quot;, # Specifies the starting value for a search range. Use `cse:lowRange` and `cse:highrange` to append an inclusive search range of `lowRange...highRange` to the query.
276 &quot;dateRestrict&quot;: &quot;A String&quot;, # Restricts results to URLs based on date. Supported values include: * `d[number]`: requests results from the specified number of past days. * `w[number]`: requests results from the specified number of past weeks. * `m[number]`: requests results from the specified number of past months. * `y[number]`: requests results from the specified number of past years.
277 &quot;rights&quot;: &quot;A String&quot;, # Filters based on licensing. Supported values include: * `cc_publicdomain` * `cc_attribute` * `cc_sharealike` * `cc_noncommercial` * `cc_nonderived`
278 &quot;siteSearch&quot;: &quot;A String&quot;, # Restricts results to URLs from a specified site.
279 &quot;exactTerms&quot;: &quot;A String&quot;, # Identifies a phrase that all documents in the search results must contain.
280 &quot;relatedSite&quot;: &quot;A String&quot;, # Specifies that all search results should be pages that are related to the specified URL. The parameter value should be a URL.
281 &quot;title&quot;: &quot;A String&quot;, # A description of the query.
282 &quot;imgColorType&quot;: &quot;A String&quot;, # Restricts results to images of a specified color type. Supported values are: * `mono` (black and white) * `gray` (grayscale) * `color` (color)
283 &quot;outputEncoding&quot;: &quot;A String&quot;, # The character encoding supported for search results.
284 &quot;disableCnTwTranslation&quot;: &quot;A String&quot;, # Enables or disables the [Simplified and Traditional Chinese Search](https://developers.google.com/custom-search/docs/xml_results#chineseSearch) feature. Supported values are: * `0`: enabled (default) * `1`: disabled
285 &quot;searchType&quot;: &quot;A String&quot;, # Allowed values are `web` or `image`. If unspecified, results are limited to webpages.
286 &quot;orTerms&quot;: &quot;A String&quot;, # Provides additional search terms to check for in a document, where each document in the search results must contain at least one of the additional search terms. You can also use the [Boolean OR](https://developers.google.com/custom-search/docs/xml_results#BooleanOrqt) query term for this type of query.
287 &quot;fileType&quot;: &quot;A String&quot;, # Restricts results to files of a specified extension. Filetypes supported by Google include: * Adobe Portable Document Format (`pdf`) * Adobe PostScript (`ps`) * Lotus 1-2-3 (`wk1`, `wk2`, `wk3`, `wk4`, `wk5`, `wki`, `wks`, `wku`) * Lotus WordPro (`lwp`) * Macwrite (`mw`) * Microsoft Excel (`xls`) * Microsoft PowerPoint (`ppt`) * Microsoft Word (`doc`) * Microsoft Works (`wks`, `wps`, `wdb`) * Microsoft Write (`wri`) * Rich Text Format (`rtf`) * Shockwave Flash (`swf`) * Text (`ans`, `txt`). Additional filetypes may be added in the future. An up-to-date list can always be found in Google&#x27;s [file type FAQ](https://support.google.com/webmasters/answer/35287).
288 &quot;highRange&quot;: &quot;A String&quot;, # Specifies the ending value for a search range. Use `cse:lowRange` and `cse:highrange` to append an inclusive search range of `lowRange...highRange` to the query.
289 &quot;startIndex&quot;: 42, # The index of the current set of search results into the total set of results, where the index of the first result is 1.
290 &quot;hq&quot;: &quot;A String&quot;, # Appends the specified query terms to the query, as if they were combined with a logical `AND` operator.
291 &quot;imgType&quot;: &quot;A String&quot;, # Restricts results to images of a specified type. Supported values are: * `clipart` (Clip art) * `face` (Face) * `lineart` (Line drawing) * `photo` (Photo) * `animated` (Animated) * `stock` (Stock)
292 &quot;hl&quot;: &quot;A String&quot;, # Specifies the interface language (host language) of your user interface. Explicitly setting this parameter improves the performance and the quality of your search results. See the [Interface Languages](https://developers.google.com/custom-search/docs/xml_results#wsInterfaceLanguages) section of [Internationalizing Queries and Results Presentation](https://developers.google.com/custom-search/docs/xml_results#wsInternationalizing) for more information, and [Supported Interface Languages](https://developers.google.com/custom-search/docs/xml_results_appendices#interfaceLanguages) for a list of supported languages.
293 &quot;startPage&quot;: 42, # The page number of this set of results, where the page length is set by the `count` property.
294 &quot;gl&quot;: &quot;A String&quot;, # Boosts search results whose country of origin matches the parameter value. See [Country Codes](https://developers.google.com/custom-search/docs/xml_results#countryCodes) for a list of valid values. Specifying a `gl` parameter value in WebSearch requests should improve the relevance of results. This is particularly true for international customers and, even more specifically, for customers in English-speaking countries other than the United States.
295 &quot;language&quot;: &quot;A String&quot;, # The language of the search results.
296 &quot;sort&quot;: &quot;A String&quot;, # Specifies that results should be sorted according to the specified expression. For example, sort by date.
297 &quot;linkSite&quot;: &quot;A String&quot;, # Specifies that all results should contain a link to a specific URL.
298 &quot;siteSearchFilter&quot;: &quot;A String&quot;, # Specifies whether to include or exclude results from the site named in the `sitesearch` parameter. Supported values are: * `i`: include content from site * `e`: exclude content from site
299 },
300 ],
301 &quot;nextPage&quot;: [ # Metadata representing the next page of results, if applicable.
302 { # Custom search request metadata.
303 &quot;imgType&quot;: &quot;A String&quot;, # Restricts results to images of a specified type. Supported values are: * `clipart` (Clip art) * `face` (Face) * `lineart` (Line drawing) * `photo` (Photo) * `animated` (Animated) * `stock` (Stock)
304 &quot;startPage&quot;: 42, # The page number of this set of results, where the page length is set by the `count` property.
305 &quot;relatedSite&quot;: &quot;A String&quot;, # Specifies that all search results should be pages that are related to the specified URL. The parameter value should be a URL.
306 &quot;hq&quot;: &quot;A String&quot;, # Appends the specified query terms to the query, as if they were combined with a logical `AND` operator.
307 &quot;cr&quot;: &quot;A String&quot;, # Restricts search results to documents originating in a particular country. You may use [Boolean operators](https://developers.google.com/custom-search/docs/xml_results#booleanOperators) in the `cr` parameter&#x27;s value. Google WebSearch determines the country of a document by analyzing the following: * The top-level domain (TLD) of the document&#x27;s URL. * The geographic location of the web server&#x27;s IP address. See [Country (cr) Parameter Values](https://developers.google.com/custom-search/docs/xml_results#countryCollections) for a list of valid values for this parameter.
308 &quot;siteSearchFilter&quot;: &quot;A String&quot;, # Specifies whether to include or exclude results from the site named in the `sitesearch` parameter. Supported values are: * `i`: include content from site * `e`: exclude content from site
309 &quot;outputEncoding&quot;: &quot;A String&quot;, # The character encoding supported for search results.
310 &quot;gl&quot;: &quot;A String&quot;, # Boosts search results whose country of origin matches the parameter value. See [Country Codes](https://developers.google.com/custom-search/docs/xml_results#countryCodes) for a list of valid values. Specifying a `gl` parameter value in WebSearch requests should improve the relevance of results. This is particularly true for international customers and, even more specifically, for customers in English-speaking countries other than the United States.
311 &quot;cx&quot;: &quot;A String&quot;, # The identifier of an engine created using the Programmable Search Engine [Control Panel](https://programmablesearchengine.google.com/). This is a custom property not defined in the OpenSearch spec. This parameter is **required**.
312 &quot;excludeTerms&quot;: &quot;A String&quot;, # Identifies a word or phrase that should not appear in any documents in the search results.
313 &quot;searchTerms&quot;: &quot;A String&quot;, # The search terms entered by the user.
314 &quot;imgDominantColor&quot;: &quot;A String&quot;, # Restricts results to images with a specific dominant color. Supported values are: * `red` * `orange` * `yellow` * `green` * `teal` * `blue` * `purple` * `pink` * `white` * `gray` * `black` * `brown`
315 &quot;totalResults&quot;: &quot;A String&quot;, # Estimated number of total search results. May not be accurate.
316 &quot;searchType&quot;: &quot;A String&quot;, # Allowed values are `web` or `image`. If unspecified, results are limited to webpages.
317 &quot;imgSize&quot;: &quot;A String&quot;, # Restricts results to images of a specified size. Supported values are: * `icon` (small) * `small | medium | large | xlarge` (medium) * `xxlarge` (large) * `huge` (extra-large)
318 &quot;exactTerms&quot;: &quot;A String&quot;, # Identifies a phrase that all documents in the search results must contain.
319 &quot;language&quot;: &quot;A String&quot;, # The language of the search results.
320 &quot;siteSearch&quot;: &quot;A String&quot;, # Restricts results to URLs from a specified site.
321 &quot;startIndex&quot;: 42, # The index of the current set of search results into the total set of results, where the index of the first result is 1.
322 &quot;title&quot;: &quot;A String&quot;, # A description of the query.
323 &quot;fileType&quot;: &quot;A String&quot;, # Restricts results to files of a specified extension. Filetypes supported by Google include: * Adobe Portable Document Format (`pdf`) * Adobe PostScript (`ps`) * Lotus 1-2-3 (`wk1`, `wk2`, `wk3`, `wk4`, `wk5`, `wki`, `wks`, `wku`) * Lotus WordPro (`lwp`) * Macwrite (`mw`) * Microsoft Excel (`xls`) * Microsoft PowerPoint (`ppt`) * Microsoft Word (`doc`) * Microsoft Works (`wks`, `wps`, `wdb`) * Microsoft Write (`wri`) * Rich Text Format (`rtf`) * Shockwave Flash (`swf`) * Text (`ans`, `txt`). Additional filetypes may be added in the future. An up-to-date list can always be found in Google&#x27;s [file type FAQ](https://support.google.com/webmasters/answer/35287).
324 &quot;highRange&quot;: &quot;A String&quot;, # Specifies the ending value for a search range. Use `cse:lowRange` and `cse:highrange` to append an inclusive search range of `lowRange...highRange` to the query.
325 &quot;filter&quot;: &quot;A String&quot;, # Activates or deactivates the automatic filtering of Google search results. See [Automatic Filtering](https://developers.google.com/custom-search/docs/xml_results#automaticFiltering) for more information about Google&#x27;s search results filters. Valid values for this parameter are: * `0`: Disabled * `1`: Enabled (default) **Note**: By default, Google applies filtering to all search results to improve the quality of those results.
326 &quot;disableCnTwTranslation&quot;: &quot;A String&quot;, # Enables or disables the [Simplified and Traditional Chinese Search](https://developers.google.com/custom-search/docs/xml_results#chineseSearch) feature. Supported values are: * `0`: enabled (default) * `1`: disabled
327 &quot;safe&quot;: &quot;A String&quot;, # Specifies the [SafeSearch level](https://developers.google.com/custom-search/docs/xml_results#safeSearchLevels) used for filtering out adult results. This is a custom property not defined in the OpenSearch spec. Valid parameter values are: * `&quot;off&quot;`: Disable SafeSearch * `&quot;active&quot;`: Enable SafeSearch
328 &quot;lowRange&quot;: &quot;A String&quot;, # Specifies the starting value for a search range. Use `cse:lowRange` and `cse:highrange` to append an inclusive search range of `lowRange...highRange` to the query.
329 &quot;count&quot;: 42, # Number of search results returned in this set.
330 &quot;googleHost&quot;: &quot;A String&quot;, # Specifies the Google domain (for example, google.com, google.de, or google.fr) to which the search should be limited.
331 &quot;inputEncoding&quot;: &quot;A String&quot;, # The character encoding supported for search requests.
332 &quot;orTerms&quot;: &quot;A String&quot;, # Provides additional search terms to check for in a document, where each document in the search results must contain at least one of the additional search terms. You can also use the [Boolean OR](https://developers.google.com/custom-search/docs/xml_results#BooleanOrqt) query term for this type of query.
333 &quot;dateRestrict&quot;: &quot;A String&quot;, # Restricts results to URLs based on date. Supported values include: * `d[number]`: requests results from the specified number of past days. * `w[number]`: requests results from the specified number of past weeks. * `m[number]`: requests results from the specified number of past months. * `y[number]`: requests results from the specified number of past years.
334 &quot;sort&quot;: &quot;A String&quot;, # Specifies that results should be sorted according to the specified expression. For example, sort by date.
335 &quot;rights&quot;: &quot;A String&quot;, # Filters based on licensing. Supported values include: * `cc_publicdomain` * `cc_attribute` * `cc_sharealike` * `cc_noncommercial` * `cc_nonderived`
336 &quot;hl&quot;: &quot;A String&quot;, # Specifies the interface language (host language) of your user interface. Explicitly setting this parameter improves the performance and the quality of your search results. See the [Interface Languages](https://developers.google.com/custom-search/docs/xml_results#wsInterfaceLanguages) section of [Internationalizing Queries and Results Presentation](https://developers.google.com/custom-search/docs/xml_results#wsInternationalizing) for more information, and [Supported Interface Languages](https://developers.google.com/custom-search/docs/xml_results_appendices#interfaceLanguages) for a list of supported languages.
337 &quot;linkSite&quot;: &quot;A String&quot;, # Specifies that all results should contain a link to a specific URL.
338 &quot;imgColorType&quot;: &quot;A String&quot;, # Restricts results to images of a specified color type. Supported values are: * `mono` (black and white) * `gray` (grayscale) * `color` (color)
339 },
340 ],
341 },
342 &quot;context&quot;: { # Metadata and refinements associated with the given search engine, including: * The name of the search engine that was used for the query. * A set of [facet objects](https://developers.google.com/custom-search/docs/refinements#create) (refinements) you can use for refining a search.
343 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
344 },
345 &quot;url&quot;: { # OpenSearch template and URL.
346 &quot;type&quot;: &quot;A String&quot;, # The MIME type of the OpenSearch URL template for the Custom Search JSON API.
347 &quot;template&quot;: &quot;A String&quot;, # The actual [OpenSearch template](http://www.opensearch.org/specifications/opensearch/1.1#opensearch_url_template_syntax) for this API.
348 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700349 &quot;items&quot;: [ # The current set of custom search results.
350 { # A custom search result.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700351 &quot;displayLink&quot;: &quot;A String&quot;, # An abridged version of this search result’s URL, e.g. www.example.com.
352 &quot;htmlSnippet&quot;: &quot;A String&quot;, # The snippet of the search result, in HTML.
353 &quot;kind&quot;: &quot;A String&quot;, # A unique identifier for the type of current object. For this API, it is `customsearch#result.`
354 &quot;cacheId&quot;: &quot;A String&quot;, # Indicates the ID of Google&#x27;s cached version of the search result.
355 &quot;fileFormat&quot;: &quot;A String&quot;, # The file format of the search result.
356 &quot;formattedUrl&quot;: &quot;A String&quot;, # The URL displayed after the snippet for each search result.
357 &quot;snippet&quot;: &quot;A String&quot;, # The snippet of the search result, in plain text.
358 &quot;labels&quot;: [ # Encapsulates all information about [refinement labels](https://developers.google.com/custom-search/docs/xml_results).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700359 { # Refinement label associated with a custom search result.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700360 &quot;label_with_op&quot;: &quot;A String&quot;, # Refinement label and the associated refinement operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700361 &quot;displayName&quot;: &quot;A String&quot;, # The display name of a refinement label. This is the name you should display in your user interface.
362 &quot;name&quot;: &quot;A String&quot;, # The name of a refinement label, which you can use to refine searches. Don&#x27;t display this in your user interface; instead, use displayName.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700363 },
364 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700365 &quot;htmlFormattedUrl&quot;: &quot;A String&quot;, # The HTML-formatted URL displayed after the snippet for each search result.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700366 &quot;image&quot;: { # Image belonging to a custom search result.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700367 &quot;byteSize&quot;: 42, # The size of the image, in pixels.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700368 &quot;contextLink&quot;: &quot;A String&quot;, # A URL pointing to the webpage hosting the image.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700369 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A URL to the thumbnail image.
370 &quot;thumbnailWidth&quot;: 42, # The width of the thumbnail image, in pixels.
371 &quot;height&quot;: 42, # The height of the image, in pixels.
372 &quot;width&quot;: 42, # The width of the image, in pixels.
373 &quot;thumbnailHeight&quot;: 42, # The height of the thumbnail image, in pixels.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700374 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700375 &quot;title&quot;: &quot;A String&quot;, # The title of the search result, in plain text.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700376 &quot;htmlTitle&quot;: &quot;A String&quot;, # The title of the search result, in HTML.
377 &quot;pagemap&quot;: { # Contains [PageMap](https://developers.google.com/custom-search/docs/structured_data#pagemaps) information for this search result.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700378 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
379 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700380 &quot;link&quot;: &quot;A String&quot;, # The full URL to which the search result is pointing, e.g. http://www.example.com/foo/bar.
381 &quot;mime&quot;: &quot;A String&quot;, # The MIME type of the search result.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700382 },
383 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700384 &quot;kind&quot;: &quot;A String&quot;, # Unique identifier for the type of current object. For this API, it is customsearch#search.
John Asmuth614db982014-04-24 15:46:26 -0400385 }</pre>
386</div>
387
388</body></html>