Tutorials - Code List

This tutorial will show you how to use the USAJOBS Code List API to obtain code values used by the search APIs. The base URL for the Search API is: https://data.usajobs.gov/api/codelist/[endpoint].

Agency Subelements

The Agency Subelements endpoint returns a list of agencies and the corresponding organization code. The code value in each list item is used to filter search results using the Organization parameter.

JavaScript
cURL
var request = require('request');

request({
    url: 'https://data.usajobs.gov/api/codelist/agencysubelements',
    method: 'GET'
}, function(error, response, body) {
    var data = JSON.parse(body);
});
$ curl https://data.usajobs.gov/api/codelist/agencysubelements
Result (JSON):{
    "CodeList": [{
        "ValidValue": [
            {
                "Code": "LP00",
                "Value": "Government Publishing Office",
                "LastModified": "2015-03-10T00:00:00",
                "IsDisabled": "No"
            },
            ...
        ],
        "id": "AgencySubElement"
    }],
    "DateGenerated": "2015-04-05T18:55:44.3995692-04:00"
}

Occupational Series

The Occupational Series endpoint returns a list of job categories and the corresponding job category code. The code value in each list item is used to filter search results using the JobCategoryCode parameter.

JavaScript
cURL
var request = require('request');

request({
    url: 'https://data.usajobs.gov/api/codelist/occupationalseries',
    method: 'GET'
}, function(error, response, body) {
    var data = JSON.parse(body);
});
$ curl https://data.usajobs.gov/api/codelist/occupationalseries
Result (JSON):{
    "CodeList": [{
        "ValidValue": [
            {
                "Code": "0308",                                          
                "Value": "Records & Information Management",                                          
                "LastModified": "2015-04-24T00:00:00",                                         
                "IsDisabled": "No"
            },
            ...
        ],
        "id": "OccupationalSeries"
    }],
    "DateGenerated": "2015-04-05T18:55:44.3995692-04:00"
}

Pay Plans

The Pay Plans endpoint returns a list of pay plans and the corresponding pay plan code.

JavaScript
cURL
var request = require('request');

request({
    url: 'https://data.usajobs.gov/api/codelist/payplans',
    method: 'GET'
}, function(error, response, body) {
    var data = JSON.parse(body);
});
$ curl https://data.usajobs.gov/api/codelist/payplans
Result (JSON):{
    "CodeList": [{
        "ValidValue": [
            {
                "Code": "IM",                                          
                "Value": "Incident Management",                                          
                "LastModified": "2015-11-16T13:54:25.87",                                          
                "IsDisabled": "No"
            },
            ...
        ],
        "id": "PayPlans"
    }],
    "DateGenerated": "2015-04-05T18:55:44.3995692-04:00"
}

Postal Codes

The Postal Codes endpoint returns a list of postal code values.

JavaScript
cURL
var request = require('request');

request({
    url: 'https://data.usajobs.gov/api/codelist/postalcodes',
    method: 'GET'
}, function(error, response, body) {
    var data = JSON.parse(body);
});
$ curl https://data.usajobs.gov/api/codelist/postalcodes
Result (JSON):{
    "CodeList": [{
        "ValidValue": [
            {
                "Code": "11358",                                          
                "RefLocID": 109953,                                          
                "City": "Auburndale",                                          
                "USCounty": "Queens County",                                          
                "CountrySubdivision": "NY",                                          
                "Country": "US",                                          
                "LastModified": "2015-11-16T13:54:25.87",                                          
                "IsDisabled": "No"   
            },
            ...
        ],
        "id": "PostalCode"
    }],
    "DateGenerated": "2015-04-05T18:55:44.3995692-04:00"
}

Geographic Locations Codes

The Geographic Locations endpoint returns a list of geographic location values.

JavaScript
cURL
var request = require('request');

request({
    url: 'https://data.usajobs.gov/api/codelist/geoloccodes',
    method: 'GET'
}, function(error, response, body) {
    var data = JSON.parse(body);
});
$ curl https://data.usajobs.gov/api/codelist/geoloccodes
Result (JSON):{
    "CodeList": [{
        "ValidValue": [
            {
                "Code": "530539053",              
                "City": "Dupont",              
                "USCounty": "Pierce County",              
                "CountrySubdivision": "WA",              
                "Country": "US",              
                "LastModified": "2014-03-10T00:00:00",              
                "IsDisabled": "No"   
            },
            ...
        ],
        "id": "GeoLocCode"
    }],
    "DateGenerated": "2015-04-05T18:55:44.3995692-04:00"
}

Countries

The Countries endpoint returns a list of countries.

JavaScript
cURL
var request = require('request');

request({
    url: 'https://data.usajobs.gov/api/codelist/countries',
    method: 'GET'
}, function(error, response, body) {
    var data = JSON.parse(body);
});
$ curl https://data.usajobs.gov/api/codelist/countries
Result (JSON):{
    "CodeList": [{
        "ValidValue": [
            {
                "Code": "TL",
                "Value": "Timor-Leste",
                "LastModified": "2012-12-02T00:00:00",
                "IsDisabled": "No"  
            },
            ...
        ],
        "id": "CountryCode"
    }],
    "DateGenerated": "2015-04-05T18:55:44.3995692-04:00"
}

Country Subdivisions

The Country Subdivisions endpoint returns a list of states, provinces or territories within countries.

JavaScript
cURL
var request = require('request');

request({
    url: 'https://data.usajobs.gov/api/codelist/countrysubdivisions',
    method: 'GET'
}, function(error, response, body) {
    var data = JSON.parse(body);
});
$ curl https://data.usajobs.gov/api/codelist/countrysubdivisions
Result (JSON):{
    "CodeList": [{
        "ValidValue": [
            {
                "Code": "UT",
                "Value": "Utah",
                "ParentCode": "US",
                "LastModified": "2011-07-08T00:00:00",
                "IsDisabled": "No"  
            },
            ...
        ],
        "id": "CountrySubdivisionCode"
    }],
    "DateGenerated": "2015-04-05T18:55:44.3995692-04:00"
}