Web Search API, REST: WebSearch.Search
HTTP request
POST https://searchapi.api.cloud.yandex.net/v2/web/search
Body parameters
{
"query": {
"searchType": "string",
"queryText": "string",
"familyMode": "string",
"page": "string",
"fixTypoMode": "string"
},
"sortSpec": {
"sortMode": "string",
"sortOrder": "string"
},
"groupSpec": {
"groupMode": "string",
"groupsOnPage": "string",
"docsInGroup": "string"
},
"maxPassages": "string",
"region": "string",
"l10n": "string",
"folderId": "string",
"responseFormat": "string",
"userAgent": "string",
"metadata": {
"fields": "object"
}
}
|
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 |
string (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. |
|
responseFormat |
enum (Format) Search results format.
|
|
userAgent |
string User-Agent request header value. |
|
metadata |
Search flags |
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 |
string (int64) The number of a requested page with search results |
|
fixTypoMode |
enum (FixTypoMode) Typos autocorrections mode
|
SortSpec
|
Field |
Description |
|
sortMode |
enum (SortMode) Documents sorting mode.
|
|
sortOrder |
enum (SortOrder) Documents sorting order.
|
GroupSpec
|
Field |
Description |
|
groupMode |
enum (GroupMode) Grouping method.
|
|
groupsOnPage |
string (int64) Maximum number of groups that can be returned per page with search results. |
|
docsInGroup |
string (int64) Maximum number of documents that can be returned per group. |
SearchMetadata
|
Field |
Description |
|
fields |
object (map<string, string>) Search flags, |
Response
HTTP Code: 200 - OK
{
"rawData": "string"
}
|
Field |
Description |
|
rawData |
string (bytes) Required field. Search results, either in XML or HTML format depending on the request settings. |