Get Employment Patterns

Get Employment Patterns

Employment Patterns

The 'Get Employment Patterns' API enables developers to input an occupation and get data about the industries in which workers in this occupation are employed. The API accepts O*NET and SOC Codes and Titles.

About this data

The Employment Patterns tool demonstrates how this API can be used. For more information about the data, please visit that tool's help page.

Resource URL

https://api.careeronestop.org/v1/employmentpatterns/{userId}/{keyword}/{sortColumns}/{sortDirections}/{startRecord}/{limitRecord}

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/employmentpatterns/{userId}/{keyword}/{sortColumns}/{sortDirections}/{startRecord}/{limitRecord}"

            };

           

            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/employmentpatterns/{userId}/{keyword}/{sortColumns}/{sortDirections}/{startRecord}/{limitRecord}")

        .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
This value accepts a search term, which must be an occupation  (O*NET or SOC title or code).
sortColumns
String Yes

This is the column by which the data should be sorted. Acceptable values include:
0 - relevance (default)
PCT - Percent ("Share") of workers in this occupation who are working in this industry
IND - Industry title
EE - Estimated employment, for the earlier year
PE - Projected employment, for the later year
PCH - Percent change

sortDirections 
String Yes

Sort Direction Acceptable values include:
0 - Ascending (default)
ASC - Ascending
DESC - Descending

startRecord
Integer
Yes This value is to set the starting record. Default value 0 is for the first record.
limitRecord
Integer
Yes This value sets the limit of the maximum number of records to be returned. Default value is 10.
enableMetaData
boolean
Optional Use this parameter to determine whether to include MetaData in the response.
True- Include metadata (default)
False - exclude metadata

Response Structure

{
  "RecordCount": 8,
  "SocTitle": "Registered Nurses",
  "SocCode": "291141",
  "Code": "29-1141.00",
  "Title": "Registered Nurses",
  "Request": {
    "Keyword": "Registered Nurses",
    "SortColumns": null,
    "SortDirections": null,
    "StartRecord": 0,
    "LimitRecord": 10
  },
  "Result": [
    {
      "IagCode": null,
      "Pctestocc": 2.8,
      "Industry": "Federal Government, Excluding Post Office",
      "MatInCode": "999100",
      "ProjectEmployment": 86000,
      "EstimatedEmployment": 84100,
      "PercentChange": 2.3,
      "NumberChanged": 1900
    },
    {
      "IagCode": "621",
      "Pctestocc": 6.1,
      "Industry": "Home Health Care Services",
      "MatInCode": "621600",
      "ProjectEmployment": 267800,
      "EstimatedEmployment": 180300,
      "PercentChange": 48.6,
      "NumberChanged": 87500
    },
    {
      "IagCode": "622",
      "Pctestocc": 6,
      "Industry": "Local Government General Medical and Surgical Hospitals",
      "MatInCode": "622103",
      "ProjectEmployment": 182100,
      "EstimatedEmployment": 176200,
      "PercentChange": 3.4,
      "NumberChanged": 5900
    },
    {
      "IagCode": "623",
      "Pctestocc": 5.3,
      "Industry": "Nursing Care Facilities (Skilled Nursing Facilities)",
      "MatInCode": "623100",
      "ProjectEmployment": 158900,
      "EstimatedEmployment": 157800,
      "PercentChange": 0.7,
      "NumberChanged": 1100
    },
    {
      "IagCode": "621",
      "Pctestocc": 6.7,
      "Industry": "Offices of Physicians",
      "MatInCode": "621100",
      "ProjectEmployment": 236300,
      "EstimatedEmployment": 197400,
      "PercentChange": 19.7,
      "NumberChanged": 38900
    },
    {
      "IagCode": "622",
      "Pctestocc": 48.5,
      "Industry": "Private General Medical and Surgical Hospitals",
      "MatInCode": "622105",
      "ProjectEmployment": 1579000,
      "EstimatedEmployment": 1432100,
      "PercentChange": 10.3,
      "NumberChanged": 146900
    },
    {
      "IagCode": "622",
      "Pctestocc": 2.3,
      "Industry": "Private Specialty (except Psychiatric and Substance Abuse) Hospitals",
      "MatInCode": "622305",
      "ProjectEmployment": 96900,
      "EstimatedEmployment": 66900,
      "PercentChange": 44.9,
      "NumberChanged": 30000
    },
    {
      "IagCode": "622",
      "Pctestocc": 2.1,
      "Industry": "State Government General Medical and Surgical Hospitals",
      "MatInCode": "622102",
      "ProjectEmployment": 72800,
      "EstimatedEmployment": 62900,
      "PercentChange": 15.6,
      "NumberChanged": 9800
    }
  ],
  "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": 1568816369,
    "CitationSuggested": "This data is delivered by an API from CareerOneStop, sponsored by U.S. Department of Labor, Employment and Training Administration.  \nwww.careeronestop.org\nNational employment projections come from the U.S. Department of Labor, Bureau of Labor Statistics, Employment Projections program, Employment by detailed occupation, 2018 and projected 2028 (www.bls.gov/emp/).",
    "DataSource": [
      {
        "DataName": "National employment projections",
        "DataSourceName": "U.S. Department of Labor, Bureau of Labor Statistics Employment Projections program",
        "DataSourceUrl": "https://www.bls.gov/emp/",
        "DataLastUpdate": "September 2019",
        "DataVintageOrVersion": "2018-28",
        "DataDescription": "The Employment Projections (EP) program develops information about the labor market for the nation as a whole for 10 years in the future, by occupation and by industry."
      }
    ]
  }
}
<EmploymentPatternViewModel
xmlns="http://schemas.datacontract.org/2004/07/XPAND.CareerOneStop.WebApi.ViewModels"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
   <Code> 29-1141.00</Code>
   <MetaData xmlns: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.org
