Skip to content

Add the SmartRecruiters reader - #61

Draft
danielebarbaro wants to merge 3 commits into
albertoarena:mainfrom
danielebarbaro:feat/smartrecruiters-reader
Draft

danielebarbaro wants to merge 3 commits into
albertoarena:mainfrom
danielebarbaro:feat/smartrecruiters-reader

Conversation

@danielebarbaro

Copy link
Copy Markdown
Contributor

Changes

This adds SmartRecruiters to the ATS reader, with entries like smartrecruiters:aboutyougmbh. I had this as a draft in my fork since the Workable PR, now it is rebased on main.

It reads the public posting list, 100 postings per request, max 10 requests per company. Companies often post the same job once per language, so the reader keeps one posting per job (the English one if it exists).

I also updated the roadmap entry, it now mentions BambooHR only.

Review

Before you look at the code, there are a few things I'm not sure you will accept. Better to say them now.

The big one is robots.txt. The docs say the Posting API needs no authentication because the data is public, but api.smartrecruiters.com/robots.txt disallows everything for all user agents. I wrote what I found in docs/DECISIONS.md. If this is a no for you, close the PR, no problem.

The list has no description. To get it I would need one more request per posting (181 for About You), so I don't do it. Keywords match only on title and tags.

A wrong slug does not give an error. SmartRecruiters answers 200 with an empty list, so the company gets a green dot like a real company with no jobs. I did not find a way to tell them apart.

The list has no job link either, so I build it: https://jobs.smartrecruiters.com/<company>/<id>. It works on the jobs I tried.

Schema and JobSource are unchanged. Pest, PHPStan, Pint, Vitest and the type check pass.

Manual checks

I added "Post-v1: A SmartRecruiters company in the settings window" to docs/QA.md, but I did not run it in the app yet. From the command line with live data: 181 postings, 95 jobs, 0 skipped.

The ATS reader can read the posting list of a company on SmartRecruiters, 100 postings for each request. The list has no description, so the description stays empty. The source terms are not checked yet.
A company posts one job one time for each language, with one reference number. The reader keeps the English posting, or the first, and uses the reference number in the job id.
The source terms are read and recorded, with the robots.txt of the API host. The manual check is in QA and the roadmap entry names BambooHR only.
@albertoarena

Copy link
Copy Markdown
Owner

Thank you, Daniele, and thank you for raising the robots.txt question first. It decides this PR.

The source terms. I am not merging the reader until SmartRecruiters says yes. robots.txt on api.smartrecruiters.com allows /v1/companies/ for one named crawler only and disallows it for everyone else. The app reads each company on a schedule, with nobody at the keyboard, so I think that rule applies to us. I have written to SmartRecruiters to ask. I am keeping this PR open as a draft until they answer. If they say yes, I will add the approval to DECISIONS and merge. If they say no, I will close it and record why.

While we wait, two things in the code and some small doc fixes:

  1. Postings with one refNumber in more than one place. onePerJob keeps one posting for each refNumber, the English one or the first. If a company posts one job in several locations under the same refNumber, for example a remote job for DE and for NL, the reader keeps only one of them. eligibility() then restricts the job to that posting's country, and the posting is chosen by language, not by place. A user in NL would never see the job. Workable had the same problem (DECISIONS, the Workable eligibility entry of 2026-11-23). The fixture has only a pair that differs by language, so the tests cannot show this. Can you check, at a few real companies, whether postings with the same refNumber ever have different locations? If they do, the key could be refNumber plus the country, so that only language copies merge, and source_job_id would change to match.
  2. The page limit and a missing count. MAX_PAGES = 10 stops at 1,000 postings without saying so. Please note it in DECISIONS. When totalFound is missing, the loop stops after the first page, which looks the same as a company with one page. A test or a comment for that case would help.
  3. Docs.
    • DECISIONS says 174 postings for 92 jobs, and QA says 181 postings and 95 jobs. Please use the same numbers, or give each one its date.
    • The mapping table says the eligibility country is "ISO alpha-2 in lower case", but eligibility() and officeLocation() turn it to upper case. Something like "ISO alpha-2, lower case in the source, upper case in the job" would fix it.
    • The QA entry is not run yet. That is fine for now. It runs after SmartRecruiters answers.

Everything else looks good to me: the paging, the merge after all pages, the job id from refNumber, the fallbacks and their tests.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants