# USAJobs.gov Federal Jobs Scraper (`artsiom_k/usajobs-scraper`) Actor

Scrape official US federal government job postings from USAJobs.gov - title, agency, salary, grade, location, hiring paths and category, filterable by US state, with incremental runs.

- **URL**: https://apify.com/artsiom\_k/usajobs-scraper.md
- **Developed by:** [Artsiom Kunitsyn](https://apify.com/artsiom_k) (community)
- **Categories:** Jobs
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

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

## USAJobs.gov Federal Jobs Scraper

Scrapes official US federal government job postings from [USAJobs.gov](https://www.usajobs.gov/),
the government's own job board. Every posting includes title, agency, department, salary range and
grade, location(s), work schedule/type, hiring-path eligibility (public/students/veterans/etc.),
job category, and the open/close dates — straight from USAJobs' own search results, no login or
paywall involved.

### What you get

One row per job posting:

- Title, agency, sub-agency, department
- Location (including multi-location postings, with a location count)
- Salary range (display text and a parsed minimum) and GS grade range
- Work schedule (full-time/part-time) and work type (permanent/internship/temporary/etc.)
- Hiring paths (who's eligible: general public, students, veterans, etc.)
- Job category
- Posting open/close dates
- A direct link to the posting

### Input

- **States** — restrict to specific US states/territories. Leave empty to cover every state (a
  real full-coverage run — postings open in multiple states are only counted once).
- **Keyword** — free-text job-title search (e.g. "nurse", "data scientist"). Leave empty for
  every open posting in scope.
- **Results per page** — how many postings to fetch per request (default 500).
- **Max results** — stop after this many postings. Defaults to 50 for a fast preview; set to empty
  for everything in the selected scope.
- **Incremental mode** — `auto` (recommended): the first run for a given state/keyword scope
  returns every posting; later runs return only new/changed postings and flag ones that closed
  since the last run. `full` always returns everything; `incremental` only new/changed.

### Notes

- A posting listing "Multiple Locations" can legitimately appear under more than one state filter
  — this actor deduplicates by posting ID across states, so a full-coverage run never double-counts
  a posting.
- Incremental mode tracks a separate baseline per states/keyword combination, so switching your
  filters starts a fresh comparison rather than mixing scopes.

# Actor input Schema

## `states` (type: `array`):

Restrict to these US states/territories. Leave empty for every state (a real full-coverage run, not the site's own unfiltered search - which caps display at 10,000 - since this actor queries state-by-state and dedupes postings that list multiple locations).

## `keyword` (type: `string`):

Free-text job-title search (maps to USAJobs' own JobTitle filter, e.g. "nurse"). Leave empty for every open posting in scope.

## `resultsPerPage` (type: `integer`):

How many postings to fetch per request. USAJobs' own UI defaults to 25; this actor defaults to 500 to cut request count. Confirmed working up to 5000.

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

Stop after pushing this many postings. Defaults to 50 - a fast, cheap preview, and what keeps an unconfigured run within Apify's automated 5-minute QA check. Set to null for everything in the selected scope.

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

"auto": the first run for a given scope returns every posting; later runs, with maxItems cleared and every state in scope, only return new/changed postings and report delisted (closed) ones. A capped run or a states/keyword-scoped run never updates the baseline. "full": always every posting. "incremental": only new/changed.

## `impersonate` (type: `string`):

curl\_cffi browser TLS-impersonation target. Defaults to "chrome" internally; change only if requests start being blocked.

## `proxyConfiguration` (type: `object`):

Apify Proxy settings. Not needed: the API answered every request cleanly in testing without a proxy (curl\_cffi TLS impersonation alone is enough).

## Actor input object example

```json
{
  "states": [],
  "resultsPerPage": 500,
  "maxItems": 50,
  "mode": "auto",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("artsiom_k/usajobs-scraper").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("artsiom_k/usajobs-scraper").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 '{}' |
apify call artsiom_k/usajobs-scraper --silent --output-dataset

```

## MCP server setup

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

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/ePE9OywJxb8PyaE3I/builds/RCFbaP6564YKwqtMJ/openapi.json