National employment projections come from the U.S. Department of Labor, Bureau of Labor Statistics, Employment Projections program, Employment by detailed occupation, 2018 and projected 2028 (www.bls.gov/emp/).</d2p1:CitationSuggested>
      <d2p1:DataSource>
         <d2p1:MetaDataSource>
            <d2p1:DataDescription>The Employment Projections (EP) program develops information about the labor market for the nation as a whole for 10 years in the future, by occupation and by industry.</d2p1:DataDescription>
            <d2p1:DataLastUpdate>September 2019</d2p1:DataLastUpdate>
            <d2p1:DataName>National employment projections</d2p1:DataName>
            <d2p1:DataSourceName>U.S. Department of Labor, Bureau of Labor Statistics Employment Projections program</d2p1:DataSourceName>
            <d2p1:DataSourceUrl>https://www.bls.gov/emp/</d2p1:DataSourceUrl>
            <d2p1:DataVintageOrVersion>2018-28</d2p1:DataVintageOrVersion>
         </d2p1:MetaDataSource>
      </d2p1:DataSource>
      <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>
   <RecordCount>8</RecordCount>
   <Request xmlns:d2p1="http://schemas.datacontract.org/2004/07/API.CareerOneStop.DTO">
      <d2p1:SocCode>291141</d2p1:SocCode>
   </Request>
   <Result>
      <EmploymentPattern>
         <EstimatedEmployment>84100</EstimatedEmployment>
         <IagCode i:nil="true" />
         <Industry>Federal Government, Excluding Post Office</Industry>
         <MatInCode>999100</MatInCode>
         <NumberChanged>1900</NumberChanged>
         <Pctestocc>2.80</Pctestocc>
         <PercentChange>2.30</PercentChange>
         <ProjectEmployment>86000</ProjectEmployment>
      </EmploymentPattern>
      <EmploymentPattern>
         <EstimatedEmployment>180300</EstimatedEmployment>
         <IagCode>621</IagCode>
         <Industry>Home Health Care Services</Industry>
         <MatInCode>621600</MatInCode>
         <NumberChanged>87500</NumberChanged>
         <Pctestocc>6.10</Pctestocc>
         <PercentChange>48.60</PercentChange>
         <ProjectEmployment>267800</ProjectEmployment>
      </EmploymentPattern>
      <EmploymentPattern>
         <EstimatedEmployment>176200</EstimatedEmployment>
         <IagCode>622</IagCode>
         <Industry>Local Government General Medical and Surgical Hospitals</Industry>
         <MatInCode>622103</MatInCode>
         <NumberChanged>5900</NumberChanged>
         <Pctestocc>6</Pctestocc>
         <PercentChange>3.40</PercentChange>
         <ProjectEmployment>182100</ProjectEmployment>
      </EmploymentPattern>
      <EmploymentPattern>
         <EstimatedEmployment>157800</EstimatedEmployment>
         <IagCode>623</IagCode>
         <Industry>Nursing Care Facilities (Skilled Nursing Facilities)</Industry>
         <MatInCode>623100</MatInCode>
         <NumberChanged>1100</NumberChanged>
         <Pctestocc>5.30</Pctestocc>
         <PercentChange>0.70</PercentChange>
         <ProjectEmployment>158900</ProjectEmployment>
      </EmploymentPattern>
      <EmploymentPattern>
         <EstimatedEmployment>197400</EstimatedEmployment>
         <IagCode>621</IagCode>
         <Industry>Offices of Physicians</Industry>
         <MatInCode>621100</MatInCode>
         <NumberChanged>38900</NumberChanged>
         <Pctestocc>6.70</Pctestocc>
         <PercentChange>19.70</PercentChange>
         <ProjectEmployment>236300</ProjectEmployment>
      </EmploymentPattern>
      <EmploymentPattern>
         <EstimatedEmployment>1432100</EstimatedEmployment>
         <IagCode>622</IagCode>
         <Industry>Private General Medical and Surgical Hospitals</Industry>
         <MatInCode>622105</MatInCode>
         <NumberChanged>146900</NumberChanged>
         <Pctestocc>48.50</Pctestocc>
         <PercentChange>10.30</PercentChange>
         <ProjectEmployment>1579000</ProjectEmployment>
      </EmploymentPattern>
      <EmploymentPattern>
         <EstimatedEmployment>66900</EstimatedEmployment>
         <IagCode>622</IagCode>
         <Industry>Private Specialty (except Psychiatric and Substance Abuse) Hospitals</Industry>
         <MatInCode>622305</MatInCode>
         <NumberChanged>30000</NumberChanged>
         <Pctestocc>2.30</Pctestocc>
         <PercentChange>44.90</PercentChange>
         <ProjectEmployment>96900</ProjectEmployment>
      </EmploymentPattern>
      <EmploymentPattern>
         <EstimatedEmployment>62900</EstimatedEmployment>
         <IagCode>622</IagCode>
         <Industry>State Government General Medical and Surgical Hospitals</Industry>
         <MatInCode>622102</MatInCode>
         <NumberChanged>9800</NumberChanged>
         <Pctestocc>2.10</Pctestocc>
         <PercentChange>15.60</PercentChange>
         <ProjectEmployment>72800</ProjectEmployment>
      </EmploymentPattern>
   </Result>
   <SocCode>291141</SocCode>
   <SocTitle>Registered Nurses</SocTitle>
   <Title>Registered Nurses</Title>
