# USAJobs Jobs Search Scraper (`jobsapi/usajobs-jobs-search-scraper`) Actor

Scrape rich, identity-verified federal job announcements from USAJOBS.

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

## Pricing

from $2.99 / 1,000 job details

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

### What does USAJOBS Jobs Search Scraper do?

USAJOBS Jobs Search Scraper extracts **identity-verified federal job announcements from [USAJOBS](https://www.usajobs.gov/Search/Results)**. It combines the public first-party search endpoint with each public announcement page to produce rich records without an applicant account or API credential.

Every emitted record verifies the numeric control number, title, agency, canonical URL, and substantial announcement sections. Search mode supports keyword/location pagination; single and multiple modes enrich known public announcement URLs.

### Why use USAJOBS Jobs Search Scraper?

- Build rich federal vacancy feeds with summary, duties, requirements, qualifications, evaluation, documents, and application instructions.
- Track agencies, departments, locations, pay, schedules, appointment types, closing dates, and hiring paths.
- Resolve known USAJOBS control numbers into canonical, source-verified records.
- Schedule runs, use the Apify API, connect datasets to integrations, and monitor machine-readable diagnostics.
- Preserve valid partial results when one detail fails or a bounded search exposes fewer jobs than requested.

The Actor uses native public HTTPS only. It does not use authenticated pages, private applicant data, browser automation, or private API credentials.

### What data can USAJOBS Jobs Search Scraper extract?

| Field | Type | Description |
|---|---|---|
| `jobId`, `controlNumber`, `announcementNumber` | string | Official announcement identity. |
| `title`, `agency`, `department` | string | Verified position and organisation. |
| `location`, `locations` | string/array | Public duty locations. |
| `summary`, `duties`, `requirements` | string | Rich announcement sections. |
| `qualifications`, `evaluation`, `requiredDocuments` | string | Eligibility and selection content. |
| `salaryMin`, `salaryMax`, `payScaleGrade` | number/string | Published pay data. |
| `datePosted`, `validThrough` | date-time | Opening and closing timestamps. |
| `hiringPaths`, `jobSeries` | array | Public applicant paths and categories. |
| `applicationUrl`, `applicationMethods` | string/array | External application destinations only when published. |
| `detailVerified`, `verificationEvidence` | boolean/object | Identity, canonical, and richness checks. |

The public announcement URL is `jobUrl`; it is never reused as an application URL. Empty optional fields are omitted.

### How to scrape USAJOBS announcements

1. Open the Actor input tab in Apify Console.
2. Select `search`, `single`, or `multiple`.
3. For search mode, enter keywords and an optional location.
4. For direct modes, provide official `usajobs.gov/job/<control-number>` URLs.
5. Set `maxPages`, `maxItems`, `pageSize`, and `maxRequests` to bounded values.
6. Start the run and inspect the dataset, `RUN_SUMMARY`, and `RUN_DIAGNOSTICS`.
7. Export results or connect the dataset to an Apify integration.

One search page consumes one request and each inspected announcement consumes one request. The Actor stops at `maxRequests`.

### How much will it cost to scrape USAJOBS?

Native HTTPS is efficient compared with browser automation. Actual cost depends on your Apify plan, memory, page count, detail count, response latency, and current platform pricing. Start with one page and five items, then use the run estimate in Apify Console before scaling. A practical request budget is `maxPages + maxItems` plus a small margin for rejected candidates.

### Input

See the input tab for full configuration options.

```json
{
  "mode": "search",
  "query": "software engineer",
  "location": "",
  "maxPages": 1,
  "maxItems": 5,
  "pageSize": 25,
  "maxRequests": 12,
  "requestDelayMs": 100,
  "requestTimeoutSecs": 30
}
```

Direct URLs must use the USAJOBS host and contain a numeric control number. Duplicate URLs are removed. `requestDelayMs` applies between detail requests.

### Output

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel. Simplified examples:

```json
[
  {
    "jobId": "882002700",
    "title": "Software Engineer II",
    "agency": "House of Representatives",
    "location": "Washington, DC",
    "detailVerified": true,
    "jobUrl": "https://www.usajobs.gov/job/882002700"
  },
  {
    "jobId": "881802100",
    "title": "Computer Scientist (Enterprise Architect)",
    "agency": "Defense Counterintelligence and Security Agency",
    "applicationUrl": "https://agency.example.gov/application/881802100",
    "detailVerified": true,
    "jobUrl": "https://www.usajobs.gov/job/881802100"
  }
]
```

Application URLs shown above are illustrative; runtime output includes only destinations actually published outside USAJOBS. `RUN_SUMMARY` reports page, candidate, request, result, rejection, runtime, and completion status. `RUN_DIAGNOSTICS` explains individual search, detail, or validation failures and never becomes a job record.

### Tips and advanced options

- Use `single` mode for the cheapest rich lookup.
- Keep `pageSize` high enough to find `maxItems` within few pages.
- Raise `maxRequests` when increasing pages or direct URLs.
- A `succeeded_with_limitations` status means valid records were preserved despite fewer results or diagnostics.
- Verify consequential hiring decisions against the canonical announcement.
- Avoid collecting or retaining public contact details unless they are necessary for your lawful use.

### Local development

```text
npm ci --no-audit --no-fund
npm run check
npm test
apify validate-schema
apify run --purge --input-file INPUT.json
npm run validate
```

Local data remains under `storage/` and is not uploaded to Apify Console.

### FAQ, disclaimers, and support

#### Why did I receive fewer records than maxItems?

The query may expose fewer matching announcements, a detail page may fail strict verification, or the request budget may be reached. Valid records are retained with a limitation status; inspect diagnostics before raising limits.

#### Does the Actor submit applications?

No. It extracts public announcement data only and does not log in or submit forms.

#### Is scraping USAJOBS legal?

Our Actors are ethical and do not extract any private user data, such as email addresses, gender, or location. They only extract what the user has chosen to share publicly. We therefore believe that our Actors, when used for ethical purposes by Apify users, are safe. However, you should be aware that your results could contain personal data. Personal data is protected by the GDPR in the European Union and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers.

Respect USAJOBS terms, robots guidance, rate limits, and applicable law. Use the Actor API tab for programmatic access. Report issues with a redacted input and run ID in the Issues tab.

# Actor input Schema

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

Choose public keyword search, one announcement, or multiple announcements.

## `query` (type: `string`):

USAJOBS public keyword query used in search mode.

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

Optional city, state, ZIP, country, or remote location filter.

## `jobUrl` (type: `string`):

A public USAJOBS announcement URL containing a numeric control number.

## `jobUrls` (type: `array`):

Public USAJOBS announcement URLs for multiple mode.

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

Public USAJOBS announcement URLs, supplied as strings or URL objects.

## `maxPages` (type: `integer`):

Maximum number of public USAJOBS search API pages to inspect.

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

Maximum number of rich, detail-verified announcement records to emit.

## `pageSize` (type: `integer`):

Number of candidates requested from each public USAJOBS search page.

## `maxRequests` (type: `integer`):

Hard bound for public search and announcement requests in one run.

## `requestDelayMs` (type: `integer`):

Delay in milliseconds between public announcement detail requests.

## `requestTimeoutSecs` (type: `integer`):

Maximum seconds to wait for each public HTTPS request.

## Actor input object example

```json
{
  "mode": "search",
  "query": "software engineer",
  "location": "",
  "maxPages": 1,
  "maxItems": 10,
  "pageSize": 25,
  "maxRequests": 40,
  "requestDelayMs": 100,
  "requestTimeoutSecs": 30
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `runSummary` (type: `string`):

No description

## `diagnostics` (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("jobsapi/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 = {}

# Run the Actor and wait for it to finish
run = client.actor("jobsapi/usajobs-jobs-search-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 jobsapi/usajobs-jobs-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,jobsapi/usajobs-jobs-search-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/xV3kP4lZYDc3agCV0/builds/9nu9yEgVAJSGPnfUu/openapi.json
