US Government Jobs API avatar

US Government Jobs API

Pricing

from $1.50 / 1,000 job records

Go to Apify Store
US Government Jobs API

US Government Jobs API

Find US government job postings from .gov and .mil source or employer domains by role, location, company, salary, posting age, employment type, remote status, and seniority.

Pricing

from $1.50 / 1,000 job records

Rating

0.0

(0)

Developer

Aspen Technology Labs, Inc.

Aspen Technology Labs, Inc.

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Features

Limited permissions

Share

US Government Jobs API - JobsIndex by Aspen Tech Labs

Access US government job postings through the JobsIndex API, built by Aspen Tech Labs. This Actor searches jobs whose source URL or employer domain indicates a US government source, including .gov and .mil domains.

The JobsIndex API, built by Aspen Tech Labs, collects over 70K government job postings in the US. Part of a broader index aggregating 11M+ active job listings daily from 300K+ employer source sites globally.

The Actor is fixed internally to US public-sector jobs (including local government jobs). Users can narrow the dataset by role keywords, location, salary, company, posting age, employment type, remote status, seniority, and pagination fields.

Need more or something different?

If this actor is working well for you, we'd love a review. For more data, custom feeds, feedback, or any questions, reach out via our website or email. You can also explore JobMarketPulse, our labor and job market intelligence platform.

Built-In Search Preset

This Actor always applies:

country = United States
what = @(url_source,company_domain)(".gov" OR ".mil")

The user-facing what field does not replace that preset. Instead, if a user enters what, the Actor appends it to the internal government-jobs query.

Because the enforced country takes precedence over where in the current JobsIndex API, where is intentionally not exposed. Use region, city, postal_code, and metro_area to narrow locations within the United States.

For example, user input:

{
"what": "police",
"region": "Virginia",
"size": 5
}

is sent to the JobsIndex API as:

{
"what": "@(url_source,company_domain)(\".gov\" OR \".mil\") AND @(title,title_raw,category,sub_category) (police)",
"country": "United States",
"region": "Virginia",
"size": 5
}

If what is empty, the Actor sends only the internal government-jobs preset.

Quick Start

{
"what": "engineer",
"region": "California",
"size": 5
}

Input Parameters

ParameterDescriptionExample
salarySalary amount or range filter.20h-30h
whatOptional role/category search within US government jobs. The Actor appends this to the internal .gov/.mil source preset.police
countryFixed preset. Runtime always uses United States; changes are ignored.United States
regionState, province, or region.California
cityCity filter.Sacramento
postal_codePostal or ZIP code filter.95814
metro_areaMetropolitan area filter.Sacramento-Roseville-Folsom, CA
titleJob title filter.Police Officer
company_namePublic employer name filter.Town of Leesburg, VA
company_domainEmployer domain filter.leesburgva.gov
categoryJob category filter.Security
sub_categoryMore specific job function or role group.Security Officer
industryCompany industry filter.Government
postedRelative posting age or ISO date. Empty by default to cover the broader live public jobs index.1w
employment_typeEmployment type.Full-Time
remoteWork arrangement filter. Supported values: remote, on-site, hybrid.on-site
senioritySeniority level.Senior
pagePage number, starting from 0.0
sizeNumber of results per page. Default 5, min 1, max 100.5

Search Behavior

The internal government-jobs preset searches across:

  • url_source
  • company_domain

When a user provides what, the Actor searches that value across:

  • title
  • title_raw
  • category
  • sub_category

This keeps user search focused on the role or job family while preserving the government-jobs filter.

Examples:

what = police
what = nurse
what = engineer
what = software engineer OR data analyst

Advanced Filters

what searches role and job-family terms across title, title_raw, category, and sub_category. It supports plain-text search and boolean logic.

Examples:

what = police OR public health
what = police OR emergency management

For exact role or job metadata matching, use structured fields such as title, category, or sub_category.

Structured Filter Precedence

The built-in government-jobs preset is always retained. The Actor appends the user query to its internal .gov/.mil source preset. Structured job filters such as title, company_name, company_domain, category, sub_category, industry, posted, salary, employment_type, remote, and seniority then take priority and can override or narrow the user query.

Use what as a free-text role search when the corresponding structured job filters are not set.

Use structured job fields to narrow the government-jobs preset:

  • title, company_name, company_domain
  • category, sub_category, seniority, industry
  • employment_type, remote, posted, salary

Location Filtering

This Actor is fixed to country=United States. Use structured location filters to narrow results within the US:

  • region
  • city
  • postal_code
  • metro_area

Limits and Pagination

This Actor uses the JobsIndex jobs API. Results are paginated with page and size.

ParameterDefaultMinMax
page00Depends on size and the item cap
size51100

Individual numeric bounds are checked before a run starts. Query-dependent pagination is checked after the run starts, as explained below.

One Run, One Page

