# Career Page → Job Board Sync (Greenhouse + Ashby) (`royal_niche/career-page-job-board-sync`) Actor

Turn selected Greenhouse and Ashby career pages into current jobs plus add/update/expire change records. Includes an n8n → Airtable example.

- **URL**: https://apify.com/royal_niche/career-page-job-board-sync.md
- **Developed by:** [kiwan kim](https://apify.com/royal_niche) (community)
- **Categories:** Jobs, Business, Integrations
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$10.00 / 1,000 board sync completeds

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

## Career Page → Job Board Sync

**[Open the Actor on Apify Store](https://apify.com/royal_niche/career-page-job-board-sync)** · $0.01 per completed board sync

An Apify Actor that turns a list of Greenhouse and Ashby career pages into a job-board feed:
current jobs, plus explicit `add` / `update` / `expire` change records that a downstream table can
apply idempotently.

**Status: v0.1, published on Apify Store. Pricing: $0.01 per completed company-board sync.**
Failed, truncated, skipped or stale-config boards are never charged, and `snapshot` mode is free.

***

### Pricing

One pay-per-event charge, `board-sync-completed`, for each company board that was read completely and
successfully. A board that fails, returns a partial or truncated response, is skipped by a run limit,
or is blocked by a changed configuration fingerprint is not charged. `snapshot` mode keeps no state and
is free.

At $0.01 per board, a 20-employer board refreshed four times a day costs about $24/month.

### What it does

- Reads one documented public endpoint per board (no browser, no proxy, no scraping of HTML).
- Normalizes both providers into one schema.
- Keeps a baseline per `syncId` and emits only real changes.
- Emits `expire` only after **two consecutive complete observations** in which the job was absent.
- Never expires jobs from a failed, truncated, partial or suspicious response.
- Reports every board as `complete`, `incomplete`, `failed`, `skipped`, `stale_config` or `suspicious`
  in a run summary.

### Pricing

One pay-per-event charge, `board-sync-completed`, for each company board that was read completely and
successfully. A board that fails, returns a partial or truncated response, is skipped by a run limit,
or is blocked by a changed configuration fingerprint is not charged. `snapshot` mode keeps no state and
is free.

At $0.01 per board, a 20-employer board refreshed four times a day costs about $24/month.

### What it does not do

- No company discovery: you supply the board URLs.
- No Workday, LinkedIn, Indeed, or custom-domain boards.
- No applicant data, contact enrichment, AI classification, salary estimation or visa inference.
- No hosted job-board frontend.
- No salary for Greenhouse boards: the list endpoint does not expose pay ranges, and fetching them
  would cost one extra request per job.

### Providers and endpoints

| Provider | Endpoint | Notes |
|---|---|---|
| Greenhouse | `GET https://boards-api.greenhouse.io/v1/boards/{token}/jobs?content=true` | Board URLs accepted: `job-boards.greenhouse.io/{token}`, `boards.greenhouse.io/{token}`, `boards-api.greenhouse.io/v1/boards/{token}/…` |
| Ashby | `GET https://api.ashbyhq.com/posting-api/job-board/{name}?includeCompensation=true` | Board URLs accepted: `jobs.ashbyhq.com/{name}` (a pasted job URL works too) and `api.ashbyhq.com/posting-api/job-board/{name}`. Custom domains are rejected. |

### Input

Full schema: [`.actor/input_schema.json`](.actor/input_schema.json). Example: [`examples/input-sample.json`](examples/input-sample.json).

```json
{
  "syncId": "energy-board",
  "mode": "sync",
  "boards": [
    { "url": "https://job-boards.greenhouse.io/redwoodmaterials" },
    { "url": "https://jobs.ashbyhq.com/span", "companyLabel": "SPAN" }
  ],
  "filters": { "titleKeywords": ["engineer"], "locationText": [] },
  "limits": { "maxBoards": 25, "maxJobsPerBoard": 5000, "maxRunSeconds": 300 },
  "expiry": { "confirmations": 2 },
  "resetState": false
}
```

- `mode: "sync"` (default) keeps a baseline and writes change records.
- `mode: "snapshot"` writes the current jobs and keeps no state; it is not billable.
- `filters` are case-insensitive substring matches, applied to the published data. Remote eligibility
  is **not** inferred.
- `companyLabel` fills `company` only when the provider publishes no employer name (Ashby never does).

### Output

#### `sync` mode — dataset of change records

```json
{
  "eventId": "3f9c1d2a8b7e6c5d4a3b2c1d",
  "recordType": "change",
  "syncId": "energy-board",
  "action": "add",
  "jobKey": "greenhouse:redwoodmaterials:5894704004",
  "boardKey": "greenhouse:redwoodmaterials",
  "observedAt": "2026-10-31T00:59:12.441Z",
  "changedFields": [],
  "reason": "initial_import",
  "job": {
    "jobKey": "greenhouse:redwoodmaterials:5894704004",
    "provider": "greenhouse",
    "boardId": "redwoodmaterials",
    "sourceJobId": "5894704004",
    "company": "Redwood Materials",
    "title": "Abuse Test Engineer, Energy Storage",
    "locations": ["McCarran, NV"],
    "department": "Engineering & Technology",
    "descriptionHtml": "<div>…</div>",
    "descriptionText": "…",
    "salary": null,
    "sourceUrl": "https://boards.greenhouse.io/redwoodmaterials/jobs/5894704004",
    "applyUrl": "https://boards.greenhouse.io/redwoodmaterials/jobs/5894704004",
    "sourcePublishedAt": "2026-04-09T16:59:15-04:00",
    "sourceUpdatedAt": "2026-10-30T11:20:52-04:00",
    "firstSeenAt": "2026-10-31T00:59:12.441Z",
    "lastSeenAt": "2026-10-31T00:59:12.441Z",
    "contentHash": "0a1b…"
  }
}
```

| Field | Meaning |
|---|---|
| `eventId` | Deterministic ID for this transition. A retried delivery reuses it. |
| `action` | `add`, `update`, `expire` |
| `reason` | `initial_import`, `content_changed`, `absent_in_confirmed_observations`, `reappeared`, `config_reset` |
| `changedFields` | For `update`: `title`, `company`, `locations`, `department`, `description`, `salary`, `sourceUrl`, `applyUrl`, `sourcePublishedAt` |
| `job` | Full job for `add`/`update`. For `expire`, the last known compact record (no descriptions). |

Semantics worth keeping: `firstSeenAt` is not the publication date; `sourcePublishedAt` is
provider-specific (Greenhouse: first publication, Ashby: last publication); a disappearing job does
not mean the role was filled; missing salary or location stays missing.

#### `snapshot` mode — dataset of jobs

Same job object with `"recordType": "job"`.

#### Run summary — key-value record `RUN_SUMMARY` (also `OUTPUT`)

```json
{
  "recordType": "run_summary",
  "syncId": "energy-board",
  "mode": "sync",
  "counts": { "boardsInInput": 2, "complete": 2, "incomplete": 0, "failed": 0, "staleConfig": 0, "skipped": 0, "suspicious": 0 },
  "events": { "add": 85, "update": 0, "expire": 0, "total": 85 },
  "boards": [{ "boardKey": "greenhouse:redwoodmaterials", "status": "complete", "observedJobs": 75, "events": { "add": 75, "update": 0, "expire": 0 }, "error": null, "note": null }],
  "unmonitoredBoards": [],
  "warnings": [],
  "charging": { "eventName": null, "chargedCount": 0, "maxTotalChargeUsd": null, "note": null }
}
```

### State and expiry rules

These are the rules the tests enforce:

1. The first successful sync emits `add` (`initial_import`) for every matching job and stores a baseline.
2. An identical rerun emits nothing; it only updates `lastSeenAt`.
3. A substantive change emits `update` with `changedFields`. `contentHash` excludes observation
   timestamps and Greenhouse's `updated_at`, so a metadata bump alone is not a change.
4. A job missing from a **complete** board response gets `missingStreak + 1`. It expires when the
   streak reaches `expiry.confirmations` (minimum 2).
5. Failed, incomplete, truncated, rate-limited or time/budget-limited boards never expire jobs and
   never advance an absence counter.
6. An unexpected empty board, or a disappearance of more than half the stored jobs (with at least 5
   stored), is flagged `suspicious` and expired only if the same kind of anomaly repeats in the next
   complete observation.
7. Removing a board from the input stops monitoring it. Its stored jobs are **not** expired.
8. Changing filters or a board definition changes the configuration fingerprint. The board is then
   skipped as `stale_config` (and not even fetched) until you run with `resetState: true`, which
   reconciles: it expires jobs that no longer match with reason `config_reset`.
9. Reappearance after expiry emits `add` with reason `reappeared` against the same `jobKey`.
10. The dataset is written **before** the new baseline is saved. If the write fails, the old baseline
    stays in place, the run records the timestamp, and the next run recomputes the same transitions
    with the same `eventId`s. A repeated delivery is harmless because the destination upserts by
    `jobKey` and ignores events that are not newer than the row's `lastEventAt`.

### State isolation and its limit

State lives in the named key-value store `job-board-sync-state`, in records keyed by
`u-{actorUserId}--state--{syncId}`.

Apify Actor runs write to the **Actor owner's** storage, so this namespacing stops two customers who
use the same `syncId` from clobbering each other. It does **not** make one customer's data invisible
to the Actor owner. If you need private per-customer state, run the Actor under your own account or
extend the design before publishing.

Overlapping runs are handled with a best-effort lease record. Key-value stores have no compare-and-set,
so two runs starting in the same instant can both proceed; the second write-then-read check narrows
that window to one request. The expiry rules are written so a rare overlap cannot mass-expire jobs.

### Limits and measured cost

Measured on the Apify platform on 2026-10-31 (build 0.1.2, 4 GB memory, two live boards):

| Scenario | Jobs | Dataset writes | Compute (CU) | Actual cost |
|---|---|---|---|---|
| Initial import, 2 small boards | 85 | 85 | 0.00260 | **$0.00132** |
| Quiet rerun, no changes | 85 | 0 | 0.00241 | **$0.00085** |
| Initial import, 2 large boards (Greenhouse `anthropic` + Ashby `openai`) | 1,485 | 1,485 | 0.00721 | **$0.00936** |
| Quiet rerun, no changes | 1,485 | 0 | 0.00309 | **$0.00067** |
| Failed run (state above the record limit) | 0 | 0 | 0.00281 | $0.00078 |

Local measurements for the same small pair: 644 ms in-process, ~2.6 MB read, ~1.3 MB dataset output,
\~100 KB state.

Two things follow from the platform numbers:

- **Dataset writes dominate a first import** (1,485 writes ≈ $0.0074 of the $0.0094 total, ~79%).
  Fetching two large boards costs about $0.0015 in compute. A quiet run is compute only.
- **Cost is not the constraint for this product.** A 1,000-job board refreshed four times a day costs
  cents per month. At any plausible price the platform cost is noise, and Apify keeps 20% of revenue,
  so pricing has to be justified by the buyer's saved work, not by cost recovery. No price is set.

State size is the real scaling limit: ~1.2 KB per stored job, so the 8 MB key-value record limit covers
roughly 5,000–6,000 jobs per `syncId`. Above that the run fails with an explicit message instead of
silently truncating. Split large collections across `syncId`s.

### Local development

```bash
npm install
npm test              # 56 tests: sync rules, providers, state, delivery retry, billing, Airtable contract
npm run typecheck
npm run build
npm run start         # runs dist/main.js

## Local run with local storage
mkdir -p storage/key_value_stores/default
cp examples/input-sample.json storage/key_value_stores/default/INPUT.json
npx tsx src/main.ts
```

`apify run` works too once the project is built.

### n8n → Airtable example

Files: [`examples/n8n-workflow.json`](examples/n8n-workflow.json),
[`examples/airtable-schema.md`](examples/airtable-schema.md).

#### Setup (once)

1. Create an **HTTP Header Auth** credential for Apify: header name `Authorization`, value
   `Bearer <APIFY_TOKEN>`.
2. Create a second **HTTP Header Auth** credential for Airtable: header name `Authorization`, value
   `Bearer <PAT>` with `data.records:read` and `data.records:write`.
3. Import the workflow. Open the **Config** node and fill in `apifyActorId`, `syncId`, `boards`,
   `airtableBaseId` and `airtableTable`.
4. Select the two credentials on the HTTP nodes (Apify nodes → the Apify credential, Airtable nodes →
   the Airtable credential).

`Config` also has `apifyApiBase` and `airtableApiBase`. Leave them at the public URLs; they exist so the
workflow can be run against the local mocks in `tests/n8n/mock-apis.mjs`.

Flow: schedule → start the Actor and wait → read `RUN_SUMMARY` → stop if any board failed or was
incomplete → read change records → one event at a time → find the Airtable row by `jobKey` → update
(when the event is newer), create (when missing), or skip (stale replay).

#### Validation status

Executed on 2026-10-31 in n8n 2.x (Docker image `docker.n8n.io/n8nio/n8n:latest`):

- Imported without errors (18 nodes).
- **Synthetic run** (add → update → add → expire → stale replay → reappear): 2 rows; the replayed
  `add` was skipped without a write; the expired row stayed and was marked `expired`; the reappearing
  job reactivated the same row.
- **Full workflow run** against local mocks of the Apify and Airtable APIs: run 1 created 2 rows and
  updated one; run 2 (zero change records) made no destination calls at all.
- Two real defects were found and fixed by running it: `SplitInBatches` output order is
  `done`=0 / `loop`=1 (the workflow had them swapped), and `$env` access is blocked by default in
  current n8n, so the example now uses a `Config` node plus credentials.

**Not verified:** writing to a real Airtable base. The workspace's monthly public API quota is
exhausted (`429 PUBLIC_API_BILLING_LIMIT_EXCEEDED` on both reads and writes), so no live base could be
touched. Re-run once the quota resets; no code change is needed. The real Apify credentials path inside
n8n is also unexercised (the Actor's HTTP endpoints were validated directly through the API).

### Known limitations

- Greenhouse `company_name` is used as `company`; Ashby has no employer field, so `company` is null
  unless `companyLabel` is set.
- `salary` is only populated for Ashby (`includeCompensation=true`). Greenhouse salary is `null`.
- Greenhouse `content` is HTML-entity escaped; it is unescaped once (twice when the source is
  double-escaped) and then converted to text. Descriptions are passed through as text/HTML strings,
  never rendered or executed here.
- Ashby publishes no total, so completeness relies on schema validation plus the empty/mass guards.
- Boards above `limits.maxJobsPerBoard` are truncated and cannot expire jobs.
- Stored state is one key-value record per `syncId`, capped at 8 MB (~5,000–6,000 jobs). Larger
  collections must be split; the run fails with an explicit message rather than truncating silently.
- Conditional requests are not used: a full board body is re-read every run (~2.6 MB for these two
  boards). Greenhouse serves an `ETag` and answers `304`, and Ashby caches for 60 s, so this is a
  measured optimization opportunity, not a cost problem at this size.

# Actor input Schema

## `syncId` (type: `string`):

Name for one independent collection, e.g. "energy-board". State is stored separately for every Sync ID, so two boards with the same name cannot overwrite each other.

## `boards` (type: `array`):

Greenhouse or Ashby board URLs. Supported: https://job-boards.greenhouse.io/{board}, https://boards.greenhouse.io/{board}, https://jobs.ashbyhq.com/{board}. Custom domains are not supported.

## `mode` (type: `string`):

sync keeps a baseline and emits change records. snapshot returns the current jobs and keeps no state.

## `filters` (type: `object`):

Simple substring filters. They are applied before the comparison, and the filter set is part of the stored configuration fingerprint.

## `limits` (type: `object`):

Hard bounds for cost control. Boards beyond a limit are reported as skipped and never expire jobs.

## `expiry` (type: `object`):

Rules for deciding when a job is no longer on the board.

## `resetState` (type: `boolean`):

Required before this Actor will accept a changed filter set for a stored board. Emits an expire with reason "config_reset" for jobs that no longer match, then stores the new baseline.

## Actor input object example

```json
{
  "syncId": "energy-board",
  "boards": [
    {
      "url": "https://job-boards.greenhouse.io/redwoodmaterials"
    },
    {
      "url": "https://jobs.ashbyhq.com/span",
      "companyLabel": "SPAN"
    }
  ],
  "mode": "sync",
  "filters": {
    "titleKeywords": [
      "engineer"
    ],
    "locationText": []
  },
  "resetState": false
}
```

# Actor output Schema

## `changes` (type: `string`):

In sync mode: add, update and expire records to apply downstream. In snapshot mode: the current jobs.

## `summary` (type: `string`):

Per-board status (complete, incomplete, failed, skipped, stale_config, suspicious) and change counts.

# 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 = {
    "syncId": "energy-board",
    "boards": [
        {
            "url": "https://job-boards.greenhouse.io/redwoodmaterials"
        },
        {
            "url": "https://jobs.ashbyhq.com/span",
            "companyLabel": "SPAN"
        }
    ],
    "mode": "sync",
    "filters": {
        "titleKeywords": [
            "engineer"
        ],
        "locationText": []
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("royal_niche/career-page-job-board-sync").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 = {
    "syncId": "energy-board",
    "boards": [
        { "url": "https://job-boards.greenhouse.io/redwoodmaterials" },
        {
            "url": "https://jobs.ashbyhq.com/span",
            "companyLabel": "SPAN",
        },
    ],
    "mode": "sync",
    "filters": {
        "titleKeywords": ["engineer"],
        "locationText": [],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("royal_niche/career-page-job-board-sync").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 '{
  "syncId": "energy-board",
  "boards": [
    {
      "url": "https://job-boards.greenhouse.io/redwoodmaterials"
    },
    {
      "url": "https://jobs.ashbyhq.com/span",
      "companyLabel": "SPAN"
    }
  ],
  "mode": "sync",
  "filters": {
    "titleKeywords": [
      "engineer"
    ],
    "locationText": []
  }
}' |
apify call royal_niche/career-page-job-board-sync --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,royal_niche/career-page-job-board-sync"
        }
    }
}
```

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/q4VzfSxUHQ7zrJGDs/builds/n3SaKeGSgTGr1RH1e/openapi.json
