Banner: Web API: Get Salary Details

Web API: Get Salary Details

Get Salary Details API

The 'Get Salary Details' API enables developers to input an occupation and a location, in order to retrieve hourly wage data as well as annual salary data about this occupation in this location. The API recognizes SOC, O*NET, and OES / OEWS occupation codes and titles.

About this data

For more information about the data, please visit the Salary Finder help page.

Resource URL

https://api.careeronestop.org/v1/comparesalaries/{userId}/wage?keyword={keyword}&location={location}&enableMetaData={enableMetaData}

Example Code

using System;

using System.Net.Http;

using System.Net.Http.Headers;

using System.Threading.Tasks;

using System.Collections.Specialized;

using System.Linq;

namespace CareerOneStopAPISample

{

    class Program

    {

        static void Main(string[] args)

        {

            CreateRequest().Wait();

        }

        private static async Task CreateRequest()

        {

   

            var qs = new NameValueCollection();

            qs["keyword"] = "value";

            qs["location"] = "value";

            qs["enableMetaData"] = "value";

            var uri = new UriBuilder(Uri.UriSchemeHttps, "api.careeronestop.org")

            {

                Path = "/v1/comparesalaries/{userId}/wage",

                Query = string.Join("&", qs.AllKeys.Select(key => key + "=" + Uri.EscapeUriString(qs[key])))

            };

           

            using (var http = new HttpClient())

            {

                http.DefaultRequestHeaders.Accept.Clear();

                http.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "Your API Token");

                http.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

                var response = await http.GetAsync(uri.Uri).ConfigureAwait(false);

                if (response.IsSuccessStatusCode)

                {

                    var result = await response.Content.ReadAsStringAsync().ConfigureAwait(false);

                }

            }

        }

    }

}
import java.io.IOException;

import java.net.URI;

import java.net.URISyntaxException;

import org.apache.http.HttpEntity;

import org.apache.http.client.methods.CloseableHttpResponse;

import org.apache.http.client.methods.HttpGet;

import org.apache.http.client.utils.URIBuilder;

import org.apache.http.impl.client.CloseableHttpClient;

import org.apache.http.impl.client.HttpClients;

import org.apache.http.util.EntityUtils;

public class CareerOneStopAPISample {

    public static void main(String[] args) throws IOException, URISyntaxException {

    URI uri = new URIBuilder()

        .setScheme("https")

        .setHost("api.careeronestop.org")

        .setPath("/v1/comparesalaries/{userId}/wage")

        .setParameter("keyword", "value")

        .setParameter("location", "value")

        .setParameter("enableMetaData", "value")

        .build();

    CloseableHttpResponse response = null;

    HttpGet httpGet = null;

    try {

        CloseableHttpClient httpClient = HttpClients.createDefault();

        httpGet = new HttpGet(uri);

        httpGet.setHeader("Content-Type","application/json");

        httpGet.setHeader("Authorization", "Bearer Your API Token");

        response = httpClient.execute(httpGet);

        HttpEntity entity = response.getEntity();

        System.out.println(EntityUtils.toString(entity));

    } finally {

        if(httpGet != null) httpGet.releaseConnection();

        if(response != null) response.close();

    }

   }

}

Request Parameters

Refer to the following table for a list of the required and optional request parameters. All parameter names and values are case sensitive. Important: You must provide all required parameters. Submitting an empty request does not return all possible results; an empty request returns an error.

Parameter Name Value Required? Description
API Token
String
Yes
This value is the unique API Token provided during the CareerOneStop Web API registration process.
userId
String
Yes
This value is the unique UserID provided during the CareerOneStop Web API registration process.
keyword String
Yes Keyword description: The occupation whose salary data you are requesting. This API recognizes OES, SOC, or O*NET taxonomies; can be code or title. For example, all these will retrieve wages for 13-2020/Property Appraisers and Assessors (using OES data released in Spring 2021):
-132020 or 13-2020 or "Property Appraisers and Assessors"
-132022 or 13-2022 or "Appraisers of Personal And Business Property"
location String
Yes Location in which to get wages. System recognizes city and state (example: Chicago, IL), state (IL), or ZIP code (60050).
enableMetaData
boolean
Optional Use this parameter to determine whether to include MetaData in the response.
True- Include metadata (default)
False - exclude metadata

