Web Search API, gRPC: WebSearchService.Search
gRPC request
rpc Search (WebSearchRequest) returns (WebSearchResponse)
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. |
WebSearchResponse
{
"raw_data": "bytes"
}
Field |
Description |
raw_data |
bytes Required field. Search results, either in XML or HTML format depending on the request settings. |