All posts
Insights

The API serves the present. The history is yours to keep

The catalogue holds every open posting and nothing closed. How to answer 'is hiring up?' and 'how long do jobs stay open?' with history you keep.

HyperJobs Team7 min read

The catalogue is a picture of now. It serves every open posting, whatever its age: a job its board has listed for months is still there. When a posting closes it's deleted, and what it leaves behind is a tombstone on /v1/jobs/expired, kept for 90 days. There is no as_of, and no past to read one from.

Two consequences follow. An unfiltered query spans postings of any age, from this morning's to ones open since spring, so bound it with time_frame or posted_gte when the age matters. And the two questions people most want to ask of a jobs dataset can't be answered by asking it once.

"Is hiring up?"

The obvious answer is to compare jobs on /v1/meta today with what it said a month ago. Two problems.

You can't ask what it said a month ago. A time series of the live count exists only if someone wrote it down, and if it was going to be you, it needed to start a month ago.

Even with the series, it's a stock, not a flow. jobs is how many postings are open right now. It rises when postings arrive and falls when they close, and the same number can hide very different months: few new postings that stay open a long time, or many that close fast. "Hiring is up" is a claim about the flow (how many roles were opened), and the stock only tells you the net.

The flow is /v1/jobs/feed: new postings, ascending by created_at, the moment we first saw each one. Count it per day and you have openings per day. Before you plot it, two corrections.

Coverage is not hiring

created_at is when we first saw a posting, so anything that widens what we see shows up as new postings. A source added, a large employer's careers site picked up: each produces a burst of "new" jobs that were open all along. The compatibility policy says it plainly: changes to coverage can happen at any time.

The fix is to hold the population fixed. Every feed row carries its source: pick the sources you measure, count only those, and keep that set constant for the life of the series. When a source joins, start a new series rather than splicing it into the old one.

Reposts are not openings

Employers take a job down and post it again under a new id. A recognised repost is folded into the older posting (the newer copy carries duplicate_of), so by default the feed doesn't count it as a new job. include_duplicates=true puts reposts and mirrors back in. Decide which one you're counting and say so: "postings first seen" and "distinct jobs first seen" are both defensible numbers, and they aren't the same number.

"How long do jobs stay open?"

Duration is a subtraction: when the job closed minus when it opened. The close comes from /v1/jobs/expired, one tombstone per posting that left the catalogue, with expired_at and a reason.

The reason is the whole analysis.

reasonWhat happenedUse it as
expiredThe posting left its board.A closure: the event you're timing.
removedWe stopped serving it: it failed a publish check, or was marked a duplicate.Not a closure. The job may still be open.

Compute durations over every tombstone and you mix closures with exits that say nothing about when the job was filled.

The other trap is the jobs that haven't closed yet. On the day you measure, plenty of postings are still open, and the longest-lived jobs are exactly the ones most likely to be among them. Leave them out and your durations are biased short. They aren't missing data: each one is a job that has stayed open at least this long, which statisticians call right-censored. Treat them that way.

  1. Time closures, not exits

    Durations come from reason: "expired" only. A removed tombstone is a failed check or a duplicate, never a duration.

  2. Keep the jobs still open

    A job you saw open and haven't seen close counts as "open at least until today". It belongs in the analysis as a censored observation, not as a dropped row.

  3. Report a median, not a mean

    With a censored tail, a mean of the observed durations is biased low by exactly the jobs that stayed open longest. A median survives censoring as long as more than half your jobs have closed, and if they haven't, that is the finding.

Which "opened"?

The start of the interval has its own subtlety, and date_source tells you which case you're in.

date_sourceposted_at isDuration from it
sourceThe date the board statesAs good as the board's date
estimatedOur own reading: the posting appeared between two reads of its boardRight to within hours
unknownnull: the posting may have been up long before we found itNo start, so no duration

Split your results by date_source, and leave unknown out of durations rather than starting their clock at created_at: that clock starts late, and a late start makes a job look like it closed faster than it did.

LinkedIn postings have a second late clock. Their posted_at is the newest listing, so a repost restarts it; first_posted_at is when LinkedIn first listed the job. Start the interval there when it's set. A repost is not a new job has the fallback.

Closures can be withdrawn

Expiry is reversible. If a closed job is listed again on its board, it comes back under the same id and its tombstone disappears from the feed. In your own history, a closure is a status with a timestamp, not a row you can't revise: keep the last state you saw, and let a returning id reopen it.

Keeping the history yourself

None of this needs anything the API doesn't already serve. It needs you to write it down.

  • Snapshot /v1/meta daily. jobs, postings, and the per-source counts under sources. That's your stock series. It costs one request a day and no jobs against your quota.
  • Poll the feed for openings. A window wider than your interval (the feed sync guide has the table), and store id, source, posted_at, first_posted_at, date_source, created_at. That's your flow.
  • Poll /v1/jobs/expired for closures, and keep the tombstones forever. They're kept for 90 days on our side; after that, a closure you didn't record is gone. Poll daily, well inside the retention, and join them to the openings by id. Tombstones bill nothing against your quota.

A month of that and you can answer "is hiring up?" against the month before. A quarter, and you can say how long jobs in a sector stay open, including the ones that are still open.

If you'd rather start with the past than wait for it, the dataset in files holds every job we have, open and closed, each with its history, under the same ids as the API. Load it once, then keep it current with the feeds above.

The API keeps the catalogue honest about what's live. The history is the part you keep, or buy in files.