Response Structure

{
  "OccupationDetail": {
    "OccupationTitle": "Nurse Practitioners",
    "OccupationCode": "291171",
    "Request": {
      "InputOccupation": "29-1171.00",
      "InputOccupationCode": "29-1171.00",
      "InputOccupationTitle": "Nurse Practitioners"
    },
    "SocInfo": [
      {
        "SocCode": "291171",
        "SocTitle": "Nurse Practitioners",
        "SocDescription": "Diagnose and treat acute, episodic, or chronic illness, independently or as part of a healthcare team. May focus on health promotion and disease prevention. May order, perform, or interpret diagnostic tests such as lab work and x rays. May prescribe medication. Must be registered nurses who have specialized graduate education."
      }
    ],
    "Wages": {
      "NationalWagesList": [
        {
          "RateType": "Hourly",
          "Pct10": "39.88",
          "Pct25": "45.62",
          "Median": "53.69",
          "Pct75": "62.62",
          "Pct90": "75.08",
          "StFips": "00",
          "Area": "000000",
          "AreaName": "United States"
        },
        {
          "RateType": "Annual",
          "Pct10": "82960",
          "Pct25": "94890",
          "Median": "111680",
          "Pct75": "130240",
          "Pct90": "156160",
          "StFips": "00",
          "Area": "000000",
          "AreaName": "United States"
        }
      ],
      "StateWagesList": [
        {
          "RateType": "Annual",
          "Pct10": "81570",
          "Pct25": "92510",
          "Median": "108530",
          "Pct75": "125770",
          "Pct90": "141340",
          "StFips": "51",
          "Area": "000051",
          "AreaName": "Virginia"
        },
        {
          "RateType": "Hourly",
          "Pct10": "39.22",
          "Pct25": "44.48",
          "Median": "52.18",
          "Pct75": "60.47",
          "Pct90": "67.95",
          "StFips": "51",
          "Area": "000051",
          "AreaName": "Virginia"
        }
      ],
      "WageYear": "2020"
    }
  },
  "MetaData": {
    "Publisher": "CareerOneStop publishes this API (www.careeronestop.org/Developers/WebAPI/web-api.aspx)",
    "Sponsor": "U.S. Department of Labor, Employment and Training Administration",
    "LastAccessDate": 1643142208,
    "CitationSuggested": "This data is delivered by an API from CareerOneStop, sponsored by U.S. Department of Labor, Employment and Training Administration.  \nwww.careeronestop.org\nSalary data are from U.S. Department of Labor, Bureau of Labor Statistics, Occupational Employment and Wage Statistics program (www.bls.gov/oes), May 2020.",
    "DataSource": [
      {
        "DataName": "Wages by occupation",
        "DataSourceName": "U.S. Department of Labor, Bureau of Labor Statistics, Occupational Employment and Wage Statistics (OEWS)",
        "DataSourceUrl": "https://www.bls.gov/oes/",
        "DataLastUpdate": "April 2021",
        "DataVintageOrVersion": "May 2020",
        "DataDescription": "The Occupational Employment and Wage Statistics (OEWS) program produces employment and wage estimates annually for over 800 occupations. These estimates are available for the nation as a whole, for individual states, and for metropolitan and nonmetropolitan areas; national occupational estimates for specific industries are also available.",
        "DataSourceCitation": "Salary data are from U.S. Department of Labor, Bureau of Labor Statistics, Occupational Employment and Wage Statistics (OEWS) program, May 2020 (www.bls.gov/oes/)."
      }
    ]
  }
}
<OccupationWagesResultViewModelxmlns:i="http://www.w3.org/2001/XMLSchema-instance"xmlns="http://schemas.datacontract.org/2004/07/XPAND.CareerOneStop.WebApi.ViewModels"><MetaDataxmlns:d2p1="http://schemas.datacontract.org/2004/07/XPAND.CareerOneStop.WebApi.Core.MetaData"><d2p1:CitationSuggested>This data is delivered by an API from CareerOneStop, sponsored by U.S. Department of Labor, Employment and Training Administration.www.careeronestop.orgSalary data are from U.S. Department of Labor, Bureau of Labor Statistics, Occupational Employment and Wage Statistics program (www.bls.gov/oes), May 2020.</d2p1:CitationSuggested><d2p1:DataSource><d2p1:MetaDataSource><d2p1:DataDescription>The Occupational Employment and Wage Statistics (OEWS) program produces employment and wage estimates annually for over 800 occupations. These estimates are available for the nation as a whole, for individual states, and for metropolitan and nonmetropolitan areas; national occupational estimates for specific industries are also available.</d2p1:DataDescription><d2p1:DataLastUpdate>April 2021</d2p1:DataLastUpdate><d2p1:DataName>Wages by occupation</d2p1:DataName><d2p1:DataSourceCitation>Salary data are from U.S. Department of Labor, Bureau of Labor Statistics, Occupational Employment and Wage Statistics (OEWS) program, May 2020 (www.bls.gov/oes/).</d2p1:DataSourceCitation><d2p1:DataSourceName>U.S. Department of Labor, Bureau of Labor Statistics, Occupational Employment and Wage Statistics (OEWS)</d2p1:DataSourceName><d2p1:DataSourceUrl>https://www.bls.gov/oes/</d2p1:DataSourceUrl><d2p1:DataVintageOrVersion>May 2020</d2p1:DataVintageOrVersion></d2p1:MetaDataSource></d2p1:DataSource><d2p1:LastAccessDate>1643142709</d2p1:LastAccessDate><d2p1:Publisher>CareerOneStop publishes this API (www.careeronestop.org/Developers/WebAPI/web-api.aspx)</d2p1:Publisher><d2p1:Sponsor>U.S. Department of Labor, Employment and Training Administration</d2p1:Sponsor></MetaData><OccupationDetail><OccupationCode>291171</OccupationCode><OccupationTitle>Nurse Practitioners</OccupationTitle><Request><InputOccupation>29-1171.00</InputOccupation><InputOccupationCode>29-1171.00</InputOccupationCode><InputOccupationTitle>Nurse Practitioners</InputOccupationTitle></Request><SocInfo><SocDetails><SocCode>291171</SocCode><SocDescription>Diagnose and treat acute, episodic, or chronic illness, independently or as part of a healthcare team. May focus on health promotion and disease prevention. May order, perform, or interpret diagnostic tests such as lab work and x rays. May prescribe medication. Must be registered nurses who have specialized graduate education.</SocDescription><SocTitle>Nurse Practitioners</SocTitle></SocDetails></SocInfo><Wages><BLSAreaWagesList i:nil="true"/><NationalWagesList><WageDetails><Area>000000</Area><AreaName>United States</AreaName><Median>53.69</Median><Pct10>39.88</Pct10><Pct25>45.62</Pct25><Pct75>62.62</Pct75><Pct90>75.08</Pct90><RateType>Hourly</RateType><StFips>00</StFips></WageDetails><WageDetails><Area>000000</Area><AreaName>United States</AreaName><Median>111680</Median><Pct10>82960</Pct10><Pct25>94890</Pct25><Pct75>130240</Pct75><Pct90>156160</Pct90><RateType>Annual</RateType><StFips>00</StFips></WageDetails></NationalWagesList><StateWagesList><WageDetails><Area>000051</Area><AreaName>Virginia</AreaName><Median>108530</Median><Pct10>81570</Pct10><Pct25>92510</Pct25><Pct75>125770</Pct75><Pct90>141340</Pct90><RateType>Annual</RateType><StFips>51</StFips></WageDetails><WageDetails><Area>000051</Area><AreaName>Virginia</AreaName><Median>52.18</Median><Pct10>39.22</Pct10><Pct25>44.48</Pct25><Pct75>60.47</Pct75><Pct90>67.95</Pct90><RateType>Hourly</RateType><StFips>51</StFips></WageDetails></StateWagesList><WageYear>2020</WageYear></Wages></OccupationDetail></OccupationWagesResultViewModel>

