Banner: Web API: List Occupations by Skills Match

Web API: List Occupations by Skills Match

List Occupations by Skills Match

The 'List Occupations by Skills Match' API enables developers to input one occupation and location, and get a list of occupations that use similar skills and knowledge. For each of those matching occupations, the API provides data about the wages, typical education and training levels at entry, and other data. 

About this data

Data in the API come from U.S. Department of Labor and other sources, detailed here. This API is designed to support MySkills MyFuture; that tool demonstrates some of the things your could do with the API.

Resource URL

https://api.careeronestop.org/v1/occupation/{userId}/{onetCode}/{location}/{radius}

Example Code

using System;

using System.Net.Http;

using System.Net.Http.Headers;

using System.Threading.Tasks;

namespace CareerOneStopAPISample

{

    class Program

    {

        static void Main(string[] args)

        {

            CreateRequest().Wait();

        }

        private static async Task CreateRequest()

        {

   

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

            {

                Path = "/v1/occupation/{userId}/{onetCode}/{location}/{radius}"

            };

           

            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/occupation/{userId}/{onetCode}/{location}/{radius}")

        .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.
onetCode String
Yes
This value accepts a search term, which must be an occupation  (O*NET code).
location
String
Yes This value can be a city, state (Chicago, IL) or state (IL) or ZIP code (61299). For national data, use 'US'. Location is used to provide data about wages and the 'JobCount" response parameter. 
radius
String
Yes This value is a radius in miles around a city or a ZIP code. Valid values include 5, 25, 50, 100. This is used only to provide the 'JobCount' response parameter, and only when location is a city or ZIP code.
enableMetaData
boolean
Optional Use this parameter to determine whether to include MetaData in the response.
True- Include metadata (default)
False - exclude metadata

Response Structure

{
  "OccupationMatchResult": [
    {
      "AnnualWage": "string",
      "BrightOutlook": true,
      "EducationTitle": "string",
      "GreenOccupation": true,
      "HourlyWage": "string",
      "JobCount": 6,
      "OccupationCode": "string",
      "OccupationDescription": "string",
      "OccupationTitle": "string",
      "MatchValue": 10.0,
      "VideoCode": "string",
      "VideoTitle": "string",
      "AnnualWageRate": {
        "Percentile10": 1.0,
        "Percentile25": 2.0,
        "Median": 3.0,
        "Percentile75": 4.0,
        "Percentile90": 5.0
      },
      "HourlyWageRate": {
        "Percentile10": 1.0,
        "Percentile25": 2.0,
        "Median": 3.0,
        "Percentile75": 4.0,
        "Percentile90": 5.0
      }
    }
  ],
  "TotalRecords": 1,
  "MetaData": {
    "Publisher": "string",
    "Sponsor": "string",
    "LastAccessDate": 3,
    "CitationSuggested": "string",
    "DataSource": [
      {
        "DataName": "string",
        "DataSourceName": "string",
        "DataSourceUrl": "string",
        "DataLastUpdate": "string",
        "DataVintageOrVersion": "string",
        "DataDescription": "string"
        "DataSourceCitation": "string"
      }
    ]
  }
}
<OccupationMatchResultViewModel
xmlns="http://schemas.datacontract.org/2004/07/XPAND.CareerOneStop.WebApi.ViewModels"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <MetaData xmlns:d2p1="http://schemas.datacontract.org/2004/07/XPAND.CareerOneStop.WebApi.Core.MetaData">
    <d2p1:CitationSuggested>string</d2p1:CitationSuggested>
    <d2p1:DataSource>
      <d2p1:MetaDataSource>
        <d2p1:DataDescription>string</d2p1:DataDescription>
        <d2p1:DataLastUpdate>string</d2p1:DataLastUpdate>
        <d2p1:DataName>string</d2p1:DataName>
        <d2p1:DataSourceName>string</d2p1:DataSourceName>
        <d2p1:DataSourceUrl>string</d2p1:DataSourceUrl>
        <d2p1:DataVintageOrVersion>string</d2p1:DataVintageOrVersion> 
        <d2p1:DataSourceCitation>string</d2p1:DataSourceCitation> 
      </d2p1:MetaDataSource>     </d2p1:DataSource>
    <d2p1:LastAccessDate>3</d2p1:LastAccessDate>
    <d2p1:Publisher>string</d2p1:Publisher>
    <d2p1:Sponsor>string</d2p1:Sponsor>
  </MetaData>
  <OccupationMatchResult>
    <OccupationMatch>
      <AnnualWage>string</AnnualWage>
      <AnnualWageRate xmlns:d4p1="http://schemas.datacontract.org/2004/07/API.CareerOneStop.DTO.MySkillsMyFuture">
        <d4p1:Median>3</d4p1:Median>
        <d4p1:Percentile10>1</d4p1:Percentile10>
        <d4p1:Percentile25>2</d4p1:Percentile25>
        <d4p1:Percentile75>4</d4p1:Percentile75>
        <d4p1:Percentile90>5</d4p1:Percentile90>
      </AnnualWageRate>
      <BrightOutlook>true</BrightOutlook>
      <EducationTitle>string</EducationTitle>
      <GreenOccupation>true</GreenOccupation>
      <HourlyWage>string</HourlyWage>
      <HourlyWageRate xmlns:d4p1="http://schemas.datacontract.org/2004/07/API.CareerOneStop.DTO.MySkillsMyFuture">
        <d4p1:Median>3</d4p1:Median>
        <d4p1:Percentile10>1</d4p1:Percentile10>
        <d4p1:Percentile25>2</d4p1:Percentile25>
        <d4p1:Percentile75>4</d4p1:Percentile75>
        <d4p1:Percentile90>5</d4p1:Percentile90>
      </HourlyWageRate>
      <JobCount>6</JobCount>
      <MatchValue>10</MatchValue>
      <OccupationCode>string</OccupationCode>
      <OccupationDescription>string</OccupationDescription>
      <OccupationTitle>string</OccupationTitle>
      <VideoCode>string</VideoCode>
      <VideoTitle>string</VideoTitle>
    </OccupationMatch>
  </OccupationMatchResult>
  <TotalRecords>1</TotalRecords>
</OccupationMatchResultViewModel>

Response Parameters

Name
Description
Type
Parent
OccupationMatchResult
One occupation that uses similar skills and knowledge to the input occupation
List of Objects
AnnualWage
Text representation of the typical annual salary for this occupation, in the location provided, using 25th percentile and 75th percentile. If either or both of these figures are too high for BLS OES to estimate, then we represent the wage as "$208,000+".
String
OccupationMatchResult
BrightOutlook
Data from O*NET -- does this occupation have a bright outlook?
Boolean
OccupationMatchResult
EducationTitle
Typical level of education needed to enter this career
String
OccupationMatchResult
GreenOccupation
Data from O*NET -- is this occupation considered "green"?
Boolean
OccupationMatchResult
HourlyWage
Text representation of the typical hourly wages for this occupation, in the location provided, using 25th percentile and 75th percentile. If either or both of these figures are too high for BLS OES to estimate, then we represent the wage as "$100+"
String
OccupationMatchResult
JobCount
Count of job postings that match input parameters of this occupation code, in this location, and within this radius (if city or ZIP), from NLx, at this moment
Integer
OccupationMatchResult
OccupationCode
Code for this matching O*NET occupation
String
OccupationMatchResult
OccupationDescription
Description for this matching O*NET occupation 
String
OccupationMatchResult
OccupationTitle
Title for this matching O*NET occupation
String
OccupationMatchResult
MatchValue
The match value calculated by CareeroneStop. Roughly measures how closely the skills and knowledge used in this occupation match those used in the input occupation. Scale is 0 to 100, with 100 representing a perfect match and 0 representing no match at all. 
Decimal
OccupationMatchResult
VideoCode
Occupation code for the career video on CareerOneStop that's a best match for this OccupationMatchResult. Some of our career videos cover a group of occupations; in all cases the videos are coded to just one occupation. 
String
OccupationMatchResult
VideoTitle
Occupation title for the career video on CareerOneStop that's a best match for this OccupationMatchResult. Some of our career videos cover a group of occupations; in all cases the videos are coded to just one occupation. 
String
OccupationMatchResult
AnnualWageRate
Annual wage (salary) data for this occupation in this location. If a value is 999,999, that's a signal that the annual wage is at least $208,000.
Object
OccupationMatchResult
Percentile10
Wages at 10th percentile
Decimal
AnnualWageRate
Percentile25
Wages at 25th percentile
Decimal
AnnualWageRate
Median
Median Wages
Decimal
AnnualWageRate
Percentile75
Wages at 75th percentile
Decimal
AnnualWageRate
Percentile90
Wages at 90th percentile
Decimal
AnnualWageRate
HourlyWageRate
Hourly wage data for this occupation in this location. If a value is 9999.99, that's a signal that the hourly wage is at least $100.
Object
OccupationMatchResult
Percentile10
Wages at 10th percentile
Decimal
HourlyWageRate
Percentile25
Wages at 25th percentile
Decimal
HourlyWageRate
Median
Median Wages
Decimal
HourlyWageRate
Percentile75
Wages at 75th percentile
Decimal
HourlyWageRate
Percentile90
Wages at 90th percentile
Decimal
HourlyWageRate
TotalRecords
Number of records returned in this response; currently it's always 25
Integer
OccupationMatchResult
MetaData
Information about the source of the API
Object
OccupationMatchResult
Publisher
Publisher of the API
String
MetaData
Sponsor
Sponsor of the API
String
MetaData
LastAccessDate           
The moment that 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 data, 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
Suggestion citation for this individual 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.