# USAJOBS Federal Jobs (`avakode/usajobs`) Actor

Federal job announcements from USAJOBS: keyword, place, agency, pay and more, with descriptions. No key needed.

- **URL**: https://apify.com/avakode/usajobs.md
- **Developed by:** [Tigran Avakov](https://apify.com/avakode) (community)
- **Categories:** Jobs
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 83.3% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.34 / 1,000 jobs

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Federal Jobs

Search the public job announcements of the U.S. federal government on USAJOBS by keyword, place, agency, occupation, pay and more, and get clean records with the full description. No USAJOBS account and no API key are needed.

### Limitations

- Speed: about 1 request per second; 1,000 jobs with details take about 17 minutes (without details, 100 jobs per request, much faster).
- Only new returns jobs this tool has not delivered before. In this mode the search is always sorted newest first (Sort by is ignored) and stops at the first results page with nothing undelivered: it returns jobs posted since the last run. If the limit cuts a run short, older jobs that run did not reach may come in a later run or not at all (a later run reads on only while every page has something undelivered); raise the limit or narrow the search.
- The site serves at most 10,000 jobs per search; the run warns when a search reaches that limit. Narrow it with filters or split it by keyword.
- Filter codes (departments, agencies, locations) are passed as the website understands them; a code it does not know simply returns no jobs.
- The agency contact person (name, phone, e-mail) is not collected, and contact details inside text sections are removed.
- Announcements show only what the public pages show; there is no applicant data and nothing behind a login.
- Times have no zone on the site; do not rely on the hour.
- At most one batch may be written again if a write was still on its way when the run was stopped.
- Two "only new" runs with the same search cannot work at the same time: the second one stops with a message before it reads anything.
- If a run is killed while it writes a batch and is not resurrected, the next "only new" run may skip that batch.

### What it does

The tool reads the same public search that the USAJOBS website uses for anonymous visitors, 100 jobs per request, and then (optionally) the public page of each job for its summary, duties and requirements. Each job is one record. Every search term is searched on its own and a job found by several terms is returned once. With "Only new jobs" a scheduled run returns the announcements it has not delivered before for the same search. It does not log in, does not use the data.usajobs.gov API (that one needs a personal key), and does not read the agency contact block of the job pages.

### Use cases

- Scheduled feed of federal openings for a profession, agency or place, without repeats.
- Pay and grade research across agencies and occupation series.
- Job boards and recruiters that need announcements with full text and closing dates.
- Alerts for jobs that are remote, offer telework or need a given clearance.

### Input

| Field | Type | Description |
|---|---|---|
| `keywords` | array | One search per term. Empty = no keyword. |
| `locations` | array | For example `Austin, Texas` or `Texas`. Empty = anywhere. |
| `radiusMiles` | integer | Radius around a city location; 0 = exact place. |
| `departments`, `agencies` | array | USAJOBS codes (`d=` and `a=` in the search address), for example `VA`, `VATA`. |
| `occupationSeries` | array | Four-digit series codes, for example `2210`. |
| `hiringPaths` | array | Who can apply, for example `public`, `vet`, `student`. |
| `workSchedules`, `appointmentTypes`, `securityClearances`, `travel` | array | Pick-lists as on the website. |
| `workSite` | string | `any`, `remote`, `not-remote` or `telework`. |
| `minSalary`, `maxSalary` | integer | Yearly pay filter in USD; 0 = off. |
| `sortBy` | string | `relevance`, `newest` or `closing-soonest`. Ignored when `onlyNew` is on (always newest first then). |
| `includeDetails` | boolean | Read each job page for description and details (one extra request per job). Default on. |
| `onlyNew` | boolean | Only jobs not delivered by an earlier run of the same search (same words and filters). |
| `maxResults` | integer | Total limit, default 100. |

Example:

```json
{ "keywords": ["registered nurse"], "locations": ["Texas"], "hiringPaths": ["public"], "sortBy": "newest", "maxResults": 100 }
```

### Output

One record per announcement. Missing values are `null`, dates are ISO 8601, `url` points to the announcement on usajobs.gov. Fields marked "details" are filled when `includeDetails` is on (or when the search list already carries them).

| Field | Description |
|---|---|
| `source_id`, `announcement_number` | Control number and the agency's announcement number. |
| `title`, `department`, `agency`, `sub_agency` | What the job is and who hires. |
| `location`, `location_count` | Place of work; number of duty locations. |
| `salary_text`, `salary_min`, `salary_max` (details), `salary_period` | Pay as listed and as numbers. |
| `pay_plan`, `grade_low`, `grade_high`, `promotion_potential` (details) | Pay scale and grade. |
| `work_schedule`, `appointment_type`, `hiring_paths`, `occupation_series` | Schedule, appointment, who may apply, series. |
| `supervisory`, `federal_service_type`, `telework_eligible`, `travel`, `security_clearance`, `position_sensitivity`, `drug_test` (details) | Overview facts from the job page. |
| `remote`, `relocation_reimbursed` | Remote job; relocation expenses. |
| `open_at`, `close_at` | Opening and closing time as the site lists them. The site gives no time zone, so the values are marked UTC. |
| `summary`, `duties`, `requirements` (details) | Text of the announcement with e-mail addresses and phone numbers removed. |
| `url` | Announcement address. |

Example record (shortened):

```json
{ "source_id": "889445100", "title": "Nurse (Clinical/Emergency Department)", "agency": "Defense Health Agency",
  "location": "Fort Gordon, Georgia", "salary_min": 93782, "salary_max": 121919, "salary_period": "per year",
  "work_schedule": "Full-time", "close_at": "2027-01-29T23:59:59.997Z", "url": "https://www.usajobs.gov/job/889445100" }
```

### Pricing

Pay per result: you pay for each job in the dataset, plus a tiny start fee per run. Set "Maximum cost per run" and the tool stops cleanly when it is reached. Pages of single jobs are requested only for jobs that will be returned.

### Errors

- **Invalid input** — the message names the field to fix (for example an unknown hiring path or a series code that is not four digits).
- **The site changed its format** — the tool needs an update; please open an issue. A single job page that cannot be read does not stop the run: the job is returned without description.
- **The site blocked access** — USAJOBS refused anonymous access; this tool does not bypass protection. Jobs already collected are kept.
- **The site is temporarily unavailable** — try again later.

### Support

Open an issue in the Issues tab with the run link.

# Actor input Schema

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

One search per line (for example a job title or skill). Each term is searched separately; a job found by several terms is returned once. Leave empty to search without a keyword.

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

Cities, states or countries as the USAJOBS search writes them, for example "Austin, Texas" or "Texas". A job matches if it is in any of them. Empty = anywhere.

## `radiusMiles` (type: `integer`):

Used only when locations are given and the location is a city. 0 = the exact place only.

## `departments` (type: `array`):

Department codes as in the USAJOBS search address (parameter d=), for example VA for Veterans Affairs or DD for Defense.

## `agencies` (type: `array`):

Agency codes as in the USAJOBS search address (parameter a=), for example VATA for Veterans Health Administration.

## `occupationSeries` (type: `array`):

Four-digit federal occupational series codes, for example 0610 (Nurse) or 2210 (IT management).

## `hiringPaths` (type: `array`):

Hiring paths the job must be open to. public = open to all U.S. citizens. Empty = any.

## `workSchedules` (type: `array`):

Empty = any.

## `appointmentTypes` (type: `array`):

Appointment type. Empty = any.

## `securityClearances` (type: `array`):

Clearance level named by the job. Empty = any.

## `travel` (type: `array`):

Share of time spent travelling. Empty = any.

## `workSite` (type: `string`):

remote = remote jobs only; not-remote = exclude remote jobs; telework = jobs that offer telework.

## `minSalary` (type: `integer`):

Jobs whose pay range reaches at least this amount. 0 = no limit.

## `maxSalary` (type: `integer`):

Jobs whose pay range starts at or below this amount. 0 = no limit.

## `sortBy` (type: `string`):

relevance = the site's default order; newest = most recently opened first; closing-soonest = earliest closing date first. Ignored when Only new jobs is on (the search is then always sorted newest first).

## `includeDetails` (type: `boolean`):

Reads the page of every job for the summary, duties, requirements, upper salary limit, telework and clearance fields. One extra request per job; off = list data only (faster).

## `onlyNew` (type: `boolean`):

Return only jobs this tool has not delivered before for the same search (same words and filters). In this mode the search is always sorted newest first (Sort by is ignored) and stops at the first results page with nothing undelivered: it returns jobs posted since the last run. If the limit cuts a run short, older jobs that run did not reach may come in a later run or not at all (a later run reads on only while every page has something undelivered); raise the limit or narrow the search.

## `maxResults` (type: `integer`):

Stop after this many jobs in total. The site shows at most 10,000 jobs per search.

## Actor input object example

```json
{
  "keywords": [
    "registered nurse",
    "data scientist"
  ],
  "locations": [
    "Austin, Texas"
  ],
  "radiusMiles": 25,
  "departments": [
    "VA"
  ],
  "agencies": [
    "VATA"
  ],
  "occupationSeries": [
    "2210"
  ],
  "hiringPaths": [
    "public"
  ],
  "workSchedules": [
    "full-time"
  ],
  "appointmentTypes": [
    "permanent"
  ],
  "securityClearances": [
    "secret"
  ],
  "travel": [
    "up-to-25"
  ],
  "workSite": "any",
  "minSalary": 100000,
  "maxSalary": 150000,
  "sortBy": "relevance",
  "includeDetails": true,
  "onlyNew": false,
  "maxResults": 100
}
```

# Actor output Schema

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

All records written by the run (the default dataset).

# 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 = {
    "keywords": [
        "registered nurse"
    ],
    "locations": [],
    "radiusMiles": 0,
    "departments": [],
    "agencies": [],
    "occupationSeries": [],
    "hiringPaths": [],
    "workSchedules": [],
    "appointmentTypes": [],
    "securityClearances": [],
    "travel": [],
    "workSite": "any",
    "minSalary": 0,
    "maxSalary": 0,
    "sortBy": "relevance",
    "includeDetails": true,
    "onlyNew": false,
    "maxResults": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("avakode/usajobs").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 = {
    "keywords": ["registered nurse"],
    "locations": [],
    "radiusMiles": 0,
    "departments": [],
    "agencies": [],
    "occupationSeries": [],
    "hiringPaths": [],
    "workSchedules": [],
    "appointmentTypes": [],
    "securityClearances": [],
    "travel": [],
    "workSite": "any",
    "minSalary": 0,
    "maxSalary": 0,
    "sortBy": "relevance",
    "includeDetails": True,
    "onlyNew": False,
    "maxResults": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("avakode/usajobs").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 '{
  "keywords": [
    "registered nurse"
  ],
  "locations": [],
  "radiusMiles": 0,
  "departments": [],
  "agencies": [],
  "occupationSeries": [],
  "hiringPaths": [],
  "workSchedules": [],
  "appointmentTypes": [],
  "securityClearances": [],
  "travel": [],
  "workSite": "any",
  "minSalary": 0,
  "maxSalary": 0,
  "sortBy": "relevance",
  "includeDetails": true,
  "onlyNew": false,
  "maxResults": 25
}' |
apify call avakode/usajobs --silent --output-dataset

```

## MCP server setup

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

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/7DtGejQBbWqMaPl7C/builds/mNGRCXR3A9j5We8dM/openapi.json
