Web Search API, gRPC: WebSearchAsyncService.Search
gRPC request
rpc Search (WebSearchRequest) returns (operation.Operation)
WebSearchRequest
{
"query": {
"search_type": "SearchType",
"query_text": "string",
"family_mode": "FamilyMode",
"page": "int64",
"fix_typo_mode": "FixTypoMode"
},
"sort_spec": {
"sort_mode": "SortMode",
"sort_order": "SortOrder"
},
"group_spec": {
"group_mode": "GroupMode",
"groups_on_page": "int64",
"docs_in_group": "int64"
},
"max_passages": "int64",
"region": "string",
"l10n": "Localization",
"folder_id": "string",
"response_format": "Format",
"user_agent": "string"
}
Field |
Description |
query |
Required field. Search query. |
sort_spec |
The rules for sorting search results that define the sequence of the returned search results. |
group_spec |
Grouping settings that are used to group documents from a single domain into a container. |
max_passages |
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.
|
folder_id |
string ID of the folder. |
response_format |
enum Format Search results format.
|
user_agent |
string User-Agent request header value. |
SearchQuery
Field |
Description |
search_type |
enum SearchType Required field. Search type that determines the domain name that will be used for the search queries.
|
query_text |
string Required field. Search query text |
family_mode |
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 |
fix_typo_mode |
enum FixTypoMode Typos autocorrections mode
|
SortSpec
Field |
Description |
sort_mode |
enum SortMode Documents sorting mode.
|
sort_order |
enum SortOrder Documents sorting order.
|
GroupSpec
Field |
Description |
group_mode |
enum GroupMode Grouping method.
|
groups_on_page |
int64 Maximum number of groups that can be returned per page with search results. |
docs_in_group |
int64 Maximum number of documents that can be returned per group. |
operation.Operation
{
"id": "string",
"description": "string",
"created_at": "google.protobuf.Timestamp",
"created_by": "string",
"modified_at": "google.protobuf.Timestamp",
"done": "bool",
"metadata": "google.protobuf.Any",
// Includes only one of the fields `error`, `response`
"error": "google.rpc.Status",
"response": {
"raw_data": "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. |
created_at |
Creation timestamp. |
created_by |
string ID of the user or service account who initiated the operation. |
modified_at |
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 |
raw_data |
bytes Required field. Search results, either in XML or HTML format depending on the request settings. |