US Government Jobs API
Pricing
from $1.50 / 1,000 job records
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.
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
2 days ago
Last modified
Categories
Features
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 Stateswhat = @(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
| Parameter | Description | Example |
|---|---|---|
salary | Salary amount or range filter. | 20h-30h |
what | Optional role/category search within US government jobs. The Actor appends this to the internal .gov/.mil source preset. | police |
country | Fixed preset. Runtime always uses United States; changes are ignored. | United States |
region | State, province, or region. | California |
city | City filter. | Sacramento |
postal_code | Postal or ZIP code filter. | 95814 |
metro_area | Metropolitan area filter. | Sacramento-Roseville-Folsom, CA |
title | Job title filter. | Police Officer |
company_name | Public employer name filter. | Town of Leesburg, VA |
company_domain | Employer domain filter. | leesburgva.gov |
category | Job category filter. | Security |
sub_category | More specific job function or role group. | Security Officer |
industry | Company industry filter. | Government |
posted | Relative posting age or ISO date. Empty by default to cover the broader live public jobs index. | 1w |
employment_type | Employment type. | Full-Time |
remote | Work arrangement filter. Supported values: remote, on-site, hybrid. | on-site |
seniority | Seniority level. | Senior |
page | Page number, starting from 0. | 0 |
size | Number of results per page. Default 5, min 1, max 100. | 5 |
Search Behavior
The internal government-jobs preset searches across:
url_sourcecompany_domain
When a user provides what, the Actor searches that value across:
titletitle_rawcategorysub_category
This keeps user search focused on the role or job family while preserving the government-jobs filter.
Examples:
what = policewhat = nursewhat = engineerwhat = 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 healthwhat = 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_domaincategory,sub_category,seniority,industryemployment_type,remote,posted,salary
Location Filtering
This Actor is fixed to country=United States. Use structured location filters to narrow results within the US:
regioncitypostal_codemetro_area
Limits and Pagination
This Actor uses the JobsIndex jobs API. Results are paginated with page and size.
| Parameter | Default | Min | Max |
|---|---|---|---|
page | 0 | 0 | Depends on size and the item cap |
size | 5 | 1 | 100 |
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.
size | Valid page range | First page outside the window |
|---|---|---|
| 100 | 0-9 | 10 |
| 20 | 0-49 | 50 |
| 10 | 0-99 | 100 |
| 1 | 0-999 | 1000 |
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 shape | Max items | Effective max size | Over-size behavior |
|---|---|---|---|
| No company filter | 1000 | 100 | Validation error; not silently capped |
| Company filter plus another keyword or filter | 20 | 20 | Silent cap with capping metadata |
| Company filter only | 5 | 5 | Silent 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 requestedsizesize_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.
| Input | Maximum characters | Maximum operator characters |
|---|---|---|
what | 500 | 20 |
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.
| Input | Accepted values / limits |
|---|---|
page | Integer 0-999; the usable maximum also depends on size and query shape. |
size | Integer 1-100; company capping remains upstream. |
company_domain | A 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. |
posted | Recommended 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. |
salary | 2-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_type | 2-50 raw input characters in total. Comma-separated values; 1-31 characters per item after trimming surrounding spaces. No empty items. |
seniority | 2-50 raw input characters in total. Comma-separated values; 1-31 characters per item after trimming surrounding spaces. No empty items. |
remote | remote, on-site, hybrid, or an empty string for no filter. |
| Other text fields | Raw 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.