---
title: "Search"
method: POST
path: "/search"
tags: ["Search"]
---

# Search

`POST /search`

Search lines by email/password/domain.

## Request body

- object
  - `searchBy` 'email' | 'password' | 'domain', required — Search type. Search Priority: - **searchBy: email** - `email`, then `password`. - **searchBy: password** - `password`, then `email`. - **searchBy: domain** - `domain`, then `email`, then `password`.
  - `query` object, required — Search query
    - `email` string
    - `password` string
    - `domain` string
  - `direction` object — Search direction To use `all` - Premium required
    - `email` 'all' | 'start' | 'strict'
    - `password` 'all' | 'start' | 'strict'
    - `domain` 'all' | 'start' | 'strict' | 'end'
  - `order` 'asc' | 'desc' — [**Premium** subscription required] If you specify DESC order, then most likely you will have a couple of results. Everything is fine and it should be. To get more results - you need to disable fuses by specifying `all` in `direction` for your query field. Or if the request field is `strict`, then specify `fromLastValueOfKey` equal to true.
  - `fromLastValueOfKey` boolean — [**Premium** subscription required] When using this option and "strict direction" the starting position starts from the last value of the key. For example, we have *email:pass1*, *email:pass2*, *email:pass3*. Then when setting `query` = email, `direction` = strict, `fromLastValueOfKey` = true the first result obtained will be `email:pass3`.
  - `groupBy` 'login@domain' | 'domain' | 'password' — [**Premium** subscription required] This option allows you to remove "duplicates". Only the first found line corresponding to the grouping will be returned and will move on to the next value. Can be used in the following cases: - **searchBy: email** - `login@domain`. - **searchBy: password** - `password`. - **searchBy: domain** - `domain`, `login@domain`.
  - `format` 'login@domain:password' | 'login@domain' | 'login' | 'domain' | 'password' — The format of the returned results. Allows you to quickly leave the most necessary without post-processing. When used correctly together with `groupBy`, the execution time of a database search query can be accelerated by eliminating JOIN operations on the server.
  - `pageToken` string — The page token that was returned in the previous request. The token will be considered invalid if any of the request parameters change.

## Response `200`

Successful response

- object
  - `success` boolean
  - `availableQueries` integer
  - `resultCount` integer
  - `maxCount` integer, nullable — Available only when each `query` element related to `direction` is equal to `strict`
  - `results` string[]
  - `page` object, nullable
    - `totalResults` integer
    - `pageNumber` integer
    - `nextPageToken` string

## Other responses

- `403` — Error response

---

[API](https://skmtc.net/antipublic/apis/antipublic-one-api.md) · [All operations](https://skmtc.net/antipublic/apis/antipublic-one-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/antipublic/antipublic-one-api/revisions/c78135b04d38/schema)
