# USAJobs Scraper: US Federal Government Jobs (`santamaria-automations/usajobs-federal-scraper`) Actor

Extract US federal government job listings from USAJobs.gov via the official public REST API. Returns 30+ fields: title, agency, pay grade (GS scale), security clearance, hiring path, application deadline, full description, and contact details.

- **URL**: https://apify.com/santamaria-automations/usajobs-federal-scraper.md
- **Developed by:** [NanoScrape](https://apify.com/santamaria-automations) (community)
- **Categories:** Jobs, Automation, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 serp 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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## USAJobs Federal Scraper: US Government Jobs

Extract US federal government job listings from [USAJobs.gov](https://www.usajobs.gov), the official job board for all US federal agencies. Covers ~30,000 open positions across every department, from entry-level to Senior Executive Service.

Built on the official USAJobs public REST API. No browser automation, no HTML parsing, no captcha.

### What it does

Pulls live federal job listings from the USAJobs API. Filter by keyword, location, GS pay grade, agency, or remote status. Each run returns structured data including the full description, pay scale, security clearance requirement, occupational series code, application deadline, and eligible hiring paths (public, veterans, students, etc.).

### Sample output

```json
{
  "_type": "job",
  "id": "805030100",
  "title": "Software Engineer",
  "job_url": "https://www.usajobs.gov/job/805030100",
  "source_url": "https://www.usajobs.gov/job/805030100",
  "source_platform": "usajobs.gov",
  "company_name": "Department of the Air Force",
  "company_website": "https://www.airforce.com",
  "location": "Wright-Patterson AFB, Ohio",
  "country": "US",
  "posted_at_text": "2026-08-01T00:00:00.0000000",
  "posted_at_datetime": "2026-08-01T00:00:00Z",
  "closing_at_text": "2026-08-22T00:00:00.0000000",
  "closing_at_datetime": "2026-08-22T00:00:00Z",
  "employment_type": "full-time, permanent",
  "pay_grade": "GS-13",
  "pay_min": 94199,
  "pay_max": 122459,
  "pay_currency": "USD",
  "pay_period": "year",
  "security_clearance": "Top Secret",
  "travel_percentage": "25% or less",
  "remote_type": "on-site",
  "description": "We are seeking a Software Engineer to join our team...",
  "description_full": "We are seeking a Software Engineer to join our team...\n\nDuties:\n- Design and develop software systems...",
  "description_html": "<p>We are seeking a Software Engineer...</p><ul><li>Design...</li></ul>",
  "description_md": "We are seeking a Software Engineer to join our team...\n\n- Design and develop software systems...",
  "contact_emails": [],
  "contact_phones": [],
  "contact_urls": [],
  "agency_hierarchy": ["Department of the Air Force", "Air Force Materiel Command"],
  "job_category_code": "2210",
  "job_category_name": "Information Technology Management",
  "application_url": "https://apply.usastaffing.gov/Application/Apply",
  "announcement_number": "AFMC-12345678-A-DIRECT",
  "hiring_path": ["public", "veterans"],
  "search_query": "software engineer",
  "scraped_at": "2026-08-22T10:30:00Z"
}
```

### Pricing

| Event | Price |
|---|---|
| Actor start | $0.001 |
| SERP result (`includeJobDetails=false`) | $0.003 per job |
| Detail result (`includeJobDetails=true`) | $0.005 per job |

Typical cost: **$3 per 1,000 jobs** in SERP mode (all structured fields from the API are included). Detail mode ($5/1,000) populates the full HTML description fields.

**New to Apify?** Every account gets a $5 free monthly platform credit - enough for around 1,000 results before you pay anything.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `searchQueries` | array of strings | - | Keywords like `"software engineer"`, `"data analyst"`. Each runs as a separate search. Leave empty to browse all federal jobs. |
| `startUrls` | array of strings | - | USAJobs.gov search URLs. Wins over `searchQueries` when both are set. |
| `location` | string | - | City or state filter, e.g. `"Washington, DC"`, `"Texas"`. |
| `includeJobDetails` | boolean | false | Enable description fields (description\_full, description\_html, description\_md). Charges `job-detail-result`. |
| `includeCompanyDetails` | boolean | false | Surface agency marketing URL as `company_website`. No extra requests. |
| `payGradeMin` | string | - | Minimum GS grade. Accepts `"GS-13"` or `"13"`. |
| `payGradeMax` | string | - | Maximum GS grade. |
| `remoteOnly` | boolean | false | Return only remote or telework-eligible positions. |
| `agency` | string | - | Agency or department name substring, e.g. `"Department of Defense"`, `"NASA"`. |
| `maxResults` | integer | 5 | Total cap across all queries (max 1000). |
| `maxResultsPerQuery` | integer | 5 | Cap per individual keyword. |

### Output fields

**Identity**

- `id`: USAJobs control number
- `title`: official position title
- `job_url`, `source_url`: canonical USAJobs.gov listing URL
- `announcement_number`: official vacancy announcement number

**Agency / Company**

- `company_name`: hiring agency or organization
- `company_website`: agency marketing URL (when available)
- `agency_hierarchy`: ordered list from department to sub-agency

**Location**

- `location`: primary location display string
- `country`: always `"US"`
- `remote_type`: `"remote"` or `"on-site"`

**Pay**

- `pay_grade`: GS grade (e.g. `"GS-13"` or `"GS-13/14"` for grade ranges)
- `pay_min`, `pay_max`: salary bounds in USD
- `pay_currency`: always `"USD"`
- `pay_period`: `"year"`, `"hour"`, `"biweekly"`, etc.
- `employment_type`: comma-joined tokens - full-time, permanent, temporary, term, etc.

**Description**

- `description`: short single-line snippet (~500 chars)
- `description_full`: full plain text with line breaks
- `description_html`: raw HTML from the API
- `description_md`: Markdown rendering (headings, lists, links preserved)

**Contacts**

- `contact_emails[]`: emails extracted from description
- `contact_phones[]`: phones extracted from description
- `contact_urls[]`: external URLs extracted from description

**Federal-specific**

- `security_clearance`: required clearance level
- `travel_percentage`: expected travel
- `job_category_code`: federal occupational series code
- `job_category_name`: occupational series name
- `hiring_path`: eligible hiring paths (public, veterans, students, graduates, etc.)
- `application_url`: external ATS or application portal link

**Meta**

- `posted_at_datetime`, `closing_at_datetime`: ISO 8601 UTC
- `search_query`, `scraped_at`

### Use with AI Agents

This actor is available as an MCP tool:

```
https://mcp.apify.com?tools=santamaria-automations/usajobs-federal-scraper
```

Point any MCP-compatible agent at that URL to let it search and retrieve federal job listings on demand.

### Why this scraper

- **Official API**: data comes directly from the USAJobs public REST API - no scraping, no blocking, no captchas
- **GS pay grade + salary range**: structured pay data on every row, not buried in description text
- **Security clearance field**: dedicated field for clearance requirements - useful for defense/intel recruiting
- **Hiring path filter**: federal jobs are gated by eligibility (veterans, students, public) - surfaced per listing
- **Occupational series codes**: federal jobs use standardized 4-digit series codes (2210=IT, 0343=Management Analyst, etc.) - useful for market analysis

### Common use cases

- Defense and government contractor recruiting (identify open roles before candidates apply)
- Federal job market analysis by agency, location, or GS grade
- Veteran hiring research (filter by `hiring_path: veterans`)
- Remote federal job boards (filter by `remoteOnly: true`)
- Salary benchmarking using GS pay tables

### Related Actors

- [Job Feed](https://apify.com/santamaria-automations/job-feed) - aggregate jobs from 25+ boards in one dataset
- [Career Site Jobs Scraper](https://apify.com/santamaria-automations/career-site-jobs-scraper) - extract jobs from any company careers page
- [Website Job Extractor](https://apify.com/santamaria-automations/website-job-extractor) - pull job postings from any URL
- [Indeed Scraper](https://apify.com/santamaria-automations/indeed-scraper) - scrape Indeed.com (includes US federal jobs posted there)
- [Rigzone US Scraper](https://apify.com/santamaria-automations/rigzone-us-scraper) - US oil, gas and energy jobs
- [ZipRecruiter Scraper](https://apify.com/santamaria-automations/ziprecruiter-scraper) - US job board with strong federal presence

### Support

Found an issue or have a question? Open a ticket via the [Issues tab](https://apify.com/santamaria-automations/usajobs-federal-scraper/issues) or email contact@nanoscrape.com - we reply within 6 hours on business days.

# Actor input Schema

## `searchQueries` (type: `array`):

One or more job titles or keywords to search on USAJobs.gov. Each entry runs as a separate search. Results are deduplicated by announcement number. Leave empty to browse all federal jobs.

## `startUrls` (type: `array`):

USAJobs.gov search URLs to crawl instead of building searches from keywords. Example: https://www.usajobs.gov/Search/Results?k=data+analyst\&l=Washington+DC. Mutually exclusive with searchQueries: if both are set, startUrls wins.

## `location` (type: `string`):

City, state or region filter. Example: 'Washington, DC', 'Texas', 'San Francisco'. Leave empty for nationwide results.

## `includeJobDetails` (type: `boolean`):

When enabled, all description fields (description\_full, description\_html, description\_md) are populated from the API's Full fields. Charges the job-detail-result PPE event instead of job-serp-result.

## `includeCompanyDetails` (type: `boolean`):

Surface the agency marketing URL as company\_website. This data comes directly from the API response - no extra HTTP requests are made.

## `payGradeMin` (type: `string`):

Filter by minimum GS pay grade. Accepts GS-prefixed or bare number, e.g. 'GS-13' or '13'.

## `payGradeMax` (type: `string`):

Filter by maximum GS pay grade. Accepts GS-prefixed or bare number, e.g. 'GS-15' or '15'.

## `remoteOnly` (type: `boolean`):

When true, only return jobs designated as remote or telework-eligible.

## `agency` (type: `string`):

Filter by agency or department name substring. Example: 'Department of Defense', 'NASA', 'FBI'.

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

Total cap across all search queries.

## `maxResultsPerQuery` (type: `integer`):

Maximum results per individual search keyword.

## Actor input object example

```json
{
  "searchQueries": [
    "software engineer"
  ],
  "location": "Washington, DC",
  "includeJobDetails": false,
  "includeCompanyDetails": false,
  "payGradeMin": "GS-13",
  "payGradeMax": "GS-15",
  "remoteOnly": false,
  "agency": "Department of Defense",
  "maxResults": 5,
  "maxResultsPerQuery": 5
}
```

# Actor output Schema

## `jobListings` (type: `string`):

Dataset containing scraped USAJobs federal job listings. Each row includes position ID, title, agency hierarchy, GS pay grade, security clearance, hiring path, employment type, description (plain text, HTML, Markdown), and application deadline.

# 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 = {
    "searchQueries": [
        "software engineer"
    ],
    "includeJobDetails": false,
    "includeCompanyDetails": false,
    "remoteOnly": false,
    "maxResults": 5,
    "maxResultsPerQuery": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("santamaria-automations/usajobs-federal-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 = {
    "searchQueries": ["software engineer"],
    "includeJobDetails": False,
    "includeCompanyDetails": False,
    "remoteOnly": False,
    "maxResults": 5,
    "maxResultsPerQuery": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("santamaria-automations/usajobs-federal-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 '{
  "searchQueries": [
    "software engineer"
  ],
  "includeJobDetails": false,
  "includeCompanyDetails": false,
  "remoteOnly": false,
  "maxResults": 5,
  "maxResultsPerQuery": 5
}' |
apify call santamaria-automations/usajobs-federal-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,santamaria-automations/usajobs-federal-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/abfsvQEuIatPlG63e/builds/dxOpZA2SpWatx2wij/openapi.json
