Web Search API, gRPC: WebSearchAsyncService.Search
gRPC request
rpc Search (WebSearchRequest) returns (operation.Operation)
WebSearchRequest
{
"query": {
"searchType": "SearchType",
"queryText": "string",
"familyMode": "FamilyMode",
"page": "int64"
},
"sortSpec": {
"sortMode": "SortMode",
"sortOrder": "SortOrder"
},
"groupSpec": {
"groupMode": "GroupMode",
"groupsOnPage": "int64",
"docsInGroup": "int64"
},
"maxPassages": "int64",
"region": "string",
"l10n": "Localization",
"folderId": "string"
}
Field |
Description |
query |
Required field. Search query. |
sortSpec |
The rules for sorting search results that define the sequence of the returned search results. |
groupSpec |
Grouping settings that are used to group documents from a single domain into a container. |
maxPassages |
int64 The maximum number of passages that can be used when generating a document snippet. |
region |
string ID of the search country or region that impacts the document ranking rules. |
l10n |
enum Localization The notification language for a search response.
|
folderId |
string ID of the folder. |
SearchQuery
Field |
Description |
searchType |
enum SearchType Required field. Search type that determines the domain name that will be used for the search queries.
|
queryText |
string Required field. Search query text |
familyMode |
enum FamilyMode Rule for filtering search results and determines whether any documents should be excluded.
|
page |
int64 The number of a requested page with search results |
SortSpec
Field |
Description |
sortMode |
enum SortMode Documents sorting mode.
|
sortOrder |
enum SortOrder Documents sorting order.
|
GroupSpec
Field |
Description |
groupMode |
enum GroupMode Grouping method.
|
groupsOnPage |
int64 Maximum number of groups that can be returned per page with search results. |
docsInGroup |
int64 Maximum number of documents that can be returned per group. |
operation.Operation
{
"id": "string",
"description": "string",
"createdAt": "google.protobuf.Timestamp",
"createdBy": "string",
"modifiedAt": "google.protobuf.Timestamp",
"done": "bool",
"metadata": "google.protobuf.Any",
// Includes only one of the fields `error`, `response`
"error": "google.rpc.Status",
"response": {
"rawData": "bytes"
}
// end of the list of possible fields
}
An Operation resource. For more information, see Operation.
Field |
Description |
id |
string ID of the operation. |
description |
string Description of the operation. 0-256 characters long. |
createdAt |
Creation timestamp. |
createdBy |
string ID of the user or service account who initiated the operation. |
modifiedAt |
The time when the Operation resource was last modified. |
done |
bool If the value is |
metadata |
Service-specific metadata associated with the operation. |
error |
The error result of the operation in case of failure or cancellation. Includes only one of the fields The operation result. |
response |
The normal response of the operation in case of success. Includes only one of the fields The operation result. |
WebSearchResponse
Field |
Description |
rawData |
bytes Required field. Search results, usually in XML format. |