Skip to Content

Compare By Occupations

GET
/v1/comparesalaries/{userId}/wageocc
Parameters
string


api token is required field
string


userId is required field
string

ex: Registered Nurses or 29-1171.00(O*NET code)
You can enter multiple occupations separated by | ex:17-1011.00|29-1171.00

string

city, state(reston, va) or state (VA) or zipcode (20191)
You can enter multiple locations separated by | ex:va|ca

string

ex: OT-OccupationTitle or LW-LowWage or MW-MedianWage or HW-HighWage
Default value is 0 for OT

string

ex: ASC or DESC
Default value is 0 for ASC

string

ex: Hourly or Annual
Default value is 0 for Hourly

boolean

ex: true or false

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["sortColumns"] = "value";                        
            qs["sortOrder"] = "value";                        
            qs["sortBy"] = "value";                        
            qs["enableMetaData"] = "value";                        
            
            var uri = new UriBuilder(Uri.UriSchemeHttps, "api.careeronestop.org")
            {
                Path = "/v1/comparesalaries/{userId}/wageocc",
                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", "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}/wageocc")
                .setParameter("keyword", "value")
                .setParameter("location", "value")
                .setParameter("sortColumns", "value")
                .setParameter("sortOrder", "value")
                .setParameter("sortBy", "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 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();
	}
   }
}


Response Structure
                        {
  "ErrorMessage": "string",
  "InValidOccupations": [
    "string"
  ],
  "InValidLocations": [
    "string"
  ],
  "RecordCount": 2,
  "Keyword": "string",
  "Location": "string",
  "sortColumns": "string",
  "sortOrder": "string",
  "sortBy": "string",
  "LocationsList": [
    {
      "LocationName": "string",
      "InputLocation": "string",
      "OccupationList": [
        {
          "Code": "string",
          "Title": "string",
          "Request": {
            "InputOccupation": "string",
            "InputOccupationCode": "string",
            "InputOccupationTitle": "string"
          },
          "WageInfo": [
            {
              "RateType": "string",
              "Pct10": "string",
              "Pct25": "string",
              "Median": "string",
              "Pct75": "string",
              "Pct90": "string",
              "StFips": "string",
              "Area": "string",
              "AreaName": "string"
            }
          ],
          "SocInfo": {
            "SocCode": "string",
            "SocTitle": "string",
            "SocDescription": "string"
          }
        }
      ]
    }
  ],
  "MetaData": {
    "Publisher": "string",
    "Sponsor": "string",
    "LastAccessDate": 3,
    "CitationSuggested": "string",
    "DataSource": [
      {
        "DataName": "string",
        "DataSourceName": "string",
        "DataSourceUrl": "string",
        "DataLastUpdate": "string",
        "DataVintageOrVersion": "string",
        "DataDescription": "string",
        "DataSourceCitation": "string"
      }
    ]
  }
}
                    
                        <CompareWagesByOccupations xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/XPAND.CareerOneStop.WebApi.ViewModels">
  <ErrorMessage>string</ErrorMessage>
  <InValidLocations xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>string</d2p1:string>
  </InValidLocations>
  <InValidOccupations xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>string</d2p1:string>
  </InValidOccupations>
  <Keyword>string</Keyword>
  <Location>string</Location>
  <LocationsList>
    <WagesByLocations>
      <InputLocation>string</InputLocation>
      <LocationName>string</LocationName>
      <OccupationList>
        <OccupationWageDetails>
          <Code>string</Code>
          <Request>
            <InputOccupation>string</InputOccupation>
            <InputOccupationCode>string</InputOccupationCode>
            <InputOccupationTitle>string</InputOccupationTitle>
          </Request>
          <SocInfo>
            <SocCode>string</SocCode>
            <SocDescription>string</SocDescription>
            <SocTitle>string</SocTitle>
          </SocInfo>
          <Title>string</Title>
          <WageInfo>
            <WageDetails>
              <Area>string</Area>
              <AreaName>string</AreaName>
              <Median>string</Median>
              <Pct10>string</Pct10>
              <Pct25>string</Pct25>
              <Pct75>string</Pct75>
              <Pct90>string</Pct90>
              <RateType>string</RateType>
              <StFips>string</StFips>
            </WageDetails>
          </WageInfo>
        </OccupationWageDetails>
      </OccupationList>
    </WagesByLocations>
  </LocationsList>
  <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:DataSourceCitation>string</d2p1:DataSourceCitation>
        <d2p1:DataSourceName>string</d2p1:DataSourceName>
        <d2p1:DataSourceUrl>string</d2p1:DataSourceUrl>
        <d2p1:DataVintageOrVersion>string</d2p1:DataVintageOrVersion>
      </d2p1:MetaDataSource>
    </d2p1:DataSource>
    <d2p1:LastAccessDate>3</d2p1:LastAccessDate>
    <d2p1:Publisher>string</d2p1:Publisher>
    <d2p1:Sponsor>string</d2p1:Sponsor>
  </MetaData>
  <RecordCount>2</RecordCount>
  <sortBy>string</sortBy>
  <sortColumns>string</sortColumns>
  <sortOrder>string</sortOrder>
</CompareWagesByOccupations>