Returns metadata about the search performed, metadata about the engine used for the search, and the search results. Uses a small set of url patterns.
HTTP request
GET https://customsearch.googleapis.com/customsearch/v1/siterestrict
The URL uses gRPC Transcoding syntax.
Query parameters
Parameters | |
---|---|
c2coff |
Enables or disables Simplified and Traditional Chinese Search. The default value for this parameter is 0 (zero), meaning that the feature is enabled. Supported values are:
|
cr |
Restricts search results to documents originating in a particular country. You may use Boolean operators in the cr parameter's value. Google Search determines the country of a document by analyzing:
See the Country Parameter Values page for a list of valid values for this parameter. |
cx |
The Programmable Search Engine ID to use for this request. |
dateRestrict |
Restricts results to URLs based on date. Supported values include:
|
exactTerms |
Identifies a phrase that all documents in the search results must contain. |
excludeTerms |
Identifies a word or phrase that should not appear in any documents in the search results. |
fileType |
Restricts results to files of a specified extension. A list of file types indexable by Google can be found in Search Console Help Center. |
filter |
Controls turning on or off the duplicate content filter.
Acceptable values are:
|
gl |
Geolocation of end user.
|
googlehost |
Deprecated. Use the The local Google domain (for example, google.com, google.de, or google.fr) to use to perform the search. |
highRange |
Specifies the ending value for a search range.
|
hl |
Sets the user interface language.
|
hq |
Appends the specified query terms to the query, as if they were combined with a logical AND operator. |
imgColorType |
Returns black and white, grayscale, transparent, or color images. Acceptable values are:
|
imgDominantColor |
Returns images of a specific dominant color. Acceptable values are:
|
imgSize |
Returns images of a specified size. Acceptable values are:
|
imgType |
Returns images of a type. Acceptable values are:
|
linkSite |
Specifies that all search results should contain a link to a particular URL. |
lowRange |
Specifies the starting value for a search range. Use |
lr |
Restricts the search to documents written in a particular language (e.g., Acceptable values are:
|
num |
Number of search results to return.
|
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. |
q |
Query |
relatedSite |
Deprecated. |
rights |
Filters based on licensing. Supported values include: |
safe |
Search safety level. Acceptable values are:
|
searchType |
Specifies the search type: Acceptable values are:
|
siteSearch |
Specifies a given site which should always be included or excluded from results (see |
siteSearchFilter |
Controls whether to include or exclude results from the site named in the Acceptable values are:
|
sort |
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. |
start |
The index of the first result to return. The default number of results per page is 10, so |
Request body
The request body must be empty.
Response body
If successful, the response body contains an instance of Search
.
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cse
For more information, see the OAuth 2.0 Overview.