Yandex Cloud
Search
Contact UsTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Yandex Search API
  • Getting started
  • Access management
  • Pricing policy
    • Authentication in the API
        • Overview
          • Overview
          • Search
  • Audit Trails events
  • Release notes

In this article:

  • HTTP request
  • Body parameters
  • SearchQuery
  • SortSpec
  • GroupSpec
  • SearchMetadata
  • Response
  1. API reference
  2. API
  3. REST
  4. WebSearch
  5. Search

Web Search API, REST: WebSearch.Search

Written by
Yandex Cloud
Updated at December 15, 2025
  • HTTP request
  • Body parameters
  • SearchQuery
  • SortSpec
  • GroupSpec
  • SearchMetadata
  • Response

HTTP requestHTTP request

POST https://searchapi.api.cloud.yandex.net/v2/web/search

Body parametersBody 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

SearchQuery

Required field. Search query.

sortSpec

SortSpec

The rules for sorting search results that define the sequence of the returned search results.

groupSpec

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.

Acceptable values are 1 to 5, inclusive.

region

string

ID of the search country or region that impacts the document ranking rules.

The maximum string length in characters is 100.

l10n

enum (Localization)

The notification language for a search response.

  • LOCALIZATION_RU: Russian (default value)
  • LOCALIZATION_UK: Ukrainian
  • LOCALIZATION_BE: Belarusian
  • LOCALIZATION_KK: Kazakh
  • LOCALIZATION_TR: Turkish
  • LOCALIZATION_EN: English

folderId

string

ID of the folder.

The maximum string length in characters is 50.

responseFormat

enum (Format)

Search results format.

  • FORMAT_XML: XML format (default value)
  • FORMAT_HTML: HTML format

userAgent

string

User-Agent request header value.

The maximum string length in characters is 300.

metadata

SearchMetadata

Search flags

SearchQuerySearchQuery

Field

Description

searchType

enum (SearchType)

Required field. Search type that determines the domain name that will be used for the search queries.

  • SEARCH_TYPE_RU: Russian search type (default), yandex.ru search domain name will be used.
  • SEARCH_TYPE_TR: Turkish search type, yandex.tr search domain name will be used.
  • SEARCH_TYPE_COM: International search type, yandex.com search domain name will be used.
  • SEARCH_TYPE_KK: Kazakh search type, yandex.kz search domain name will be used.
  • SEARCH_TYPE_BE: Belarusian search type, yandex.by search domain name will be used.
  • SEARCH_TYPE_UZ: Uzbek search type, yandex.uz search domain name will be used.

queryText

string

Required field. Search query text

The maximum string length in characters is 400.

familyMode

enum (FamilyMode)

Rule for filtering search results and determines whether any documents should be excluded.

  • FAMILY_MODE_NONE: Filtering is disabled. Search results include any documents regardless of their contents.
  • FAMILY_MODE_MODERATE: Moderate filter (default value). Documents of the Adult category are excluded from search results
    unless a query is explicitly made for searching resources of this category.
  • FAMILY_MODE_STRICT: Regardless of a search query, documents of the Adult category
    and those with profanity are excluded from search results.

page

string (int64)

The number of a requested page with search results

The minimum value is 0.

fixTypoMode

enum (FixTypoMode)

Typos autocorrections mode

  • FIX_TYPO_MODE_ON: Automatically correct typos (default value).
  • FIX_TYPO_MODE_OFF: Autocorrection is off.

SortSpecSortSpec

Field

Description

sortMode

enum (SortMode)

Documents sorting mode.

  • SORT_MODE_BY_RELEVANCE: Sort documents by relevance (default value).
  • SORT_MODE_BY_TIME: Sort documents by update time.

sortOrder

enum (SortOrder)

Documents sorting order.

  • SORT_ORDER_ASC: Reverse order from oldest to most recent.
  • SORT_ORDER_DESC: Direct order from most recent to oldest (default).

GroupSpecGroupSpec

Field

Description

groupMode

enum (GroupMode)

Grouping method.

  • GROUP_MODE_FLAT: Flat grouping. Each group contains a single document.
  • GROUP_MODE_DEEP: Grouping by domain. Each group contains documents from one domain.

groupsOnPage

string (int64)

Maximum number of groups that can be returned per page with search results.

Acceptable values are 1 to 100, inclusive.

docsInGroup

string (int64)

Maximum number of documents that can be returned per group.

Acceptable values are 1 to 3, inclusive.

SearchMetadataSearchMetadata

Field

Description

fields

object (map<string, string>)

Search flags, key:value pairs.
No more than 64.
The maximum string length in characters for each value is 63.
Each value must match the regular expression [-_0-9a-z]*.
The string length in characters for each key must be 1-63.
Each key must match the regular expression [a-z][-_0-9a-z]*.

No more than 64 per resource. The maximum string length in characters for each value is 63. Each value must match the regular expression [-_0-9a-z]*. The string length in characters for each key must be 1-63. Each key must match the regular expression [a-z][-_0-9a-z]*.

ResponseResponse

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.

Was the article helpful?

Previous
Overview
Next
Overview
© 2025 Direct Cursus Technology L.L.C.