- Documentation
- Guides
Duplicates & collapsing
Two different mechanisms that get confused: automatic cross-source dedup, and opt-in company+title collapsing.
There are two distinct things in this API that both reduce the number of rows you get back, and they are constantly mistaken for each other. They solve different problems and they trigger differently.
| Dedup | Collapse | |
|---|---|---|
| What it merges | The same posting mirrored across boards | Different postings sharing company + title |
| Example | One Stripe job on Greenhouse and LinkedIn | 40 separate "Barista" postings, one per store |
| Trigger | Automatic on the whole catalogue | Opt-in via ?collapse=true |
| Can you change it? | Yes: include_duplicates, and a source filter includes them | It's off by default |
| Effect | The mirror rows are marked, and left out of the default listing | Rows are grouped, with an openings count |
The one-line version: dedup hides a posting you'd otherwise see twice. Collapse folds genuinely separate postings that happen to share a name.
Dedup: the same posting, seen twice
A company posts a job on its own careers site, and the same job appears on a job board too. We collect both, so the same underlying role arrives as two postings from two sources.
When we identify those as mirrors of one posting, we keep one (the employer's
own board when we have it) and mark the others with duplicate_of, the id of
the posting we kept. Most of the marked postings are LinkedIn copies of jobs we
also read from the employer's ATS. The difference between postings and jobs
on /v1/meta is how many are marked right now.
Which ones you get depends on what you ask:
| You ask for | You get |
|---|---|
No source filter (the whole catalogue) | One posting per job, the mirrors are left out |
source=linkedin (a board's listing) | Every posting that board carries, mirrors included |
include_duplicates=true | Every posting, whatever else you filter on |
include_duplicates=false | One posting per job, even with a source filter |
A board's listing is complete because a board is what you asked for: a mirror is still a real posting on that board, with its own id, URL and apply link. The whole catalogue is one posting per job because that's what a search over "all jobs" means.
# Every LinkedIn posting, including the ones we also have from the employer's ATS
curl -G https://api.hyperjobs.io/v1/jobs \
-H "Authorization: Bearer $HYPERJOBS_KEY" \
--data-urlencode "source=linkedin"Every job in a response carries duplicate_of: null for a posting we keep,
the kept posting's id for a mirror. To merge on your side, group by
duplicate_of ?? id. A mirror's AI fields (skills, seniority, taxonomies…) are
the kept posting's. Its location, salary and URLs are its own.
The same posting in many places
Some employers post one job separately for every city. We serve that as one
job, with every place in its locations. Each of those places carries
apply_url, the link to that place's own posting, so a user in Denver applies
to the Denver one. The other postings are marked duplicate_of the job we keep,
exactly like a cross-source mirror, and follow the same rules in the table
above.
Postings that merely share a company and a title are collapsing's business, not this.
/v1/jobs/feed and /v1/jobs/modified leave the mirrors out unless you pass
include_duplicates=true. /v1/jobs/{id}
returns a mirror like any posting, duplicate_of included.
Reposts
Employers often take a job down and post it again on the same board, under a new
id. When we recognise a repost, we keep the older posting and mark the newer
copies with duplicate_of pointing at it. A repost never shows up as a new job:
the posting you already have stays the one we serve.
Marking is reversible and non-destructive. A row identified as a duplicate is flagged, never deleted. If a match turns out to be wrong, the flag clears and the row returns to the default listing.
Syncing the default listing
When a posting you already stored becomes a mirror, it leaves the default
listing, and /v1/jobs/expired reports it
with reason removed, the same signal as any posting we stop serving. It is
still reachable under its board and with include_duplicates=true. If the mark
is undone, the posting comes back and the tombstone goes.
Counting
/v1/jobs/count counts what your filter returns. Without a source filter that is one
per job. With one, it is every posting the board carries, and
/v1/meta → sources counts the same way, so its
per-source numbers add up to more than jobs.
Collapsing
Some employers post one row per location. A retailer hiring baristas in 40
stores files 40 real, distinct postings: 40 different ids, 40 different
apply_urls, 40 legitimately separate applications. None of them are
duplicates. They're just repetitive.
collapse=true groups them:
curl -G https://api.hyperjobs.io/v1/jobs \
-H "Authorization: Bearer $HYPERJOBS_KEY" \
--data-urlencode "organization=starbucks" \
--data-urlencode "collapse=true"Postings are grouped by company and title: the company's id where the job has
one, else the employer's name as the posting writes it, capitals ignored.
collapse=title,organization is accepted and does the same thing: it names the
grouping key explicitly rather than changing it.
What changes in the response
collapsedAdded at the top level, set to true. This is how you know the shape you're
holding is grouped.
openingsAdded to every job. How many postings were folded into this group.
countRows on this page, so groups, not postings.
{
"collapsed": true,
"count": 50,
"limit": 50,
"offset": 0,
"has_more": true,
"data": [
{
"id": "j_9d2f0a6b13c4e877",
"title": "Barista",
"openings": 40,
"company": { "id": "co_Sb8uX2kL", "name": "Starbucks" }
}
]
}Collapsed responses carry no next_cursor: the keyset cursor doesn't
exist for grouped rows. Page them with limit/offset instead; see
pagination.
The representative row is just the newest one: the other 39 are gone
Each group is represented by whichever posting is most recent: its newest dated posting, else (a group with no posting date) the one we first saw last; groups with a dated posting come first. It is not a merged or synthesised record. It's one real posting standing in for the group.
Everything posting-specific on the other members is not in the response and
not reachable from it: their ids, their locations, and critically their
apply_urls. openings: 40 tells you 39 other postings exist. It does not
give you any of them, and there's no parameter to expand a group.
If a user needs to apply to the Denver store specifically, a collapsed response
cannot serve them. Query without collapse and group client-side instead.
When to collapse
Do collapse when the group is the unit you care about:
- Job-board and search UIs. Forty identical "Barista" cards is a broken result page. One card reading "Barista · 40 openings" is the correct presentation, and it's a single request.
- "How many companies are hiring for X." Without collapse you're counting postings and a single multi-location employer dominates the count.
- Market-shape analysis. Employer × role is usually the honest denominator; postings over-weight whoever files most granularly.
Don't collapse when the posting is the unit you care about:
- You need every
apply_url. Collapsing hides them with no way back. - Location matters. The representative row carries its own location, not the
group's. Filters run before the grouping, so
location=Denver&collapse=truegroups only the Denver postings:openingscounts those, not the employer's other cities. - You're syncing a mirror. Feed sync is
posting-level by definition, and the feed has no
collapseanyway.
Collapse groups on the exact title string. "Barista" and "Barista (Part
Time)" are two groups, not one. It's a GROUP BY, not a fuzzy match, which
makes it predictable, and means openings is a floor on how repetitive an
employer actually is.
Expiry, the third mechanism
Not deduplication, but it's the other reason a row you expected isn't there.
A posting closes when its board stops listing it. A posting can also carry an explicit expiry date from its source, and one that fails a publish check stops being served. See expiry and reaping.
Closed postings are deleted, and leave a tombstone
A closed posting is deleted from the catalogue:
/v1/jobs,
/v1/jobs/feed and
/v1/jobs/{id} all stop returning it,
the last with a 404.
That leaves a sync consumer needing a way to see the deletion: you can't
expire your copy of a row that just stops appearing. That's its own endpoint:
/v1/jobs/expired streams
{id, expired_at, reason} tombstones for exactly this. Syncing the
feed replays those rows as deletes.
Which one is eating my rows?
Is `collapsed: true` in the response?
Then every row is a group, not a posting, standing in for
openingsothers. Dropcollapseto see postings.Is the row expired?
Fetch it directly with
/v1/jobs/{id}: a closed posting is deleted, so the id answers 404. Its tombstone on/v1/jobs/expiredis the definitive signal, and itsreasonsays whether the employer took it down (expired) or we stopped serving it (removed).Is the row a duplicate?
If a posting exists on two boards and you only ever see one, dedup picked a winner and marked the other. Pass
include_duplicates=true, or filter by the other board'ssource, and it's there withduplicate_ofset. Fetching its id with/v1/jobs/{id}returns it too.Or is it just a filter?
Next
Everything that's applied to a query, including the two you can't turn off.
List jobsThe endpoint reference, collapse included.