APIs
HireLayer Rank
Rank up to 10 candidates against one job description in a single call, with a score and a rationale for each.
- Endpoint
POST /api/v1/matching/job-candidates/rank- Input
- JSON · job text and 1–10 candidates
- Output
- Ranks
1…n, scores and French rationales - Billing
- 1 credit per successful call
/api/v1/matching/job-candidates/rankOrder up to 10 candidates for one job description, with a score and a rationale for each.
- Authentication
X-API-Keyheader- Billing
- 1 credit per successful call, whatever the number of candidates
- Client timeout
- Client timeout ≥ 65 s
Request body
Content type application/json
job_textstringrequiredJob description. Trimmed before validation.
1–50,000 characters
candidatesRankingCandidate[]requiredCandidates to rank against the same job.
1–10 items
›Show 2 child fieldsHide child fields
idstringrequiredYour candidate ID. Unique within the request after trimming.
non-empty
candidate_textstringrequiredResume as plain text. Trimmed before validation.
1–50,000 characters
Response
200Ranked candidates.
rankingsRanking[]One entry per candidate, sorted by
rank.›Show 4 child fieldsHide child fields
rankintegerPosition from 1 (best) to the number of candidates.
≥ 1
candidate_idstringThe
idyou sent, trimmed.scorenumberRelevance for the job. Use
rankfor ordering.0–1
rationalestringWhy the candidate holds this position, in French.
Errors
- 400Request body must be a JSON object
The body is missing, is a JSON array, or
Content-Typeis notapplication/json.Do not retry
- 400The request contains unsupported fields
The body contains a field that is not documented for this endpoint.
Do not retry
- 400The 'job_text' field is required
job_textis missing or not a string.Do not retry
- 400job_text cannot be empty
job_textis empty after trimming.Do not retry
- 400job_text must be 50000 characters or less
job_textis longer than 50,000 characters after trimming.Do not retry
- 400The 'candidates' field must be an array
candidatesis missing or not an array.Do not retry
- 400candidates cannot be empty
candidatesis[].Do not retry
- 400candidates must contain 10 candidates or fewer
More than 10 candidates.
Do not retry
- 400candidates contains an invalid candidate
A candidate has a missing, empty or extra field.
Do not retry
- 400candidate_text must be 50000 characters or less
A
candidate_textis longer than 50,000 characters after trimming.Do not retry
- 400candidates contains duplicate ids
Two candidates share the same
idafter trimming.Do not retry
- 401Missing API Key
The
X-API-Keyheader is absent.Authorization: Beareris not accepted.Do not retry
- 401Invalid API Key
The key is malformed, unknown or revoked. Rotating a key revokes the previous one immediately.
Do not retry
- 403Insufficient credits available
The account has no credit left.
availableCreditsis the current balance.Fix, then retry
- 500Internal server error
Unexpected gateway failure.
Retry with backoff
- 500Internal server error. Please try again later.
The body is not valid JSON, is a JSON primitive or exceeds 10 MB, or the service failed unexpectedly. Check the payload: if it is valid, retry.
Retry with backoff
- 502Upstream API unavailable
The service did not answer within 60 seconds, or could not be reached.
Retry with backoff
- 502The AI processing step failed. Please try again later.
Ranking failed or returned an invalid result after the service's internal retries.
Retry with backoff
- 503Credit service temporarily unavailable
Credits could not be checked or deducted. No credit is consumed, including when the operation itself had completed.
Retry with backoff
Behavior
- Latency
- Synchronous. The gateway waits up to 60 seconds, then returns
502 Upstream API unavailable. Use a client timeout of at least 65 seconds. - Retries
- Transient model errors are retried by the service before it answers. Retry
502and503with exponential backoff; never retry4xxunchanged. Failed requests are not charged. - Validation
- Validation stops at the first error, so one call reports one problem. Text fields are trimmed before their length is checked.
- Ordering
- Every candidate appears exactly once and ranks are
1…n.rankis authoritative:scoreis not guaranteed to decrease strictly with rank. - More than 10 candidates
- Ranks are relative to one request. To screen a larger pool, pre-filter it, or score each candidate with Match against the same criteria, which gives comparable scores.
curl -X POST https://onlineresumeparser.com/api/v1/matching/job-candidates/rank \
-H "X-API-Key: $HIRELAYER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"job_text": "Senior Frontend Engineer, Paris (hybrid). You will build our recruiting platform with React and TypeScript. Requirements: 5+ years of frontend development, strong React and TypeScript skills, fluent English. Nice to have: experience with Next.js.",
"candidates": [
{
"id": "candidate_1",
"candidate_text": "Alex Morgan, Senior Software Engineer in Paris. 8 years of experience. Since 2022, leads a team building a React and TypeScript SaaS platform at Northstar Labs. Previously built Node.js APIs. Professional English."
},
{
"id": "candidate_2",
"candidate_text": "Frontend developer in Lyon with 3 years of React experience on e-commerce sites. JavaScript, some TypeScript. Conversational English."
},
{
"id": "candidate_3",
"candidate_text": "Full-stack JavaScript developer with 6 years of experience, mostly Vue.js and PHP. Fluent English."
}
]
}'import os
import requests
response = requests.post(
"https://onlineresumeparser.com/api/v1/matching/job-candidates/rank",
headers={"X-API-Key": os.environ["HIRELAYER_API_KEY"]},
json={
"job_text": "Senior Frontend Engineer, Paris (hybrid). You will build our recruiting platform with React and TypeScript. Requirements: 5+ years of frontend development, strong React and TypeScript skills, fluent English. Nice to have: experience with Next.js.",
"candidates": [
{
"id": "candidate_1",
"candidate_text": "Alex Morgan, Senior Software Engineer in Paris. 8 years of experience. Since 2022, leads a team building a React and TypeScript SaaS platform at Northstar Labs. Previously built Node.js APIs. Professional English.",
},
{
"id": "candidate_2",
"candidate_text": "Frontend developer in Lyon with 3 years of React experience on e-commerce sites. JavaScript, some TypeScript. Conversational English.",
},
{
"id": "candidate_3",
"candidate_text": "Full-stack JavaScript developer with 6 years of experience, mostly Vue.js and PHP. Fluent English.",
},
],
},
timeout=65,
)
response.raise_for_status()
data = response.json()
print(data["rankings"])const response = await fetch('https://onlineresumeparser.com/api/v1/matching/job-candidates/rank', {
method: 'POST',
headers: {
'X-API-Key': process.env.HIRELAYER_API_KEY!,
'Content-Type': 'application/json',
},
body: JSON.stringify({
job_text: 'Senior Frontend Engineer, Paris (hybrid). You will build our recruiting platform with React and TypeScript. Requirements: 5+ years of frontend development, strong React and TypeScript skills, fluent English. Nice to have: experience with Next.js.',
candidates: [
{
id: 'candidate_1',
candidate_text: 'Alex Morgan, Senior Software Engineer in Paris. 8 years of experience. Since 2022, leads a team building a React and TypeScript SaaS platform at Northstar Labs. Previously built Node.js APIs. Professional English.',
},
{
id: 'candidate_2',
candidate_text: 'Frontend developer in Lyon with 3 years of React experience on e-commerce sites. JavaScript, some TypeScript. Conversational English.',
},
{
id: 'candidate_3',
candidate_text: 'Full-stack JavaScript developer with 6 years of experience, mostly Vue.js and PHP. Fluent English.',
},
],
}),
signal: AbortSignal.timeout(65_000),
})
if (!response.ok) {
throw new Error(`HireLayer ${response.status}: ${await response.text()}`)
}
const data = await response.json()
console.log(data.rankings){
"rankings": [
{
"rank": 1,
"candidate_id": "candidate_1",
"score": 0.91,
"rationale": "React et TypeScript sont démontrés en production, avec l’expérience demandée."
},
{
"rank": 2,
"candidate_id": "candidate_2",
"score": 0.64,
"rationale": "Bonne pratique de React, mais expérience plus courte et anglais seulement conversationnel."
},
{
"rank": 3,
"candidate_id": "candidate_3",
"score": 0.38,
"rationale": "Profil JavaScript solide, mais centré sur Vue.js sans expérience React mentionnée."
}
]
}{
"success": false,
"error": "Request body must be a JSON object"
}