</EmploymentPatternViewModel>

Response Parameters

Name
Description
Type
Parent
RecordCount
Record Count
Integer
Empty Cell
SocTitle
Title of the SOC occupation corresponding to (or equalling) the user's input. If user input was an O*NET detail occupation, this field will be the corresponding SOC title.
String
Empty Cell
SocCode
The code for the SOC occupation corresponding to (or equalling) the user's input. If user input was an O*NET detail occupation, this field will be the corresponding SOC title. 
String
Empty Cell
Code
Code of the occupation that was input. Could be O*NET or SOC.
String
Empty Cell
Title
Title of the occupation that was input. Could be O*NET or SOC.
String
Empty Cell
Request
The request parameter
Object
Empty Cell
Keyword
The user input itself; could be words or a code.
String
Request
SortColumns
Column by which the data is sorted. Acceptable values include
PCT - Share of this occupation working in this industry
IND - Industry title
EE - Estimated employment, for the earlier year
PE - Project employment, for the later year
PCH - Percent change
String
Request
SortDirections
Sort Direction. Default is 0=ASC. Acceptable values include:
ASC - Ascending
DESC - Descending
String
Request
StartRecord
Which record to start with, for this response? To start with the first record (first page), StartRecord is 0. Default is 0.
Integer
Request
LimitRecord
The number of records to return in this call. Default is 10.
Integer
Request
Result
List of industries in which at least 2% of the workers in this occupations are employed.
Object
Empty Cell
IagCode
BLS offers "Industries at a Glance" (IAG), profiles for many industries, at 2-digit ("supersector") and 3-digit ("sector") levels. IagCode is the 2- or 3- digit code for which BLS publishes a profile corresponding to this "Result".
CareerOneStop uses this code to construct a URL that we hyperlink from the industry title. For example, www.bls.gov/iag/tgs/iag61.htm
String
Result
Pctestocc
Share of Workers in this occupation that work in this industry. In the BLS EMP data, this is PctEstOcc.
Decimal
Result
Industry
Industry name
String
Result
MatInCode
Industry code, as used in the "micro matrix" published by BLS Employment projections program.
String
Result
ProjectEmployment
Projected employment (for the year 10 years past the year of the EstimatedEmployment).
Decimal
Result
EstimatedEmployment
Estimated Employment (for the earlier year).
Decimal
Result
PercentChange
Percent changed, between the two years
Decimal
Result
NumberChanged
Number changed, between the two years
Integer
Result
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 data, CareerOneStop suggests you use this citation.
String
MetaData
DataSource
The data source object(s)
Object
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

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.