# USAJOBS & Arbetsförmedlingen API: Government Jobs Feed (`devdarfy/gov-jobs`) Actor

Government jobs API: US federal jobs from USAJOBS (with your free key) and Swedish Arbetsförmedlingen / Platsbanken ads as clean JSON, with a new-jobs-only mode and licence on every row. $2 per 1,000 jobs.

- **URL**: https://apify.com/devdarfy/gov-jobs.md
- **Developed by:** [Volkan](https://apify.com/devdarfy) (community)
- **Categories:** Jobs, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 job listings

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

A **government jobs API** in one clean JSON schema: **US federal jobs from USAJOBS** (with your own free API key) and **Swedish public job ads from Arbetsförmedlingen (Platsbanken)**, which work out of the box. Filter by keyword, location, occupation and date, and turn on new-jobs-only mode for a daily feed of vacancies you have not seen.

- **What you get:** one row per job ad with title, employer, location, occupation code and label, employment type, salary when published, posted date, application deadline, apply link, source link, licence and attribution.
- **What it costs:** $0.002 per job returned, so **1,000 jobs = $2**. The only other charge is the standard Apify start fee of $0.00005 per run (per GB of memory). Apify platform usage is included in the price.
- **What you need:** nothing for Sweden. For USAJOBS, a free key from developer.usajobs.gov and the e-mail you registered it with.

### Example output

A row from a run on 21 November 2026 with the default input (Swedish ads from the last 7 days):

```json
{
  "id": "jobtech-se:31762693",
  "source": "jobtech-se",
  "country": "SE",
  "title": "Servitör/Servitris Sökes",
  "employer": "Restaurang Sparreholmen AB",
  "location": "Stockholm, Stockholms län, Sverige",
  "occupationCode": "5131",
  "category": "Servitör/Servitris",
  "employmentType": "full_time",
  "salary": null,
  "postedAt": "2026-11-21T16:35:15.000Z",
  "applicationDeadline": "2026-12-21T22:59:59.000Z",
  "applyUrl": "https://arbetsformedlingen.se/platsbanken/annonser/31762693",
  "sourceUrl": "https://arbetsformedlingen.se/platsbanken/annonser/31762693",
  "license": "CC0-1.0",
  "attribution": "Job ads from the Swedish Public Employment Service (Arbetsförmedlingen) via JobTech Dev, licensed CC0.",
  "fetchedAt": "2026-11-21T17:32:06.843Z"
}
```

### Use cases

- **Public-sector job alerts.** Schedule a daily run with `onlyNewSinceLastRun` and keywords such as a profession or a city, and send new ads to e-mail or Slack.
- **Job boards and apps.** Add official government vacancies to a job board. Swedish ads are CC0 and every row carries its licence and attribution.
- **Labour market analysis.** Track how many ads appear per occupation code, region or employer over time.
- **Recruitment research.** See which agencies or municipalities are hiring for a role and what deadlines they set.

### USAJOBS API key, step by step

1. Request a free key at developer.usajobs.gov (the form asks for your e-mail address).
2. Copy the key from the e-mail you receive.
3. In the Actor input set `"sources": ["usajobs"]`, put the key in `apiKey` and the same e-mail address in `apiKeyEmail`. Both are secret inputs.

### Quick start

Press Start with the default input to get the 20 newest Swedish job ads from the last 7 days. A typical real input:

```json
{
  "sources": ["jobtech-se"],
  "keywords": ["sjuksköterska"],
  "postedWithinDays": 7,
  "maxItems": 200,
  "onlyNewSinceLastRun": true
}
```

For a daily feed of new vacancies, create an Apify schedule with `onlyNewSinceLastRun` on, then connect the dataset to a webhook, Zapier, Make or Slack.

For US federal jobs, get a free key at developer.usajobs.gov and add `"sources": ["usajobs"]`, `"apiKey"` and `"apiKeyEmail"` (the e-mail you registered the key with). Both are stored as secret inputs.

### Sources

| Source | Country | Access | License |
|---|---|---|---|
| `jobtech-se` | Sweden (Arbetsförmedlingen / Platsbanken, via JobTech Dev) | Open, no key | CC0 (public domain) |
| `usajobs` | United States (USAJOBS, OPM) | Your own free API key and registered e-mail | USAJOBS API Terms of Service; the key stays yours |

More official sources are added only when their license clearly allows commercial reuse.

### Output fields

`id`, `source`, `country` (ISO-2), `title`, `employer`, `location`, `occupationCode`, `category`, `employmentType` (`full_time`, `part_time`, `contract`, `temporary`, `internship`, `other` or `null`), `salary` (`{min, max, currency, period, text}` when published), `postedAt`, `applicationDeadline` (UTC ISO 8601), `applyUrl`, `sourceUrl`, `license`, `attribution`, `descriptionText` (optional) and `fetchedAt`.

### Input fields

| Field | Meaning |
|---|---|
| `sources` | `jobtech-se` (default) and/or `usajobs` |
| `keywords` | Search words sent to the source API; Swedish ads are mostly Swedish |
| `countries` | ISO codes, e.g. `SE`, `US`; sources that do not cover a listed country are skipped |
| `locations` | Keep jobs whose location text contains any of these |
| `occupation` | Text matched against the occupation label; for USAJOBS a 4-digit job series such as `2210` is sent to the API |
| `postedWithinDays` | Only jobs published in the last N days (USAJOBS: at most 60) |
| `maxItems` | Cap on returned jobs (you pay per returned job) |
| `includeDescription` | Adds `descriptionText` (e-mail addresses removed) |
| `onlyNewSinceLastRun` | Delta mode, see below |
| `apiKey`, `apiKeyEmail` | Your own USAJOBS credentials (secret inputs) |

### New-jobs-only mode

With `onlyNewSinceLastRun` the Actor remembers delivered job IDs in the named key-value store `gov-jobs-seen` in your account (up to 200,000 IDs) and skips them next time. Jobs cut off by `maxItems` are not marked as seen and come back in the next run. To start over, delete that store.

### Pricing

Pay per result: **$2 per 1,000 jobs** (one default dataset item per job returned). Only returned jobs are charged. Use `maxItems` to cap spend.

### FAQ

**Is this scraping?** No. It calls the official JobTech Dev API and, if you supply a key, the official USAJOBS API.

**Why do I need my own USAJOBS key?** USAJOBS credentials may not be shared or transferred, so the Actor never ships one. Your key is used only for requests to data.usajobs.gov and is never written to output or logs.

**Can I get other countries?** Not yet. Germany, Norway, Finland and Singapore were checked and left out because there is no open API with a clear reuse license. The `countries` filter also finds foreign ads that Swedish employers post.

**Are the Swedish ads in English?** Titles, categories and descriptions are in the language the employer wrote, mostly Swedish.

**Do you collect contact persons or e-mails?** No. Only job fields are mapped, and e-mail addresses inside descriptions are replaced with `[email removed]`. Names or phone numbers that employers type into free-text descriptions are not removed.

### Limits

- Sweden: the API returns at most the 2,000 newest matches per query; narrow by keyword or date for more.
- Swedish dates have no time zone in the source and are converted from Europe/Stockholm to UTC.
- `occupationCode` is the SSYK occupation group (Sweden) or the job series (USAJOBS); `category` is the label in the source language.
- The USAJOBS part is tested only against recorded sample data, not against the live API with a real key. If you see a field missing, tell us.
- Not affiliated with or endorsed by Arbetsförmedlingen, JobTech Dev or OPM. You are responsible for using the data in line with applicable law and each source's terms.

### More Actors from the same developer

| Actor | What it does | Price |
|---|---|---|
| [ATS Jobs API](https://apify.com/devdarfy/ats-jobs) | Greenhouse, Lever and Ashby job postings, with new-job alerts | $3 / 1,000 jobs |
| [Career Page Jobs Scraper](https://apify.com/devdarfy/jobposting-extractor) | schema.org JobPosting data from any careers page that publishes it | $4 / 1,000 jobs |
| [Website Screenshot API](https://apify.com/devdarfy/render-api) | Full-page screenshots and URL to PDF for lists of URLs | $1 / 1,000 screenshots |
| [RSS Feed Reader & Parser](https://apify.com/devdarfy/rss-feed-reader) | RSS, Atom, RDF and JSON Feed to clean JSON, new items only | $1 / 1,000 items |
| [Bulk DNS Lookup & DMARC Checker](https://apify.com/devdarfy/dns-email-security) | MX, SPF, DMARC, DKIM and DNSSEC audit per domain, with a score | $2 / 1,000 domains |
| [Companies House API](https://apify.com/devdarfy/uk-companies-house) | UK company lookup by number, search and new incorporations | $3 / 1,000 companies |

# Actor input Schema

## `sources` (type: `array`):

Government job APIs to query. jobtech-se = Swedish Public Employment Service (open data, CC0, no key needed). usajobs = USAJOBS, runs only if you enter your own free USAJOBS API key and registered email below.

## `keywords` (type: `array`):

Search words sent to the source API (matched in title and description; any word matches). Swedish ads are mostly in Swedish, e.g. sjuksköterska, lärare, utvecklare. Leave empty for all recent jobs.

## `countries` (type: `array`):

ISO 3166-1 alpha-2 codes (SE, US, NO...). Only jobs with a known country can match. Sources that do not cover a listed country are skipped.

## `locations` (type: `array`):

Keep jobs whose location text contains any of these (city, municipality, region, state).

## `postedWithinDays` (type: `integer`):

Only jobs published in the last N days. 0 = no limit. USAJOBS supports at most 60 days.

## `occupation` (type: `string`):

Text matched against the occupation label (for example 'sjuksköterska', 'Information Technology'). For USAJOBS a 4-digit job category series code (for example 2210) is sent to the API directly.

## `maxItems` (type: `integer`):

Maximum number of jobs returned in total, 0 = unlimited. You are charged per job returned (pay per result), so this caps your spend.

## `onlyNewSinceLastRun` (type: `boolean`):

Delta mode: skip jobs already delivered in earlier runs (IDs are kept in the named key-value store 'gov-jobs-seen' in your account). Jobs cut off by Max items are not marked as seen and come back next run. Schedule the Actor daily with this on to get a feed of new vacancies.

## `includeDescription` (type: `boolean`):

Adds the plain-text description as descriptionText (e-mail addresses are replaced with \[email removed]). Makes rows larger.

## `apiKey` (type: `string`):

Your own USAJOBS API key (the Authorization-Key). Only needed for the usajobs source. It is used only for requests to data.usajobs.gov, stored as a secret input and never written to output or logs. Request a free key at developer.usajobs.gov.

## `apiKeyEmail` (type: `string`):

The e-mail address you registered the USAJOBS key with. USAJOBS requires it as the User-Agent header. Only needed for the usajobs source; stored as a secret input and never written to output or logs.

## Actor input object example

```json
{
  "sources": [
    "jobtech-se"
  ],
  "postedWithinDays": 7,
  "maxItems": 20,
  "onlyNewSinceLastRun": false,
  "includeDescription": false
}
```

# Actor output Schema

## `results` (type: `string`):

Government job ads returned by this run

# 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 = {
    "sources": [
        "jobtech-se"
    ],
    "postedWithinDays": 7,
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("devdarfy/gov-jobs").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 = {
    "sources": ["jobtech-se"],
    "postedWithinDays": 7,
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("devdarfy/gov-jobs").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 '{
  "sources": [
    "jobtech-se"
  ],
  "postedWithinDays": 7,
  "maxItems": 20
}' |
apify call devdarfy/gov-jobs --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,devdarfy/gov-jobs"
        }
    }
}
```

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/HP67VPHHvDPLzwjQG/builds/2nCjsu7lUgV5hWP52/openapi.json
