Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Search API
  • Access management
  • Pricing policy
    • Authentication with the API v2
        • Overview
          • Overview
          • Search
  • Audit Trails events

In this article:

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

Web Search API, REST: WebSearch.Search

Written by
Yandex Cloud
Updated at April 8, 2025
  • HTTP request
  • Body parameters
  • SearchQuery
  • SortSpec
  • GroupSpec
  • Response

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"
}

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.

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.

  • LOCALIZATION_UNSPECIFIED
  • 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.

responseFormat

enum (Format)

Search results format.

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

userAgent

string

User-Agent request header value.

SearchQuery

Field

Description

searchType

enum (SearchType)

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

  • SEARCH_TYPE_UNSPECIFIED
  • 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.

queryText

string

Required field. Search query text

familyMode

enum (FamilyMode)

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

  • FAMILY_MODE_UNSPECIFIED
  • 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

fixTypoMode

enum (FixTypoMode)

Typos autocorrections mode

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

SortSpec

Field

Description

sortMode

enum (SortMode)

Documents sorting mode.

  • SORT_MODE_UNSPECIFIED
  • 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_UNSPECIFIED
  • SORT_ORDER_ASC: Reverse order from oldest to most recent.
  • SORT_ORDER_DESC: Direct order from most recent to oldest (default).

GroupSpec

Field

Description

groupMode

enum (GroupMode)

Grouping method.

  • GROUP_MODE_UNSPECIFIED
  • 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.

docsInGroup

string (int64)

Maximum number of documents that can be returned per group.

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.

Was the article helpful?

Previous
Overview
Next
Audit Trails events
Yandex project
© 2025 Yandex.Cloud LLC