# AI Candidate Ranker - Shortlist Resumes for a Job (`hirelayer/candidate-ranker`) Actor

Rank up to 10 candidates for one job description in a single call, with a score and a rationale for each position. Send resume files or texts.

- **URL**: https://apify.com/hirelayer/candidate-ranker.md
- **Developed by:** [HireLayer](https://apify.com/hirelayer) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $100.00 / 1,000 candidate rankings

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### What does AI Candidate Ranker do?

**AI Candidate Ranker** orders up to **10 candidates** for one job description in a single run. Each candidate is scored criterion by criterion, then compared with the others to settle the order. Each one gets:

- a **rank** (1 = best fit),
- a **score** from 0 to 1 and a **verdict** (`highly_relevant`, `relevant`, `marginally_relevant` or `not_relevant`),
- a **ranking reason**: one sentence that places the candidate against the others,
- a **summary** and, for each criterion of the job, the **evidence** found in the resume.

Send **resume files** (PDF, Word, images…) or resume **texts**. Resumes and job descriptions can be in any language. Summaries and reasons are written in the job's language when it is English, French, German, Spanish or Portuguese, and in English otherwise; you can also choose one of these five.

It is powered by the [HireLayer](https://hirelayer.co) recruiting API. Processing runs in the EU, and HireLayer does not store the resumes or the job description.

### Why use it?

- **Build a shortlist fast**: compare candidates side by side instead of one by one.
- **One price for the whole ranking**, whatever the number of candidates (up to 10).
- **Know why each one is where it is**: the ranking reason, the required criteria a resume lacks (`required_missing`) and the ones to check with the candidate (`to_verify`).

### How to use it

1. Click **Try for free**.
2. Paste the job description.
3. Add up to 10 resume URLs and/or candidates as text.
4. Click **Start** and open the **Ranking** table.

### Input

| Field | Description |
| --- | --- |
| `jobDescription` | The job description (required, 30 to 50,000 characters). |
| `resumeUrls` | Public URLs of resume files. Each file is parsed first. |
| `candidates` | Candidates as text: `[{"id": "c1", "text": "…"}]`, or `{"id": "c2", "resumeUrl": "…"}`. Each `id` comes back as `candidate_id`. |
| `language` | `auto` (default: the job's language, English for a job in another language), `en`, `fr`, `de`, `es` or `pt`. |

```json
{
  "jobDescription": "Senior Frontend Engineer. 5+ years frontend, React and TypeScript in production, fluent English. Nice to have: Next.js.",
  "resumeUrls": ["https://hirelayer.co/benchmark/resume-parser-2026-10/cv5-infographic-en.pdf"],
  "candidates": [{ "id": "c1", "text": "Jane Doe. Frontend developer, 7 years React and TypeScript at Acme. English native." }]
}
```

### Output

One dataset item per candidate, best first:

```json
{
  "rank": 1,
  "candidate_id": "c1",
  "candidate_name": null,
  "resume_url": null,
  "status": "success",
  "score": 0.94,
  "verdict": "highly_relevant",
  "ranking_reason": "The only candidate with React and TypeScript in production for more than five years.",
  "summary": "Strong fit: 7 years of React and TypeScript in production and native English; Next.js is not mentioned.",
  "required_missing": [],
  "to_verify": [],
  "criteria": [
    {
      "criterion_id": "crit_1",
      "label": "Frontend development with React and TypeScript",
      "requirement": "required",
      "weight": 3,
      "status": "met",
      "score": 1,
      "gap": null,
      "confidence": "high",
      "evidence": "\"Frontend developer, 7 years React and TypeScript at Acme\"",
      "explanation": "Seven years of React and TypeScript, above the five years asked."
    }
  ]
}
```

Candidates parsed from a file also get `candidate_name`. The complete response, with the criteria extracted from the job, is saved in the `OUTPUT` record of the key-value store. A candidate that cannot be processed gives an item with `"status": "error"`.

### Pricing

- **$0.10 per ranking** (up to 10 candidates)
- **$0.08 per resume file** parsed (candidates sent as text are not parsed)

### Use it from code

```bash
curl -X POST "https://api.apify.com/v2/acts/hirelayer~candidate-ranker/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"jobDescription": "…", "resumeUrls": ["https://example.com/a.pdf", "https://example.com/b.pdf"]}'
```

The Actor is also available to AI agents through the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp).

### FAQ

**More than 10 candidates?** Run the [AI Candidate Matcher](https://apify.com/hirelayer/candidate-matcher), which scores any number of candidates, then rank the top 10 here.

**Ranker or Matcher?** Both score each candidate criterion by criterion. The Ranker also compares the candidates with each other to settle the order of the top 10 and explains each place; the Matcher scores each candidate on its own, for any number of candidates, with your own criteria if you have them.

**Should the ranking decide alone?** No. It helps recruiters prioritise; hiring decisions stay with people.

**Need help?** Open an issue in the **Issues** tab or write to contact@hirelayer.co.

# Actor input Schema

## `jobDescription` (type: `string`):

The full job description, in any language (30 to 50,000 characters).

## `resumeUrls` (type: `array`):

Public URLs of resume files, one per line (up to 10 candidates in total). Each file is parsed first (charged as a parsed resume).

## `candidates` (type: `array`):

Optional. Candidates whose resume you already have as plain text: \[{"id": "c1", "text": "..."}]. You can also pass {"id": "c2", "resumeUrl": "https://..."}. IDs must be unique; each one comes back as candidate_id in the ranking.

## `language` (type: `string`):

Language of the summaries and ranking reasons. Same as the job description gives English for a job in another language. Evidence quotes the resume in its own language.

## Actor input object example

```json
{
  "jobDescription": "Senior Frontend Engineer (React / TypeScript) - Remote, Europe\n\nWe are looking for a senior frontend engineer to build our recruiting platform.\n\nRequirements:\n- 5+ years of professional frontend development\n- Strong React and TypeScript experience in production\n- Fluent English\n\nNice to have:\n- Next.js\n- Experience with design systems",
  "resumeUrls": [
    "https://hirelayer.co/benchmark/resume-parser-2026-10/cv2-two-page-en.pdf",
    "https://hirelayer.co/benchmark/resume-parser-2026-10/cv5-infographic-en.pdf"
  ],
  "candidates": [],
  "language": "auto"
}
```

# Actor output Schema

## `results` (type: `string`):

One item per candidate, best first: rank, score, verdict and the reason for its place.

## `output` (type: `string`):

The complete ranking response.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "jobDescription": `Senior Frontend Engineer (React / TypeScript) - Remote, Europe

We are looking for a senior frontend engineer to build our recruiting platform.

Requirements:
- 5+ years of professional frontend development
- Strong React and TypeScript experience in production
- Fluent English

Nice to have:
- Next.js
- Experience with design systems`,
    "resumeUrls": [
        "https://hirelayer.co/benchmark/resume-parser-2026-10/cv2-two-page-en.pdf",
        "https://hirelayer.co/benchmark/resume-parser-2026-10/cv5-infographic-en.pdf"
    ],
    "candidates": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("hirelayer/candidate-ranker").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "jobDescription": """Senior Frontend Engineer (React / TypeScript) - Remote, Europe

We are looking for a senior frontend engineer to build our recruiting platform.

Requirements:
- 5+ years of professional frontend development
- Strong React and TypeScript experience in production
- Fluent English

Nice to have:
- Next.js
- Experience with design systems""",
    "resumeUrls": [
        "https://hirelayer.co/benchmark/resume-parser-2026-10/cv2-two-page-en.pdf",
        "https://hirelayer.co/benchmark/resume-parser-2026-10/cv5-infographic-en.pdf",
    ],
    "candidates": [],
}

# Run the Actor and wait for it to finish
run = client.actor("hirelayer/candidate-ranker").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "jobDescription": "Senior Frontend Engineer (React / TypeScript) - Remote, Europe\\n\\nWe are looking for a senior frontend engineer to build our recruiting platform.\\n\\nRequirements:\\n- 5+ years of professional frontend development\\n- Strong React and TypeScript experience in production\\n- Fluent English\\n\\nNice to have:\\n- Next.js\\n- Experience with design systems",
  "resumeUrls": [
    "https://hirelayer.co/benchmark/resume-parser-2026-10/cv2-two-page-en.pdf",
    "https://hirelayer.co/benchmark/resume-parser-2026-10/cv5-infographic-en.pdf"
  ],
  "candidates": []
}' |
apify call hirelayer/candidate-ranker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hirelayer/candidate-ranker"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/dfW4dB3fB8h5bxez9/builds/kfIzk7hihLuFrVf8u/openapi.json
