/usajobs/jobs/facets
curl --request POST \
--url https://api.anysite.io/api/usajobs/jobs/facets \
--header 'Content-Type: application/json' \
--header 'access-token: <api-key>' \
--data '
{
"timeout": 300,
"keyword": "<string>",
"location": "<string>",
"job_title": [
"<string>"
],
"min_salary": 1,
"max_salary": 1,
"pay_plan": [
"<string>"
],
"hiring_path": [],
"appointment_type": [],
"is_supervisory": true,
"work_schedule": [],
"travel_percentage": [],
"security_clearance": [],
"job_series": [
"<string>"
],
"cyber_work_role": [
"<string>"
],
"cyber_work_grouping": [
"<string>"
],
"department": [
"<string>"
],
"agency": [
"<string>"
],
"exclude_organizations": false,
"sort_by": "relevance"
}
'import requests
url = "https://api.anysite.io/api/usajobs/jobs/facets"
payload = {
"timeout": 300,
"keyword": "<string>",
"location": "<string>",
"job_title": ["<string>"],
"min_salary": 1,
"max_salary": 1,
"pay_plan": ["<string>"],
"hiring_path": [],
"appointment_type": [],
"is_supervisory": True,
"work_schedule": [],
"travel_percentage": [],
"security_clearance": [],
"job_series": ["<string>"],
"cyber_work_role": ["<string>"],
"cyber_work_grouping": ["<string>"],
"department": ["<string>"],
"agency": ["<string>"],
"exclude_organizations": False,
"sort_by": "relevance"
}
headers = {
"access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
timeout: 300,
keyword: '<string>',
location: '<string>',
job_title: ['<string>'],
min_salary: 1,
max_salary: 1,
pay_plan: ['<string>'],
hiring_path: [],
appointment_type: [],
is_supervisory: true,
work_schedule: [],
travel_percentage: [],
security_clearance: [],
job_series: ['<string>'],
cyber_work_role: ['<string>'],
cyber_work_grouping: ['<string>'],
department: ['<string>'],
agency: ['<string>'],
exclude_organizations: false,
sort_by: 'relevance'
})
};
fetch('https://api.anysite.io/api/usajobs/jobs/facets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.anysite.io/api/usajobs/jobs/facets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'timeout' => 300,
'keyword' => '<string>',
'location' => '<string>',
'job_title' => [
'<string>'
],
'min_salary' => 1,
'max_salary' => 1,
'pay_plan' => [
'<string>'
],
'hiring_path' => [
],
'appointment_type' => [
],
'is_supervisory' => true,
'work_schedule' => [
],
'travel_percentage' => [
],
'security_clearance' => [
],
'job_series' => [
'<string>'
],
'cyber_work_role' => [
'<string>'
],
'cyber_work_grouping' => [
'<string>'
],
'department' => [
'<string>'
],
'agency' => [
'<string>'
],
'exclude_organizations' => false,
'sort_by' => 'relevance'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"access-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.anysite.io/api/usajobs/jobs/facets"
payload := strings.NewReader("{\n \"timeout\": 300,\n \"keyword\": \"<string>\",\n \"location\": \"<string>\",\n \"job_title\": [\n \"<string>\"\n ],\n \"min_salary\": 1,\n \"max_salary\": 1,\n \"pay_plan\": [\n \"<string>\"\n ],\n \"hiring_path\": [],\n \"appointment_type\": [],\n \"is_supervisory\": true,\n \"work_schedule\": [],\n \"travel_percentage\": [],\n \"security_clearance\": [],\n \"job_series\": [\n \"<string>\"\n ],\n \"cyber_work_role\": [\n \"<string>\"\n ],\n \"cyber_work_grouping\": [\n \"<string>\"\n ],\n \"department\": [\n \"<string>\"\n ],\n \"agency\": [\n \"<string>\"\n ],\n \"exclude_organizations\": false,\n \"sort_by\": \"relevance\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.anysite.io/api/usajobs/jobs/facets")
.header("access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"timeout\": 300,\n \"keyword\": \"<string>\",\n \"location\": \"<string>\",\n \"job_title\": [\n \"<string>\"\n ],\n \"min_salary\": 1,\n \"max_salary\": 1,\n \"pay_plan\": [\n \"<string>\"\n ],\n \"hiring_path\": [],\n \"appointment_type\": [],\n \"is_supervisory\": true,\n \"work_schedule\": [],\n \"travel_percentage\": [],\n \"security_clearance\": [],\n \"job_series\": [\n \"<string>\"\n ],\n \"cyber_work_role\": [\n \"<string>\"\n ],\n \"cyber_work_grouping\": [\n \"<string>\"\n ],\n \"department\": [\n \"<string>\"\n ],\n \"agency\": [\n \"<string>\"\n ],\n \"exclude_organizations\": false,\n \"sort_by\": \"relevance\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anysite.io/api/usajobs/jobs/facets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"timeout\": 300,\n \"keyword\": \"<string>\",\n \"location\": \"<string>\",\n \"job_title\": [\n \"<string>\"\n ],\n \"min_salary\": 1,\n \"max_salary\": 1,\n \"pay_plan\": [\n \"<string>\"\n ],\n \"hiring_path\": [],\n \"appointment_type\": [],\n \"is_supervisory\": true,\n \"work_schedule\": [],\n \"travel_percentage\": [],\n \"security_clearance\": [],\n \"job_series\": [\n \"<string>\"\n ],\n \"cyber_work_role\": [\n \"<string>\"\n ],\n \"cyber_work_grouping\": [\n \"<string>\"\n ],\n \"department\": [\n \"<string>\"\n ],\n \"agency\": [\n \"<string>\"\n ],\n \"exclude_organizations\": false,\n \"sort_by\": \"relevance\"\n}"
response = http.request(request)
puts response.read_body[
{
"name": "<string>",
"code": "<string>",
"@type": "UsajobsJobFacetGroup",
"values": []
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}/usajobs
/usajobs/jobs/facets
Get aggregated counts of open US federal job announcements broken down by agency, department, occupational series, hiring path, appointment type, work schedule, travel, security clearance, supervisory status, telework, remote and relocation. Accepts the same filters as the USAJOBS job search endpoint, so the aggregation is always computed over the matching subset of announcements.
Price: 1 credit
POST
/
api
/
usajobs
/
jobs
/
facets
/usajobs/jobs/facets
curl --request POST \
--url https://api.anysite.io/api/usajobs/jobs/facets \
--header 'Content-Type: application/json' \
--header 'access-token: <api-key>' \
--data '
{
"timeout": 300,
"keyword": "<string>",
"location": "<string>",
"job_title": [
"<string>"
],
"min_salary": 1,
"max_salary": 1,
"pay_plan": [
"<string>"
],
"hiring_path": [],
"appointment_type": [],
"is_supervisory": true,
"work_schedule": [],
"travel_percentage": [],
"security_clearance": [],
"job_series": [
"<string>"
],
"cyber_work_role": [
"<string>"
],
"cyber_work_grouping": [
"<string>"
],
"department": [
"<string>"
],
"agency": [
"<string>"
],
"exclude_organizations": false,
"sort_by": "relevance"
}
'import requests
url = "https://api.anysite.io/api/usajobs/jobs/facets"
payload = {
"timeout": 300,
"keyword": "<string>",
"location": "<string>",
"job_title": ["<string>"],
"min_salary": 1,
"max_salary": 1,
"pay_plan": ["<string>"],
"hiring_path": [],
"appointment_type": [],
"is_supervisory": True,
"work_schedule": [],
"travel_percentage": [],
"security_clearance": [],
"job_series": ["<string>"],
"cyber_work_role": ["<string>"],
"cyber_work_grouping": ["<string>"],
"department": ["<string>"],
"agency": ["<string>"],
"exclude_organizations": False,
"sort_by": "relevance"
}
headers = {
"access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
timeout: 300,
keyword: '<string>',
location: '<string>',
job_title: ['<string>'],
min_salary: 1,
max_salary: 1,
pay_plan: ['<string>'],
hiring_path: [],
appointment_type: [],
is_supervisory: true,
work_schedule: [],
travel_percentage: [],
security_clearance: [],
job_series: ['<string>'],
cyber_work_role: ['<string>'],
cyber_work_grouping: ['<string>'],
department: ['<string>'],
agency: ['<string>'],
exclude_organizations: false,
sort_by: 'relevance'
})
};
fetch('https://api.anysite.io/api/usajobs/jobs/facets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.anysite.io/api/usajobs/jobs/facets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'timeout' => 300,
'keyword' => '<string>',
'location' => '<string>',
'job_title' => [
'<string>'
],
'min_salary' => 1,
'max_salary' => 1,
'pay_plan' => [
'<string>'
],
'hiring_path' => [
],
'appointment_type' => [
],
'is_supervisory' => true,
'work_schedule' => [
],
'travel_percentage' => [
],
'security_clearance' => [
],
'job_series' => [
'<string>'
],
'cyber_work_role' => [
'<string>'
],
'cyber_work_grouping' => [
'<string>'
],
'department' => [
'<string>'
],
'agency' => [
'<string>'
],
'exclude_organizations' => false,
'sort_by' => 'relevance'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"access-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.anysite.io/api/usajobs/jobs/facets"
payload := strings.NewReader("{\n \"timeout\": 300,\n \"keyword\": \"<string>\",\n \"location\": \"<string>\",\n \"job_title\": [\n \"<string>\"\n ],\n \"min_salary\": 1,\n \"max_salary\": 1,\n \"pay_plan\": [\n \"<string>\"\n ],\n \"hiring_path\": [],\n \"appointment_type\": [],\n \"is_supervisory\": true,\n \"work_schedule\": [],\n \"travel_percentage\": [],\n \"security_clearance\": [],\n \"job_series\": [\n \"<string>\"\n ],\n \"cyber_work_role\": [\n \"<string>\"\n ],\n \"cyber_work_grouping\": [\n \"<string>\"\n ],\n \"department\": [\n \"<string>\"\n ],\n \"agency\": [\n \"<string>\"\n ],\n \"exclude_organizations\": false,\n \"sort_by\": \"relevance\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.anysite.io/api/usajobs/jobs/facets")
.header("access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"timeout\": 300,\n \"keyword\": \"<string>\",\n \"location\": \"<string>\",\n \"job_title\": [\n \"<string>\"\n ],\n \"min_salary\": 1,\n \"max_salary\": 1,\n \"pay_plan\": [\n \"<string>\"\n ],\n \"hiring_path\": [],\n \"appointment_type\": [],\n \"is_supervisory\": true,\n \"work_schedule\": [],\n \"travel_percentage\": [],\n \"security_clearance\": [],\n \"job_series\": [\n \"<string>\"\n ],\n \"cyber_work_role\": [\n \"<string>\"\n ],\n \"cyber_work_grouping\": [\n \"<string>\"\n ],\n \"department\": [\n \"<string>\"\n ],\n \"agency\": [\n \"<string>\"\n ],\n \"exclude_organizations\": false,\n \"sort_by\": \"relevance\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anysite.io/api/usajobs/jobs/facets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"timeout\": 300,\n \"keyword\": \"<string>\",\n \"location\": \"<string>\",\n \"job_title\": [\n \"<string>\"\n ],\n \"min_salary\": 1,\n \"max_salary\": 1,\n \"pay_plan\": [\n \"<string>\"\n ],\n \"hiring_path\": [],\n \"appointment_type\": [],\n \"is_supervisory\": true,\n \"work_schedule\": [],\n \"travel_percentage\": [],\n \"security_clearance\": [],\n \"job_series\": [\n \"<string>\"\n ],\n \"cyber_work_role\": [\n \"<string>\"\n ],\n \"cyber_work_grouping\": [\n \"<string>\"\n ],\n \"department\": [\n \"<string>\"\n ],\n \"agency\": [\n \"<string>\"\n ],\n \"exclude_organizations\": false,\n \"sort_by\": \"relevance\"\n}"
response = http.request(request)
puts response.read_body[
{
"name": "<string>",
"code": "<string>",
"@type": "UsajobsJobFacetGroup",
"values": []
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
API token from the dashboard
Headers
Body
application/json
Required range:
20 <= x <= 1500Available options:
5, 10, 25, 50, 100 Required range:
x >= 0Required range:
x >= 0Available options:
public, fed-competitive, fed-excepted, fed-internal-search, fed-transition, land, vet, mspouse, nguard, student, graduates, ses, disability, overseas, native, peace, special-authorities Available options:
15320, 15522, 15328, 15327, 15317, 15326, 15322, 15323, 15318, 15321, 15319 Available options:
1, 2, 3, 4, 5, 6 Available options:
0, 1, 2, 5, 7, 8 Available options:
0, 1, 2, 3, 4, 5, 7, 8 Available options:
remote, telework Available options:
relevance, recently_posted, closing_soon, highest_salary, lowest_salary ⌘I