# USAJOBS Scraper - Federal Job Openings, Pay & Locations

Search USAJOBS federal openings via the official Search API. Keyword, location and organization filters. Requires a free USAJOBS API key and the email registered with that key.

Canonical product page: https://mayd-it.com/data-tools/actors/usajobs-scraper/
Public Actor: https://apify.com/maydit/usajobs-scraper

## Example input

```json
{
  "keyword": "analyst",
  "maxResults": 10,
  "maxRunSeconds": 240,
  "softFail": false
}
```

## Full guide

![Search federal job openings — illustrative workflow](https://api.apify.com/v2/key-value-stores/YGxD9JRpduom8Q5Zd/records/usajobs-scraper-28198ccaaf9f.png?signature=LBZhufH0BOENg1siKH23)

## Search federal job openings

For federal-job research and vacancy tracking, turn USAJOBS Search API results into a table of openings, locations and published pay ranges.

**Coverage:** USAJOBS federal postings. Both a free API key and the email registered with that key are required; there is no keyless fallback.

[Open this Actor in Console](https://console.apify.com/actors/r8ndhH9rWx9FIlnwM/input) · [First run](#try-this-actor) · [Results](#result-preview) · [Cost](#usage-and-pricing) · [Full guide](#full-guide)

## Try this Actor

**Bring your API credentials first.** This Actor requires your own source API key. Enter it in the secret field in Console; the setup requirements are in the guide below.

1. Supply both credentials through the supported input or environment fields. Use the existing analyst keyword and a small maximum-job cap for the first run.
2. Open the run's dataset for actual job records and the key-value store's `SUMMARY` for missing-credential, source-failure or limit diagnostics.

**Read the results correctly:** With soft-fail enabled, a successful termination can have zero collected jobs. Check summary status and the official position link before using a vacancy record.

## Result preview

The dataset view highlights these columns:

- **Position ID** · `positionId`
- **Position title** · `positionTitle`
- **Hiring organization** · `organizationName`
- **Department** · `departmentName`
- **Published location** · `positionLocation`
- **Job category** · `jobCategory`

Use the original source links and the field definitions below when interpreting the results. CSV works well for flat columns; JSON preserves nested values.

## Usage and pricing

Base result rate on the FREE tier: **$1 per 1,000 results**. The [Pricing tab](https://apify.com/maydit/usajobs-scraper/pricing) shows your plan's result rate and any Actor Start charge. Set a small result limit for the first run; the requested limit is not a guarantee of that many results.

---

## Full guide

> Search **USAJOBS.gov** federal openings through the official **Search API**. A free [USAJOBS API key](https://developer.usajobs.gov/apirequest/index) and the **email registered with that key** are both required.

### What it does

Calls `https://data.usajobs.gov/api/search` and returns one row per job: position id/title, organization, department, location, job category, pay range, publication/close dates, and position URI.

### What YOU must register (free)

| Item | Where | How to wire on Apify |
|---|---|---|
| **USAJOBS API key** (`Authorization-Key`) | https://developer.usajobs.gov | `input.apiKey` (secret) **or** env `USAJOBS_API_KEY` |
| **Registration email** (`User-Agent`) | Same email used when you registered for the key | `input.userAgentEmail` **or** env `USAJOBS_USER_AGENT_EMAIL` |

Every live request needs:

| Header | Value |
|---|---|
| `Host` | `data.usajobs.gov` |
| `User-Agent` | The **email** used when you registered for the key (not a browser UA) |
| `Authorization-Key` | Your free API key |

**This Actor uses the authenticated Search API and has no keyless fallback.** Supply both credentials through input. (The environment-variable fallbacks apply only to runs started by the Actor's owner.) Setting `USAJOBS_API_KEY` does not make `USAJOBS_USER_AGENT_EMAIL` optional unless the registration email is supplied in `input.userAgentEmail`. See [USAJOBS authentication requirements](https://developer.usajobs.gov/guides/authentication).

### Missing credentials and source failures

By default, missing credentials or a complete source failure fails the run with actionable details in `SUMMARY`. `SUMMARY.missingCredentials` names only the missing input fields (`apiKey`, `userAgentEmail`); credential values are not included in that diagnostic. No diagnostic dataset row is emitted. For workflows that require successful termination, explicitly set `softFail: true`: the run writes zero dataset rows and `SUMMARY.status` is `blocked`, `source_failed`, or `time_limit`. Check this status before treating the run as successful data collection.

### Input

- **apiKey** (secret) - required for live jobs, supplied here or through `USAJOBS_API_KEY`
- **userAgentEmail** - required email registered with the API key, supplied here or through `USAJOBS_USER_AGENT_EMAIL`; no unrelated fallback email is used
- **keyword** - default `analyst`
- **locationName** / **organizationIds** - optional filters
- **maxResults** / **maxRunSeconds** / **softFail**

### Limitations

- Federal postings only (USAJOBS scope).
- The API key and its registration email are mandatory for `/api/search`.
### Result accounting

Only real source records are written to the dataset. `SUMMARY.total` counts saved rows. A dataset spending cap stops further writes and sets `SUMMARY.stoppedOnChargeLimit` and `SUMMARY.incomplete`. Source failures and time limits are reported in the summary; they do not generate substitute result rows.

## Help with your run

Open the **Issues** tab on this Actor with the run URL, the input field that caused trouble and what you expected to receive. Remove API keys and private information before posting.

[Explore more Mayd-It Actors](https://apify.com/maydit)

## Understand your run

Open **Run report** in the run’s Output tab for saved-record counts, reported source issues and limits, and suggested next steps. Use **CSV export** to take the saved results into a spreadsheet. The existing JSON results and detailed machine-readable summary remain available.

The report reflects this run’s recorded coverage. A successful run or a saved result does not establish that every possible source record was collected.
