POST /v1/query/search
Changed onThe Cloud Search Query API provides the search method, which returns the most relevant results from a user query. The results can come from Google Workspace apps, such as Gmail or Google Drive, or they can come from data that you have indexed from a third party. Note: This API requires a standard end user account to execute. A service account can't perform Query API requests directly; to use a service account to perform queries, set up Google Workspace domain-wide delegation of authority.
Request
- Base URLhttps://cloudsearch.googleapis.com
- Auth
- OAuth 2 and OAuth 2Implicithttps://accounts.google.com/o/oauth2/authScopeshttps://www.googleapis.com/auth/cloud_searchAuthorization codehttps://accounts.google.com/o/oauth2/authToken URLhttps://accounts.google.com/o/oauth2/tokenScopeshttps://www.googleapis.com/auth/cloud_search
- or OAuth 2 and OAuth 2Implicithttps://accounts.google.com/o/oauth2/authScopeshttps://www.googleapis.com/auth/cloud_search.queryAuthorization codehttps://accounts.google.com/o/oauth2/authToken URLhttps://accounts.google.com/o/oauth2/tokenScopeshttps://www.googleapis.com/auth/cloud_search.query
Query parameters
V1 error format.
OAuth access token.
Data format for response.
JSONP
Selector specifying which fields to include in a partial response.
API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
OAuth 2.0 token for the current user.
Returns response with indentations and line breaks.
Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
Legacy upload protocol for media (e.g. "media", "multipart").
Upload protocol for media (e.g. "raw", "multipart").
Request body
The search API request. NEXT ID: 26
Context attributes for the request which will be used to adjust ranking of search results. The maximum number of elements is 10.
The sources to use for querying. If not specified, all data sources from the current search application are used.
Maximum number of search results to return in one page. Valid values are between 1 and 100, inclusive. Default value is 10. Minimum value is 50 when results beyond 2000 are requested.
The raw query string. See supported search operators in the Narrow your search with operators
Options to interpret user query.
Shared request options for all RPC methods.
Starting index of the results.
Response
Successful response
The search API response. NEXT ID: 22
Debugging information about the response.
Error information about the response.
Repeated facet results.
Whether there are more search results matching the query.
The estimated result count for this query.
The exact result count for this query.
Result count information
Results from a search query.
Suggested spelling for the query.
Structured results for the user query. These results are not counted against the page_size.
Changes
- info
the security scope
https://www.googleapis.com/auth/cloud_searchwas added to the endpoint's security schemeOauth2 - info
the security scope
https://www.googleapis.com/auth/cloud_searchwas added to the endpoint's security schemeOauth2c - info
the security scope
https://www.googleapis.com/auth/cloud_search.querywas removed from the endpoint's security schemeOauth2
1 more change in this revision
- info