Search

Search wiki page text.

Request

POST

https://api.wiki.yandex.net/v1/search

Body

application/json
{
  "query": "example",
  "filters": {
    "type": "file",
    "authors": [
      {
        "uid": "example",
        "cloud_uid": "example"
      }
    ],
    "cluster": "example",
    "created_at": {
      "from": "2025-01-01T00:00:00Z",
      "to": "2025-01-01T00:00:00Z"
    },
    "modified_at": null,
    "show_obsolete": false
  },
  "cursor": 1,
  "limit": 10,
  "order_by": "relevancy",
  "highlight": false
}

Name

Description

query

Type: string

Example: example

cursor

Type: integer

Cursor for retrieving a page of results

Default: 1

Min value: 1

Max value: 500

filters

Type: SearchFilters

Search query conditions.

Example
{
  "type": "file",
  "authors": [
    {
      "uid": "example",
      "cloud_uid": "example"
    }
  ],
  "cluster": "example",
  "created_at": {
    "from": "2025-01-01T00:00:00Z",
    "to": "2025-01-01T00:00:00Z"
  },
  "modified_at": null,
  "show_obsolete": false
}

highlight

Type: boolean

Highlight text fragments that match the query

Default: false

limit

Type: integer

Number of results per page of results

Default: 10

Min value: 1

Max value: 50

order_by

All of 1 type
  • OrderType

    Type: OrderType

    Sort order for the results.

    Enum: relevancy, creation_date, modified_date

Default: relevancy

SearchDocumentType

Resource type for search.

Type: string

Enum: file, page

UserIdentity

User identifier

Name

Description

cloud_uid

Type: string

User identifier in the cloud

Example: example

uid

Type: string

User identifier

Example: example

Example
{
  "uid": "example",
  "cloud_uid": "example"
}

DateInterval

Name

Description

from

Type: string<date-time>

Example: 2025-01-01T00:00:00Z

to

Type: string<date-time>

Example: 2025-01-01T00:00:00Z

Example
{
  "from": "2025-01-01T00:00:00Z",
  "to": "2025-01-01T00:00:00Z"
}

SearchFilters

Search query conditions.

Name

Description

authors

Type: UserIdentity[]

Example
[
  {
    "uid": "example",
    "cloud_uid": "example"
  }
]

cluster

Type: string

Min length: 1

Max length: 255

Example: example

created_at

Type: DateInterval

Example
{
  "from": "2025-01-01T00:00:00Z",
  "to": "2025-01-01T00:00:00Z"
}

modified_at

Type: DateInterval

Example
{
  "from": "2025-01-01T00:00:00Z",
  "to": "2025-01-01T00:00:00Z"
}

show_obsolete

Type: boolean

Default: false

type

Type: SearchDocumentType

Resource type for search.

Enum: file, page

Example
{
  "type": "file",
  "authors": [
    {
      "uid": "example",
      "cloud_uid": "example"
    }
  ],
  "cluster": "example",
  "created_at": {
    "from": "2025-01-01T00:00:00Z",
    "to": "2025-01-01T00:00:00Z"
  },
  "modified_at": null,
  "show_obsolete": false
}

OrderType

Sort order for the results.

Type: string

Enum: relevancy, creation_date, modified_date

Responses

200 OK

OK

Body

application/json
{
  "results": [
    {
      "url": "example",
      "slug": "example",
      "title": "example",
      "content": "example",
      "type": "file",
      "modified_at": "2025-01-01T00:00:00Z"
    }
  ],
  "next_cursor": "example",
  "prev_cursor": "example"
}

Name

Description

results

Type: SearchQueryResponseResult[]

Example
[
  {
    "url": "example",
    "slug": "example",
    "title": "example",
    "content": "example",
    "type": "file",
    "modified_at": "2025-01-01T00:00:00Z"
  }
]

next_cursor

Type: string

Example: example

prev_cursor

Type: string

Example: example

SearchQueryResponseResult

Name

Description

content

Type: string

Example: example

modified_at

Type: string<date-time>

Example: 2025-01-01T00:00:00Z

slug

Type: string

Example: example

title

Type: string

Example: example

type

Type: SearchDocumentType

Resource type for search.

Enum: file, page

url

Type: string

Example: example

Example
{
  "url": "example",
  "slug": "example",
  "title": "example",
  "content": "example",
  "type": "file",
  "modified_at": "2025-01-01T00:00:00Z"
}