# Company Job Openings (`jobs.openings`)

Lists a company's open roles from its public job board, with title, department, location, remote flag, employment type, posting date and link.

Docs: https://primaryapi.com/docs/api-reference/jobs/openings

- Endpoint: `POST https://api.primaryapi.com/v1/run/jobs.openings`
- Category: Knowledge & Data · Platform: `jobs` · Kind: list · Status: live
- Price: 1 credit per call. Every call costs the same, including calls that were retried automatically.
- Billing unit: per successful call
- Reliability: routed to a healthy upstream and retried automatically when an attempt fails; live 30-day status: `GET https://api.primaryapi.com/v1/status/apis?sku=jobs.openings`
- Execution: synchronous (answers 202 only if it outlives the wait window)

## Input

| Field | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
| `domain` | string | no |  | max 2048 chars | Company domain, e.g. "airtable.com". Its careers page is read to find the job board. |
| `board` | string | no |  | pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,99}$ | Job board token when you know it: the last part of the board URL (jobs.lever.co/<board>). |
| `ats` | enum | no |  | one of: greenhouse, lever, ashby, workable, smartrecruiters, recruitee | Job board platform of `board`. Without it every platform is tried with that token. |
| `department` | string | no |  | max 100 chars | Only roles whose department contains this text. |
| `remoteOnly` | boolean | no | false |  | Only roles marked remote. |
| `limit` | integer | no | 100 | 1–500 | Maximum number of results to return (1-500, default 100). |

Unknown fields are rejected with `400 invalid_input`. The routing controls `preferLatencyUnderMs` and `maxCredits` may be sent in the same JSON body.

## Output

When `output.found` is `true`, `output.data` has this shape:

| Field | Type | Description |
|---|---|---|
| `company` | string \| null | Company name the board publishes, when it does. |
| `ats` | enum |  |
| `board` | string |  |
| `boardUrl` | string | Public careers board URL. |
| `detectedVia` | enum | input: you gave board (+ ats). careers_page: linked from the company site. token_guess: a board named like the domain exists; check `company` before relying on it. |
| `total` | integer | Open roles on the board that match the filters (before `limit`). |
| `jobs` | object[] | Newest first, then by title. |
| `jobs[].id` | string | The posting id on the job board. |
| `jobs[].title` | string |  |
| `jobs[].department` | string \| null |  |
| `jobs[].location` | string \| null | Location as the board shows it ("Remote - US", "London, UK"). |
| `jobs[].remote` | boolean \| null | true when the board marks the role remote (or the location says so); null when unknown. |
| `jobs[].employmentType` | string \| null | full_time, part_time, contract, temporary, intern, or the board's own label; null when not published. |
| `jobs[].postedAt` | string \| null | When the role was first published (ISO 8601), when the board says. |
| `jobs[].url` | string \| null | Public job page. |
| `nextCursor` | string \| null |  |

When the thing you asked about does not exist (or a search matches nothing) the call still succeeds: `output.found` is `false`, `output.data` is `null` and `output.reason` says why (`not_found`, `private`, `no_results`, …). Misses are free unless the notes below say misses are billed.

## Example request

```bash
curl -sS -X POST "https://api.primaryapi.com/v1/run/jobs.openings" \
  -H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"domain":"airtable.com"}'
```

## Example response

_Values are placeholders that follow the output schema; `credits` is what this call would cost at the usual price._

```json
{
  "output": {
    "found": true,
    "data": {
      "company": "string",
      "ats": "greenhouse",
      "board": "string",
      "boardUrl": "https://example.com",
      "detectedVia": "input",
      "total": 0,
      "jobs": [
        {
          "id": "string",
          "title": "string",
          "department": "string",
          "location": "string",
          "remote": true,
          "employmentType": "string",
          "postedAt": "string",
          "url": "https://example.com"
        }
      ],
      "nextCursor": null
    }
  },
  "provider": "PrimaryAPI",
  "credits": 1,
  "items": 1,
  "requestId": "req_01JBXK6Y2N9V8T4R3Q2P1M0A7Z",
  "nextCursor": null
}
```

## Pricing and reliability

- Usual price: 1 credit per call
- Price ceiling: the usual price, even when a call is retried. A quote’s `maxCredits` is the most a given call can cost; the `maxCredits` routing control caps it per call
- Live 30-day status, success rate, uptime and latency: `GET https://api.primaryapi.com/v1/status/apis?sku=jobs.openings`

## Errors to handle

`invalid_input`, `unauthorized`, `insufficient_balance`, `key_limit_reached`, `trial_cap_reached`, `forbidden`, `not_found`, `idempotency_conflict`, `rate_limited`, `all_sources_failed`, `service_unavailable`, `timeout`. See https://primaryapi.com/docs/errors.

## Notes

Pass `domain`, or `board` (with `ats` when known). A company without a public board on a supported platform is a free miss (reason board_not_found); a board with no open roles is a free miss (reason no_openings). Sorted newest first with no fetch timestamps, so a monitor fires when a role opens or closes.

