Response to a custom search request.
JSON representation |
---|
{ "kind": string, "url": { "type": string, "template": string }, "queries": { "previousPage": [ { "title": string, "totalResults": string, "searchTerms": string, "count": integer, "startIndex": integer, "startPage": integer, "language": string, "inputEncoding": string, "outputEncoding": string, "safe": string, "cx": string, "sort": string, "filter": string, "gl": string, "cr": string, "googleHost": string, "disableCnTwTranslation": string, "hq": string, "hl": string, "siteSearch": string, "siteSearchFilter": string, "exactTerms": string, "excludeTerms": string, "linkSite": string, "orTerms": string, "relatedSite": string, "dateRestrict": string, "lowRange": string, "highRange": string, "fileType": string, "rights": string, "searchType": string, "imgSize": string, "imgType": string, "imgColorType": string, "imgDominantColor": string } ], "request": [ { "title": string, "totalResults": string, "searchTerms": string, "count": integer, "startIndex": integer, "startPage": integer, "language": string, "inputEncoding": string, "outputEncoding": string, "safe": string, "cx": string, "sort": string, "filter": string, "gl": string, "cr": string, "googleHost": string, "disableCnTwTranslation": string, "hq": string, "hl": string, "siteSearch": string, "siteSearchFilter": string, "exactTerms": string, "excludeTerms": string, "linkSite": string, "orTerms": string, "relatedSite": string, "dateRestrict": string, "lowRange": string, "highRange": string, "fileType": string, "rights": string, "searchType": string, "imgSize": string, "imgType": string, "imgColorType": string, "imgDominantColor": string } ], "nextPage": [ { "title": string, "totalResults": string, "searchTerms": string, "count": integer, "startIndex": integer, "startPage": integer, "language": string, "inputEncoding": string, "outputEncoding": string, "safe": string, "cx": string, "sort": string, "filter": string, "gl": string, "cr": string, "googleHost": string, "disableCnTwTranslation": string, "hq": string, "hl": string, "siteSearch": string, "siteSearchFilter": string, "exactTerms": string, "excludeTerms": string, "linkSite": string, "orTerms": string, "relatedSite": string, "dateRestrict": string, "lowRange": string, "highRange": string, "fileType": string, "rights": string, "searchType": string, "imgSize": string, "imgType": string, "imgColorType": string, "imgDominantColor": string } ] }, "promotions": [ { object ( |
Fields | |
---|---|
kind |
Unique identifier for the type of current object. For this API, it is customsearch#search. |
url |
The OpenSearch URL element that defines the template for this API. |
url.type |
The MIME type of the OpenSearch URL template for the Custom Search JSON API. |
url.template |
The actual OpenSearch template for this API. |
queries |
Contains one or more sets of query metadata, keyed by role name. The possible role names include |
queries.previousPage[] |
Metadata representing the previous page of results, if applicable. |
queries.previousPage[].title |
A description of the query. |
queries.previousPage[].totalResults |
Estimated number of total search results. May not be accurate. |
queries.previousPage[].searchTerms |
The search terms entered by the user. |
queries.previousPage[].count |
Number of search results returned in this set. |
queries.previousPage[].startIndex |
The index of the current set of search results into the total set of results, where the index of the first result is 1. |
queries.previousPage[].startPage |
The page number of this set of results, where the page length is set by the |
queries.previousPage[].language |
The language of the search results. |
queries.previousPage[].inputEncoding |
The character encoding supported for search requests. |
queries.previousPage[].outputEncoding |
The character encoding supported for search results. |
queries.previousPage[].safe |
Specifies the SafeSearch level used for filtering out adult results. This is a custom property not defined in the OpenSearch spec. Valid parameter values are:
|
queries.previousPage[].cx |
The identifier of an engine created using the Programmable Search Engine Control Panel. This is a custom property not defined in the OpenSearch spec. This parameter is required. |
queries.previousPage[].sort |
Specifies that results should be sorted according to the specified expression. For example, sort by date. |
queries.previousPage[].filter |
Activates or deactivates the automatic filtering of Google search results. See Automatic Filtering for more information about Google's search results filters. Valid values for this parameter are:
Note: By default, Google applies filtering to all search results to improve the quality of those results. |
queries.previousPage[].gl |
Boosts search results whose country of origin matches the parameter value. See Country Codes for a list of valid values. Specifying a |
queries.previousPage[].cr |
Restricts search results to documents originating in a particular country. You may use Boolean operators in the Google WebSearch determines the country of a document by analyzing the following:
See Country (cr) Parameter Values for a list of valid values for this parameter. |
queries.previousPage[].googleHost |
Specifies the Google domain (for example, google.com, google.de, or google.fr) to which the search should be limited. |
queries.previousPage[].disableCnTwTranslation |
Enables or disables the Simplified and Traditional Chinese Search feature. Supported values are:
|
queries.previousPage[].hq |
Appends the specified query terms to the query, as if they were combined with a logical |
queries.previousPage[].hl |
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 section of Internationalizing Queries and Results Presentation for more information, and Supported Interface Languages for a list of supported languages. |
queries.previousPage[].siteSearch |
Restricts results to URLs from a specified site. |
queries.previousPage[].siteSearchFilter |
Specifies whether to include or exclude results from the site named in the
|
queries.previousPage[].exactTerms |
Identifies a phrase that all documents in the search results must contain. |
queries.previousPage[].excludeTerms |
Identifies a word or phrase that should not appear in any documents in the search results. |
queries.previousPage[].linkSite |
Specifies that all results should contain a link to a specific URL. |
queries.previousPage[].orTerms |
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 query term for this type of query. |
queries.previousPage[].relatedSite |
Specifies that all search results should be pages that are related to the specified URL. The parameter value should be a URL. |
queries.previousPage[].dateRestrict |
Restricts results to URLs based on date. Supported values include:
|
queries.previousPage[].lowRange |
Specifies the starting value for a search range. Use |
queries.previousPage[].highRange |
Specifies the ending value for a search range. Use |
queries.previousPage[].fileType |
Restricts results to files of a specified extension. Filetypes supported by Google include:
Additional filetypes may be added in the future. An up-to-date list can always be found in Google's file type FAQ. |
queries.previousPage[].rights |
Filters based on licensing. Supported values include:
|
queries.previousPage[].searchType |
Allowed values are |
queries.previousPage[].imgSize |
Restricts results to images of a specified size. Supported values are:
|
queries.previousPage[].imgType |
Restricts results to images of a specified type. Supported values are:
|
queries.previousPage[].imgColorType |
Restricts results to images of a specified color type. Supported values are:
|
queries.previousPage[].imgDominantColor |
Restricts results to images with a specific dominant color. Supported values are:
|
queries.request[] |
Metadata representing the current request. |
queries.request[].title |
A description of the query. |
queries.request[].totalResults |
Estimated number of total search results. May not be accurate. |
queries.request[].searchTerms |
The search terms entered by the user. |
queries.request[].count |
Number of search results returned in this set. |
queries.request[].startIndex |
The index of the current set of search results into the total set of results, where the index of the first result is 1. |
queries.request[].startPage |
The page number of this set of results, where the page length is set by the |
queries.request[].language |
The language of the search results. |
queries.request[].inputEncoding |
The character encoding supported for search requests. |
queries.request[].outputEncoding |
The character encoding supported for search results. |
queries.request[].safe |
Specifies the SafeSearch level used for filtering out adult results. This is a custom property not defined in the OpenSearch spec. Valid parameter values are:
|
queries.request[].cx |
The identifier of an engine created using the Programmable Search Engine Control Panel. This is a custom property not defined in the OpenSearch spec. This parameter is required. |
queries.request[].sort |
Specifies that results should be sorted according to the specified expression. For example, sort by date. |
queries.request[].filter |
Activates or deactivates the automatic filtering of Google search results. See Automatic Filtering for more information about Google's search results filters. Valid values for this parameter are:
Note: By default, Google applies filtering to all search results to improve the quality of those results. |
queries.request[].gl |
Boosts search results whose country of origin matches the parameter value. See Country Codes for a list of valid values. Specifying a |
queries.request[].cr |
Restricts search results to documents originating in a particular country. You may use Boolean operators in the Google WebSearch determines the country of a document by analyzing the following:
See Country (cr) Parameter Values for a list of valid values for this parameter. |
queries.request[].googleHost |
Specifies the Google domain (for example, google.com, google.de, or google.fr) to which the search should be limited. |
queries.request[].disableCnTwTranslation |
Enables or disables the Simplified and Traditional Chinese Search feature. Supported values are:
|
queries.request[].hq |
Appends the specified query terms to the query, as if they were combined with a logical |
queries.request[].hl |
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 section of Internationalizing Queries and Results Presentation for more information, and Supported Interface Languages for a list of supported languages. |
queries.request[].siteSearch |
Restricts results to URLs from a specified site. |
queries.request[].siteSearchFilter |
Specifies whether to include or exclude results from the site named in the
|
queries.request[].exactTerms |
Identifies a phrase that all documents in the search results must contain. |
queries.request[].excludeTerms |
Identifies a word or phrase that should not appear in any documents in the search results. |
queries.request[].linkSite |
Specifies that all results should contain a link to a specific URL. |
queries.request[].orTerms |
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 query term for this type of query. |
queries.request[].relatedSite |
Specifies that all search results should be pages that are related to the specified URL. The parameter value should be a URL. |
queries.request[].dateRestrict |
Restricts results to URLs based on date. Supported values include:
|
queries.request[].lowRange |
Specifies the starting value for a search range. Use |
queries.request[].highRange |
Specifies the ending value for a search range. Use |
queries.request[].fileType |
Restricts results to files of a specified extension. Filetypes supported by Google include:
Additional filetypes may be added in the future. An up-to-date list can always be found in Google's file type FAQ. |
queries.request[].rights |
Filters based on licensing. Supported values include:
|
queries.request[].searchType |
Allowed values are |
queries.request[].imgSize |
Restricts results to images of a specified size. Supported values are:
|
queries.request[].imgType |
Restricts results to images of a specified type. Supported values are:
|
queries.request[].imgColorType |
Restricts results to images of a specified color type. Supported values are:
|
queries.request[].imgDominantColor |
Restricts results to images with a specific dominant color. Supported values are:
|
queries.nextPage[] |
Metadata representing the next page of results, if applicable. |
queries.nextPage[].title |
A description of the query. |
queries.nextPage[].totalResults |
Estimated number of total search results. May not be accurate. |
queries.nextPage[].searchTerms |
The search terms entered by the user. |
queries.nextPage[].count |
Number of search results returned in this set. |
queries.nextPage[].startIndex |
The index of the current set of search results into the total set of results, where the index of the first result is 1. |
queries.nextPage[].startPage |
The page number of this set of results, where the page length is set by the |
queries.nextPage[].language |
The language of the search results. |
queries.nextPage[].inputEncoding |
The character encoding supported for search requests. |
queries.nextPage[].outputEncoding |
The character encoding supported for search results. |
queries.nextPage[].safe |
Specifies the SafeSearch level used for filtering out adult results. This is a custom property not defined in the OpenSearch spec. Valid parameter values are:
|
queries.nextPage[].cx |
The identifier of an engine created using the Programmable Search Engine Control Panel. This is a custom property not defined in the OpenSearch spec. This parameter is required. |
queries.nextPage[].sort |
Specifies that results should be sorted according to the specified expression. For example, sort by date. |
queries.nextPage[].filter |
Activates or deactivates the automatic filtering of Google search results. See Automatic Filtering for more information about Google's search results filters. Valid values for this parameter are:
Note: By default, Google applies filtering to all search results to improve the quality of those results. |
queries.nextPage[].gl |
Boosts search results whose country of origin matches the parameter value. See Country Codes for a list of valid values. Specifying a |
queries.nextPage[].cr |
Restricts search results to documents originating in a particular country. You may use Boolean operators in the Google WebSearch determines the country of a document by analyzing the following:
See Country (cr) Parameter Values for a list of valid values for this parameter. |
queries.nextPage[].googleHost |
Specifies the Google domain (for example, google.com, google.de, or google.fr) to which the search should be limited. |
queries.nextPage[].disableCnTwTranslation |
Enables or disables the Simplified and Traditional Chinese Search feature. Supported values are:
|
queries.nextPage[].hq |
Appends the specified query terms to the query, as if they were combined with a logical |
queries.nextPage[].hl |
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 section of Internationalizing Queries and Results Presentation for more information, and Supported Interface Languages for a list of supported languages. |
queries.nextPage[].siteSearch |
Restricts results to URLs from a specified site. |
queries.nextPage[].siteSearchFilter |
Specifies whether to include or exclude results from the site named in the
|
queries.nextPage[].exactTerms |
Identifies a phrase that all documents in the search results must contain. |
queries.nextPage[].excludeTerms |
Identifies a word or phrase that should not appear in any documents in the search results. |
queries.nextPage[].linkSite |
Specifies that all results should contain a link to a specific URL. |
queries.nextPage[].orTerms |
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 query term for this type of query. |
queries.nextPage[].relatedSite |
Specifies that all search results should be pages that are related to the specified URL. The parameter value should be a URL. |
queries.nextPage[].dateRestrict |
Restricts results to URLs based on date. Supported values include:
|
queries.nextPage[].lowRange |
Specifies the starting value for a search range. Use |
queries.nextPage[].highRange |
Specifies the ending value for a search range. Use |
queries.nextPage[].fileType |
Restricts results to files of a specified extension. Filetypes supported by Google include:
Additional filetypes may be added in the future. An up-to-date list can always be found in Google's file type FAQ. |
queries.nextPage[].rights |
Filters based on licensing. Supported values include:
|
queries.nextPage[].searchType |
Allowed values are |
queries.nextPage[].imgSize |
Restricts results to images of a specified size. Supported values are:
|
queries.nextPage[].imgType |
Restricts results to images of a specified type. Supported values are:
|
queries.nextPage[].imgColorType |
Restricts results to images of a specified color type. Supported values are:
|
queries.nextPage[].imgDominantColor |
Restricts results to images with a specific dominant color. Supported values are:
|
promotions[] |
The set of promotions. Present only if the custom search engine's configuration files define any promotions for the given query. |
context |
Metadata and refinements associated with the given search engine, including:
|
searchInformation |
Metadata about about this search, including search time and total results. |
searchInformation.searchTime |
The time taken for the server to return search results. |
searchInformation.formattedSearchTime |
The time taken for the server to return search results, formatted according to locale style. |
searchInformation.totalResults |
The total number of search results returned by the query. |
searchInformation.formattedTotalResults |
The total number of search results, formatted according to locale style. |
spelling |
Encapsulates a corrected query. |
spelling.correctedQuery |
The corrected query. |
spelling.htmlCorrectedQuery |
The corrected query, formatted in HTML. |
items[] |
The current set of custom search results. |
Promotion
Promotion result.
JSON representation |
---|
{ "title": string, "htmlTitle": string, "link": string, "displayLink": string, "bodyLines": [ { "title": string, "htmlTitle": string, "url": string, "link": string } ], "image": { "source": string, "width": integer, "height": integer } } |
Fields | |
---|---|
title |
The title of the promotion. |
htmlTitle |
The title of the promotion, in HTML. |
link |
The URL of the promotion. |
displayLink |
An abridged version of this search's result URL, e.g. www.example.com. |
bodyLines[] |
An array of block objects for this promotion. |
bodyLines[].title |
The block object's text, if it has text. |
bodyLines[].htmlTitle |
The block object's text in HTML, if it has text. |
bodyLines[].url |
The URL of the block object's link, if it has one. |
bodyLines[].link |
The anchor text of the block object's link, if it has a link. |
image |
Image associated with this promotion, if there is one. |
image.source |
URL of the image for this promotion link. |
image.width |
Image width in pixels. |
image.height |
Image height in pixels. |
Result
A custom search result.
JSON representation |
---|
{ "kind": string, "title": string, "htmlTitle": string, "link": string, "displayLink": string, "snippet": string, "htmlSnippet": string, "cacheId": string, "formattedUrl": string, "htmlFormattedUrl": string, "pagemap": { object }, "mime": string, "fileFormat": string, "image": { "contextLink": string, "height": integer, "width": integer, "byteSize": integer, "thumbnailLink": string, "thumbnailHeight": integer, "thumbnailWidth": integer }, "labels": [ { "name": string, "displayName": string, "label_with_op": string } ] } |
Fields | |
---|---|
kind |
A unique identifier for the type of current object. For this API, it is |
title |
The title of the search result, in plain text. |
htmlTitle |
The title of the search result, in HTML. |
link |
The full URL to which the search result is pointing, e.g. http://www.example.com/foo/bar. |
displayLink |
An abridged version of this search result’s URL, e.g. www.example.com. |
snippet |
The snippet of the search result, in plain text. |
htmlSnippet |
The snippet of the search result, in HTML. |
cacheId |
Indicates the ID of Google's cached version of the search result. |
formattedUrl |
The URL displayed after the snippet for each search result. |
htmlFormattedUrl |
The HTML-formatted URL displayed after the snippet for each search result. |
pagemap |
Contains PageMap information for this search result. |
mime |
The MIME type of the search result. |
fileFormat |
The file format of the search result. |
image |
Encapsulates all information about an image returned in search results. |
image.contextLink |
A URL pointing to the webpage hosting the image. |
image.height |
The height of the image, in pixels. |
image.width |
The width of the image, in pixels. |
image.byteSize |
The size of the image, in bytes. |
image.thumbnailLink |
A URL to the thumbnail image. |
image.thumbnailHeight |
The height of the thumbnail image, in pixels. |
image.thumbnailWidth |
The width of the thumbnail image, in pixels. |
labels[] |
Encapsulates all information about refinement labels. |
labels[].name |
The name of a refinement label, which you can use to refine searches. Don't display this in your user interface; instead, use displayName. |
labels[].displayName |
The display name of a refinement label. This is the name you should display in your user interface. |
labels[].label_with_op |
Refinement label and the associated refinement operation. |