Response Parameters

Name
Description
Type
Parent
OccupationDetail
Details about the occupation
Object
Empty Cell
OccupationTitle
OES Occupation
String
OccupationDetail
OccupationCode
OES Occupation 
String
OccupationDetail
Request
Details about the request that generated this response
Object
OccupationDetail
InputOccupation
The literal input provided
String
Request
InputOccupationCode
The formatted code for occupation provided
String
Request
InputOccupationTitle
Title corresponding to input provided
String
Request
SocInfo
If InputOccupation is an OES-specific occupation, the SocInfo identifies one of the corresponding SOC occupations
List of Strings
OccupationDetail
SocCode
SOC occupation code
String
SocInfo
SocTitle
SOC occupation title
String
SocInfo
SocDescription
Wages, from BLS OEWS. Please note: When wage data is displayed, '115+' indicates the hourly wage is equal to or greater than $115.00, while '239,200+' indicates an annual salary equal to or greater than $239,200.
String
SocInfo
Wages
Wages
Object
OccupationDetail
NationalWagesList
List of national wages information
List of Objects
Wages
RateType
Rate Type can be Hourly or Annual
String
NationalWagesList
Pct10
Wage at 10th percentile
String
NationalWagesList
Pct25
Wage at 25th percentile
String
NationalWagesList
Median
Wage at median
String
NationalWagesList
Pct75
Wage at 75th percentile
String
NationalWagesList
Pct90
Wage at 90th percentile
String
NationalWagesList
StFips
State FIPS code
String
NationalWagesList
Area
Always '00' for United States as a whole.
String
NationalWagesList
AreaName
Always "United States"
String
NationalWagesList
StateWagesList
List of state wages information
List of Objects
Wages
RateType
Rate Type can be Hourly or Annual
String
StageWagesList
Pct10
Wage at 10th percentile
String
StageWagesList
Pct25
Wage at 25th percentile
String
StageWagesList
Median
Wage at median
String
StageWagesList
Pct75
Wage at 75th percentile
String
StageWagesList
Pct90
Wage at 90th percentile
String
StageWagesList
StFips
State FIPS code
String
StageWagesList
Area
2-digit FIPS code associated with this state.
String
StageWagesList
AreaName
Full name of this state or territory
String
StageWagesList
BLSAreaWagesList
List of BLS Area Wages information
List of Objects
Wages
RateType
Rate Type can be Hourly or Annual
String
BLSAreaWagesList
Pct10
Wage at 10th percentile
String
BLSAreaWagesList
Pct25
Wage at 25th percentile
String
BLSAreaWagesList
Median
Wage at median
String
BLSAreaWagesList
Pct75
Wage at 75th percentile
String
BLSAreaWagesList
Pct90
Wage at 90th percentile
String
BLSAreaWagesList
StFips
State FIPS code
String
BLSAreaWagesList
Area
Code associated with the area of wages reported here. The area is a metropolitan area (MSA or MNECTA), or a nonmetropolitan area defined by BLS OES.
String
BLSAreaWagesList
AreaName
Name for this area
String
BLSAreaWagesList
WageYear
Wage year
String
Wages
MetaData
Information about the source of the API
Object
Empty Cell
Publisher
Publisher of the API
String
MetaData
Sponsor
Sponsor of the API
String
MetaData
LastAccessDate           
When the API was run, using Unix "epoch" format. Convert to date and time using a Unix epoch converter.
String
MetaData
CitationSuggested
If you use this API, CareerOneStop suggests you use this citation.
String
MetaData
DataSource
The data source object(s)
List of Objects
MetaData
DataName
Name of data
String
DataSource
DataSourceName
Name of data source
String
DataSource
DataSourceUrl
Url of data source
String
DataSource
DataLastUpdate
Date when CareerOneStop last updated this data
String
DataSource
DataVintageOrVersion
Version or vintage of the data
String
DataSource
DataDescription
Description of the data
String
DataSource
DataSourceCitation
Suggested citation for this data source
String
DataSource

Errors

Error/Status Code
Description
200
OK / Success. The request went through successfully and there is a response body.
400
Bad Request (Request was invalid or missing parameters)
401    
Unauthorized. This error occurs specifically when authentication is required and has failed or has not yet been provided correctly. (ex: Invalid API Token)
404
This error will be shown in two scenarios 1) Not found - (An error occurred) and 2) Not found - (No data available)
500
Internal Server Error. This error will occur when there is something critically wrong in the API call.