---
title: "Candidates search"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.sureshake.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Sureshake API › search

`POST /v2/search/candidates`

## Request body

- `query` (`search-candidates.query`; string, optional) — Full-text search query
- `skills` (`search-candidates.skills`; array<string>, optional) — Required skill names
- `jobTitles` (`search-candidates.jobTitles`; array<string>, optional) — Current or past job titles
- `companies` (`search-candidates.companies`; array<string>, optional) — Company names or entity IDs
- `educationDegrees` (`search-candidates.educationDegrees`; array<string>, optional) — Education degrees
- `educationFields` (`search-candidates.educationFields`; array<string>, optional) — Education fields
- `locations` (`search-candidates.locations`; array<string>, optional) — Cities or countries
- `experienceYears` (`search-candidates.experienceYears`; object, optional) — Years of experience range
  - `min` (`search-candidates.experienceYears.min`; number, optional)
  - `max` (`search-candidates.experienceYears.max`; number, optional)
- `hasPortfolio` (`search-candidates.hasPortfolio`; boolean, optional)
- `isOpenToWork` (`search-candidates.isOpenToWork`; boolean, optional)
- `limit` (`search-candidates.limit`; number, optional)
  - min 1; max 100; default `20`
- `offset` (`search-candidates.offset`; number, optional)
  - min 0; default `0`

## Example request

```json
{
  "query": "string",
  "skills": [
    "string"
  ],
  "jobTitles": [
    "string"
  ],
  "companies": [
    "string"
  ],
  "educationDegrees": [
    "string"
  ],
  "educationFields": [
    "string"
  ],
  "locations": [
    "string"
  ],
  "experienceYears": {
    "min": 0,
    "max": 0
  },
  "hasPortfolio": true,
  "isOpenToWork": true,
  "limit": 20,
  "offset": 0
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url https://api.sureshake.com/v2/search/candidates \
  --header 'Content-Type: application/json' \
  --data '
{
  "query": "string",
  "skills": [
    "string"
  ],
  "jobTitles": [
    "string"
  ],
  "companies": [
    "string"
  ],
  "educationDegrees": [
    "string"
  ],
  "educationFields": [
    "string"
  ],
  "locations": [
    "string"
  ],
  "experienceYears": {
    "min": 0,
    "max": 0
  },
  "hasPortfolio": true,
  "isOpenToWork": true,
  "limit": 20,
  "offset": 0
}
'
```

### TypeScript

```typescript
const url = 'https://api.sureshake.com/v2/search/candidates';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({
    query: 'string',
    skills: ['string'],
    jobTitles: ['string'],
    companies: ['string'],
    educationDegrees: ['string'],
    educationFields: ['string'],
    locations: ['string'],
    experienceYears: {min: 0, max: 0},
    hasPortfolio: true,
    isOpenToWork: true,
    limit: 20,
    offset: 0
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.sureshake.com/v2/search/candidates"

payload = {
    "query": "string",
    "skills": ["string"],
    "jobTitles": ["string"],
    "companies": ["string"],
    "educationDegrees": ["string"],
    "educationFields": ["string"],
    "locations": ["string"],
    "experienceYears": {
        "min": 0,
        "max": 0
    },
    "hasPortfolio": True,
    "isOpenToWork": True,
    "limit": 20,
    "offset": 0
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

Default Response

#### Example

```json
{
  "candidates": [
    {
      "id": "string",
      "name": "string",
      "slug": "string",
      "avatar": "string",
      "bio": "string",
      "title": "string",
      "company": "string",
      "location": "string",
      "currentJob": {
        "title": "string",
        "companyName": "string"
      },
      "topSkills": [
        "string"
      ],
      "yearsExperience": 0,
      "matchScore": 0
    }
  ],
  "total": 0,
  "hasMore": true,
  "ranking": {
    "strategy": "postgres_english_websearch",
    "queryApplied": true
  }
}
```

- `candidates` (`search-candidates.response.200.candidates`; array<object>, required)
  - `id` (`search-candidates.response.200.candidates.id`; string, required)
  - `name` (`search-candidates.response.200.candidates.name`; string, required)
  - `slug` (`search-candidates.response.200.candidates.slug`; string, required, nullable)
  - `avatar` (`search-candidates.response.200.candidates.avatar`; string, required, nullable)
  - `bio` (`search-candidates.response.200.candidates.bio`; string, required, nullable)
  - `title` (`search-candidates.response.200.candidates.title`; string, required, nullable)
  - `company` (`search-candidates.response.200.candidates.company`; string, required, nullable)
  - `location` (`search-candidates.response.200.candidates.location`; string, required, nullable)
  - `topSkills` (`search-candidates.response.200.candidates.topSkills`; array<string>, required)
  - `yearsExperience` (`search-candidates.response.200.candidates.yearsExperience`; number, required)
  - `currentJob` (`search-candidates.response.200.candidates.currentJob`; object, optional)
    - `title` (`search-candidates.response.200.candidates.currentJob.title`; string, required)
    - `companyName` (`search-candidates.response.200.candidates.currentJob.companyName`; string, required)
  - `matchScore` (`search-candidates.response.200.candidates.matchScore`; number, optional)
- `total` (`search-candidates.response.200.total`; number, required)
- `hasMore` (`search-candidates.response.200.hasMore`; boolean, required)
- `ranking` (`search-candidates.response.200.ranking`; object, required)
  - `strategy` (`search-candidates.response.200.ranking.strategy`; string, required)
    - one of `"postgres_english_websearch"`, `"recency"`
  - `queryApplied` (`search-candidates.response.200.ranking.queryApplied`; boolean, required)

### 400

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`search-candidates.response.400.error`; object, required)
  - `code` (`search-candidates.response.400.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`search-candidates.response.400.error.message`; string, required) — Human-readable error message
  - `details` (`search-candidates.response.400.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`search-candidates.response.400.error.traceId`; string, optional) — Unique ID for log correlation

### 401

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`search-candidates.response.401.error`; object, required)
  - `code` (`search-candidates.response.401.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`search-candidates.response.401.error.message`; string, required) — Human-readable error message
  - `details` (`search-candidates.response.401.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`search-candidates.response.401.error.traceId`; string, optional) — Unique ID for log correlation

### 403

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`search-candidates.response.403.error`; object, required)
  - `code` (`search-candidates.response.403.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`search-candidates.response.403.error.message`; string, required) — Human-readable error message
  - `details` (`search-candidates.response.403.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`search-candidates.response.403.error.traceId`; string, optional) — Unique ID for log correlation

### 422

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`search-candidates.response.422.error`; object, required)
  - `code` (`search-candidates.response.422.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`search-candidates.response.422.error.message`; string, required) — Human-readable error message
  - `details` (`search-candidates.response.422.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`search-candidates.response.422.error.traceId`; string, optional) — Unique ID for log correlation

### 500

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`search-candidates.response.500.error`; object, required)
  - `code` (`search-candidates.response.500.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`search-candidates.response.500.error.message`; string, required) — Human-readable error message
  - `details` (`search-candidates.response.500.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`search-candidates.response.500.error.traceId`; string, optional) — Unique ID for log correlation

### 503

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`search-candidates.response.503.error`; object, required)
  - `code` (`search-candidates.response.503.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`search-candidates.response.503.error.message`; string, required) — Human-readable error message
  - `details` (`search-candidates.response.503.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`search-candidates.response.503.error.traceId`; string, optional) — Unique ID for log correlation


Source: https://docs.sureshake.com/reference/search-candidates/index.md
