# Usajobs Jobs Search Scraper (`alexist/usajobs-jobs-search-scraper`) Actor

Scrape federal job listings from USAJobs.gov search results with precision. Capture 21+ essential fields including title, agency, salary, location, and hiring path — perfect for recruiters, job analysts, and government career platforms.

- **URL**: https://apify.com/alexist/usajobs-jobs-search-scraper.md
- **Developed by:** [Alex](https://apify.com/alexist) (community)
- **Categories:** Automation, Developer tools, Jobs
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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.gov Scraper: Extract Federal Job Search Results Instantly

---

### What Is USAJobs.gov?

USAJobs.gov is the official U.S. government job portal administered by the Office of Personnel Management (OPM). It lists hundreds of thousands of federal positions across agencies, from entry-level internships to senior leadership roles. For recruiters, job aggregators, and career researchers, accessing this data manually is inefficient — the **USAJobs Scraper** automates the collection of search results, delivering structured federal job data ready for analysis and integration.

---

### Overview

The **USAJobs Jobs Search Scraper** extracts job listings from USAJobs search results pages, converting human-readable listings into clean, structured records. It is designed for:

- **Federal recruiters** tracking agency hiring trends
- **Job board aggregators** syndicating government positions
- **Career analysts** researching federal employment markets
- **HR professionals** benchmarking federal compensation and hiring practices

Key strengths include configurable result limits per search page, robust error handling via `ignore_url_failures`, and comprehensive output covering agency, salary, location, and hiring eligibility data.

---

### Input Format

The scraper accepts a JSON configuration object:

```json
{
  "urls": [
    "https://www.usajobs.gov/Search/Results?k=software&l=Washington%2C+DC&p=2&r=25"
  ],
  "ignore_url_failures": true,
  "max_items_per_url": 20
}
````

#### Input Parameters

| Parameter | Type | Description |
|---|---|---|
| `urls` | Array | USAJobs search results pages to scrape. Include the full URL with query parameters (keyword, location, page number, result limit). |
| `ignore_url_failures` | Boolean | If `true`, the scraper continues even if some URLs fail. Prevents interruptions during large batch runs. |
| `max_items_per_url` | Integer | Maximum number of job listings to extract per URL (e.g., `20`). |

**Example URLs:**

- Search by keyword: `https://www.usajobs.gov/Search/Results?k=software`
- Filtered by location: `https://www.usajobs.gov/Search/Results?k=software&l=Washington%2C+DC`
- Paginated results: `https://www.usajobs.gov/Search/Results?k=software&p=2&r=25`

> **Tip:** Build search URLs directly from USAJobs.gov, then copy them into the scraper configuration. URL parameters are preserved to maintain search context.

***

### Output Format

**Sample output**

```json
{
  "title": "Foreign Service Consular Fellow - Arabic, Mandarin Chinese, Portuguese, and/or Spanish Proficiency",
  "agency": "Department of State - Agency Wide",
  "department": "Department of State",
  "salary_display": "Starting at $59,726 Per year (FP 6)",
  "document_id": null,
  "position_id": null,
  "location": "Department of State Posts - Overseas and Domestic",
  "location_display": "Department of State Posts - Overseas and Domestic (265 locations)",
  "date_display": "Open 04/01/2026 to 09/30/2026",
  "work_schedule": "Full-Time",
  "work_type": "The appointment is a limited non-career appointment for up to 60 months.",
  "posted_date_display": "Posted 04/01/26",
  "hiring_path": [
    {
      "code": "public",
      "tooltip": "Jobs open to U.S. Citizens, Nationals or those who owe allegiance to the U.S.",
      "is_search_filter": false,
      "search_display": "Open to the public"
    }
  ],
  "low_grade": "06",
  "high_grade": "06",
  "job_grade": "FP",
  "location_name": "Montevideo, Uruguay",
  "position_location_count": "265",
  "position_uri": null,
  "relocation": "True",
  "minimum_range": "59726",
  "position_start_date": "2026-04-01T00:00:00.0000",
  "position_end_date": "2026-09-30T23:59:59.9970",
  "sub_agency": null,
  "announcement_closing_type": "01",
  "job_category_code": [
    {
      "name": "Passport And Visa Examining",
      "code": "0967"
    }
  ],
  "from_url": "https://www.usajobs.gov/Search/Results?k=software&l=Washington%2C+DC&p=2&r=25"
}
```

Each job listing returns a structured record with 21 fields across job identity, agency, location, compensation, and hiring criteria:

#### Job Identity & Metadata

| Field | Meaning | Example |
|---|---|---|
| `Title` | Official job title | "Software Engineer" |
| `Document ID` | Unique USAJobs document identifier | "12345678" |
| `Position ID` | Agency-specific position number | "POS-2024-001" |
| `Position URI` | Direct link to the job listing | "https://www.usajobs.gov/GetJob/..." |

#### Agency & Organization

| Field | Meaning | Example |
|---|---|---|
| `Agency` | Federal agency name | "Department of Defense" |
| `Sub Agency` | Sub-division within the agency | "Defense Information Systems Agency" |
| `Department` | Broader department classification | "Executive Branch" |

#### Location & Work Arrangements

| Field | Meaning | Example |
|---|---|---|
| `Location` | Standardized work location code | "DC" |
| `Location Display` | Human-readable location(s) | "Washington, DC" |
| `Location Name` | Full location name | "Washington, District of Columbia" |
| `Position Location Count` | Number of open positions across locations | "3" |
| `Relocation` | Whether relocation assistance is offered | `true` or `false` |

#### Compensation & Grade

| Field | Meaning | Example |
|---|---|---|
| `Salary Display` | Formatted salary range | "$75,000 - $95,000/year" |
| `Minimum Range` | Low end of salary band | "75000" |
| `Low Grade` | Lowest federal GS grade offered | "GS-11" |
| `High Grade` | Highest federal GS grade offered | "GS-13" |
| `Job Grade` | Primary GS grade level | "GS-12" |

#### Work Details & Eligibility

| Field | Meaning | Example |
|---|---|---|
| `Work Schedule` | Full-time, part-time, or flexible | "Full-time" |
| `Work Type` | Permanent, temporary, or term | "Permanent" |
| `Hiring Path` | Eligibility category (e.g., public, vet, intern) | "Veterans" or "Recent Graduates" |
| `Announcement Closing Type` | Cutoff method for applications | "Continuous" or "Specific date" |

#### Dates

| Field | Meaning | Example |
|---|---|---|
| `Posted Date Display` | When the listing was published | "2024-01-15" |
| `Position Start Date` | Earliest start date for the role | "2024-02-01" |
| `Position End Date` | Latest start date or listing end date | "2024-06-30" |
| `Date Display` | User-friendly date range | "Posted Jan 15, 2024" |

#### Classification

| Field | Meaning | Example |
|---|---|---|
| `Job Category Code` | OPM occupational series code | "2210" (Information Technology) |

***

### How to Use

1. **Build search URLs** — Navigate to USAJobs.gov, apply your filters (keyword, location, experience level), and copy the resulting page URL.
2. **Add URLs to config** — Paste URLs into the `urls` array. Multiple search pages are supported.
3. **Set result limits** — Use `max_items_per_url` to control volume (e.g., `20` items per page).
4. **Enable error tolerance** — Keep `ignore_url_failures: true` for reliable batch runs.
5. **Execute the scraper** — Start the run and monitor progress in the log.
6. **Export & analyze** — Download results as JSON, CSV, or Excel for recruitment workflows or analysis.

**Best practices:**

- Narrow searches by keyword or location to keep result sets manageable.
- Test with one URL before running large batches.
- Check that salary and grade data are populated for your target job category.

***

### Use Cases & Business Value

- **Federal recruitment analytics:** Track which agencies are actively hiring and at what grade levels
- **Compensation benchmarking:** Monitor federal salary trends across departments and regions
- **Job aggregation:** Feed federal listings into multi-source job boards and career platforms
- **Talent pool research:** Identify emerging opportunities in government sectors
- **Policy analysis:** Analyze hiring patterns and workforce demand across government

The USAJobs Scraper eliminates manual data collection, delivering consistent, machine-readable records that integrate seamlessly into spreadsheets, applicant tracking systems, and business intelligence tools.

***

### Conclusion

The **USAJobs.gov Scraper** is an efficient solution for anyone needing structured federal job data at scale. With detailed output across 21 fields and flexible search configuration, it transforms USAJobs search results into actionable intelligence for recruitment, analysis, and platform integration. Start a run today and unlock federal hiring insights.

# Actor input Schema

## `urls` (type: `array`):

Add the URLs of the Jobs list urls you want to scrape. You can paste URLs one by one, or use the Bulk edit section to add a prepared list.

## `ignore_url_failures` (type: `boolean`):

If true, the scraper will continue running even if some URLs fail to be scraped.

## `max_items_per_url` (type: `integer`):

The maximum number of items to scrape per URL.

## Actor input object example

```json
{
  "urls": [
    "https://www.usajobs.gov/Search/Results?k=software&l=Washington%2C+DC&p=2&r=25"
  ],
  "ignore_url_failures": true,
  "max_items_per_url": 20
}
```

# 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 = {
    "urls": [
        "https://www.usajobs.gov/Search/Results?k=software&l=Washington%2C+DC&p=2&r=25"
    ],
    "ignore_url_failures": true,
    "max_items_per_url": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("alexist/usajobs-jobs-search-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 = {
    "urls": ["https://www.usajobs.gov/Search/Results?k=software&l=Washington%2C+DC&p=2&r=25"],
    "ignore_url_failures": True,
    "max_items_per_url": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("alexist/usajobs-jobs-search-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "urls": [
    "https://www.usajobs.gov/Search/Results?k=software&l=Washington%2C+DC&p=2&r=25"
  ],
  "ignore_url_failures": true,
  "max_items_per_url": 20
}' |
apify call alexist/usajobs-jobs-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=alexist/usajobs-jobs-search-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Usajobs Jobs Search Scraper",
        "description": "Scrape federal job listings from USAJobs.gov search results with precision. Capture 21+ essential fields including title, agency, salary, location, and hiring path — perfect for recruiters, job analysts, and government career platforms.",
        "version": "0.0",
        "x-build-id": "yIlXqYZ3A2CQwpIV4"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/alexist~usajobs-jobs-search-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-alexist-usajobs-jobs-search-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/alexist~usajobs-jobs-search-scraper/runs": {
            "post": {
                "operationId": "runs-sync-alexist-usajobs-jobs-search-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/alexist~usajobs-jobs-search-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-alexist-usajobs-jobs-search-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "urls": {
                        "title": "URLs of the Jobs list urls to scrape",
                        "type": "array",
                        "description": "Add the URLs of the Jobs list urls you want to scrape. You can paste URLs one by one, or use the Bulk edit section to add a prepared list.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "ignore_url_failures": {
                        "title": "Continue running even if some URLs fail to be scraped",
                        "type": "boolean",
                        "description": "If true, the scraper will continue running even if some URLs fail to be scraped."
                    },
                    "max_items_per_url": {
                        "title": "Max items per URL",
                        "type": "integer",
                        "description": "The maximum number of items to scrape per URL."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
