# GovernmentJobs.com Scraper - Public Sector Jobs (`bovi/governmentjobs-scraper`) Actor

Scrape public sector job postings from GovernmentJobs.com by keyword, location, job type, salary, remote option or search URL. Returns title, employer, department, salary range, closing date and the full job description. No login needed.

- **URL**: https://apify.com/bovi/governmentjobs-scraper.md
- **Developed by:** [Vitalii Bondarev](https://apify.com/bovi) (community)
- **Categories:** Jobs, Business
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.35 / 1,000 governmentjobs.com scraper - public sector jobs

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?

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

## GovernmentJobs.com Scraper - Public Sector Jobs

Scrape public sector job postings (city, county, state, school district and agency openings) from GovernmentJobs.com. No login or API key is needed.

### What it collects

For every job: title, employer, location, job type, salary text, featured flag and a link. With **Include job details** on (default) the actor also opens each job page and adds the full description, department, job number, posting / opening / closing dates, salary range (min, max, unit, currency), postal code, region and extra labelled fields.

### Input

| Field | Description |
| --- | --- |
| `keyword` | Job title or keyword, e.g. `engineer` |
| `location`, `distance` | City, state or zip and radius in miles |
| `jobTypes` | Full Time, Part Time, Internship, Seasonal, Temporary, Volunteer |
| `remoteWorkOptionIds` | Remote Only, Remote Optional, Flexible/Hybrid |
| `salary` | Minimum salary filter |
| `daysPosted` | Any time, last 30 days, last 7 days, last 24 hours |
| `sortBy` | Relevance or newest first |
| `startUrl` | Optional ready-made GovernmentJobs.com search URL (replaces the filters above) |
| `includeDetails` | Fetch each job page for the full description and exact fields |
| `maxResults` | Maximum jobs to collect (default 50) |
| `proxyConfiguration` | Optional Apify Proxy settings; the site works without a proxy |

### Example output

```json
{
  "jobId": "5506747",
  "url": "https://www.governmentjobs.com/jobs/5506747-0/engineer",
  "title": "Engineer",
  "employer": "West Virginia",
  "location": "- Various Locations, WV",
  "jobType": "Full-Time Permanent",
  "salaryText": "$62,058.00 - $110,386.00 Annually",
  "datePosted": "2026-10-07",
  "openingDate": "2026-10-08",
  "validThrough": "2026-10-22",
  "department": "Environment - Environmental Protection",
  "jobNumber": "DEP2700027 PSA",
  "salaryMin": 62058,
  "salaryMax": 110386,
  "salaryUnit": "YEAR",
  "salaryCurrency": "USD",
  "description": "We welcome you to join our team ...",
  "scrapedAt": "2026-10-13T08:00:00+00:00"
}
```

Fields that a posting does not provide (for example salary range when the agency lists "Negotiable") are simply left out.

### Pricing

Pay per result: you are charged for each job record written to the dataset. The price per result is set on the Apify Store page of this actor.

### Notes

Only publicly visible data is collected. Use it in line with the site's terms and applicable data-protection laws. This actor is unofficial and not affiliated with GovernmentJobs.com.

# Actor input Schema

## `startUrl` (type: `string`):

Optional GovernmentJobs.com search URL with filters already applied. If set, its filters replace the fields below.

## `keyword` (type: `string`):

Keyword to search for, e.g. engineer, analyst or planner. Leave empty to list all jobs.

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

Limit results to a place, e.g. California or Santa Clara, CA.

## `distance` (type: `integer`):

Search radius around the location.

## `jobTypes` (type: `array`):

Only include these job types.

## `remoteWorkOptionIds` (type: `array`):

1 = Remote Only, 2 = Remote Optional, 3 = Flexible/Hybrid.

## `salary` (type: `string`):

Only jobs paying at least this much.

## `daysPosted` (type: `string`):

Only jobs posted within this period.

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

Result ordering.

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

Open every job page to add the description, department, job number, exact dates and salary range. Slower.

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

Maximum number of jobs to collect.

## `proxyConfiguration` (type: `object`):

Optional. The site is reachable without a proxy; enable Apify Proxy if you get blocked.

## Actor input object example

```json
{
  "keyword": "engineer",
  "salary": "0",
  "daysPosted": "654321",
  "sortBy": "relevance",
  "includeDetails": true,
  "maxResults": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

Dataset with the scraped records.

# 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 = {
    "keyword": "engineer",
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("bovi/governmentjobs-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 = {
    "keyword": "engineer",
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("bovi/governmentjobs-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 '{
  "keyword": "engineer",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call bovi/governmentjobs-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bovi/governmentjobs-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/W9Qb3TmMBbT9jY5rc/builds/n7XrwtzPqr5v3bBhk/openapi.json