Each run requests one page, not all available pages. size is the requested number of jobs for that page, with an absolute maximum of 100. Company filters can reduce the effective page size to 5 or 20; see Item Caps below.

For searches without company filters, the retrieval window is 1000 jobs: page * size must be less than 1000. The page number is zero-based.

sizeValid page rangeFirst page outside the window
1000-910
200-4950
100-99100
10-9991000

The last page can contain fewer jobs than requested. For example, page=12, size=80 starts at job 960 and can return up to 40 jobs. Narrow the search with filters to retrieve a different result set beyond the window; the Actor does not change the requested page or paginate automatically.

The input schema checks page and size individually. It cannot pre-validate their combination: page=10, size=100 passes the individual bounds but is rejected after a run starts, so the run can still finish as FAILED.

Item Caps

The maximum number of retrievable jobs depends on the query shape:

Query shapeMax itemsEffective max sizeOver-size behavior
No company filter1000100Validation error; not silently capped
Company filter plus another keyword or filter2020Silent cap with capping metadata
Company filter only55Silent cap with capping metadata

When a company-filtered request asks for size greater than the effective cap, the API returns up to the capped number of results instead of erroring. The response metadata includes:

  • size_requested - the original requested size
  • size_capped_by - "company" for the 5-item cap or "company|keywords" for the 20-item cap

On uncapped responses, size_requested and size_capped_by are not present.

Free-Text Query Limits

These limits apply to each available user-entered field and are enforced before the Actor starts.

InputMaximum charactersMaximum operator characters
what50020

The operator-character limit counts ?, +, pipe, and @ together within each input. Longer searches should be split into separate requests. Remaining backend syntax and safety checks can still reject an expression after the run starts.

The current JobsIndex API accepts up to 700 characters per effective query parameter. The smaller limits above, where applicable, and the 20-operator-character guard are Actor-side limits, not a claim that the API rejects every longer expression.

This Actor appends user input to an internal preset. The limits above are for the user-entered values; the combined upstream expression also includes the preset and is checked by JobsIndex. The preset is not replaced.

Field Validation

Apify validates the input schema before creating a run, including requests made directly through the API. A schema violation returns HTTP 400 with error.type = invalid-input; no run is created. API clients should handle this response when starting the Actor; there is no run ID to poll or run error file to fetch.

InputAccepted values / limits
pageInteger 0-999; the usable maximum also depends on size and query shape.
sizeInteger 1-100; company capping remains upstream.
company_domainA domain name only, e.g. example.com; 3-100 raw input characters. No protocol, path, port, or internal spaces. The API trims surrounding ASCII whitespace.
postedRecommended windows: 1d, 1w, 1m, 1y, or a real calendar date (YYYY, YYYY-MM, YYYY-MM-DD). Use 2-10 raw input characters. Surrounding ASCII whitespace is trimmed after the raw length check. Relative amounts use 1-4 digits without leading zeros.
salary2-30 raw input characters. 1-9 digits plus h, d, w, m, or y; a range needs units on both ends, e.g. 20h-30h. Surrounding ASCII whitespace is trimmed. Decimals and currency prefixes are not accepted.
employment_type2-50 raw input characters in total. Comma-separated values; 1-31 characters per item after trimming surrounding spaces. No empty items.
seniority2-50 raw input characters in total. Comma-separated values; 1-31 characters per item after trimming surrounding spaces. No empty items.
remoteremote, on-site, hybrid, or an empty string for no filter.
Other text fieldsRaw input character ranges: region (2-80), city (2-100), postal_code (3-15), metro_area (2-100), title (2-200), company_name (2-150), category (2-100), sub_category (2-100), industry (2-100). Empty optional inputs remain allowed.

Empty optional text fields are allowed and are omitted from the upstream request. Raw input length means the decoded string including surrounding whitespace, before API trimming, not URL-encoded bytes. The schema checks preliminary formats, list structure, and lengths, not whether a matching location, employer, role, or job exists. The API retains its detailed character checks, including permitted Unicode characters in list values. A valid search with no matching jobs succeeds with an empty dataset.

Query-dependent pagination, combined filters, and other backend-only checks remain upstream or runtime checks. If they reject a request after a run starts, the run can still finish as FAILED. Technical errors are not reported as successful searches.

Output

Each run stores job records in the default Apify dataset. The dataset schema includes an Overview table for the most useful fields and a Raw data (all fields) table for the complete JobsIndex record.

Example dataset item:

{
"id": "17494984349364375915",
"title": "Police Officer",
"company_name": "Town of Leesburg, VA",
"company_domain": "leesburgva.gov",
"category": "Security",
"sub_category": "Security Officer",
"country": "United States",
"region": "Virginia",
"city": "Leesburg",
"employment_type": "Full-Time",
"remote": "n/a",
"posted": "2026-02-20",
"url_source": "https://www.governmentjobs.com/careers/leesburgva/jobs/5231856"
}

Field availability depends on the source job posting.