/distributions
Calculate data distributions based around numerical job posting fields such as salary and years of experience.
GET /distributions
GET /distributionsGet a list of available distribution facets.
Code Examples
curl --request GET \
--url https://api.lightcast.io/jpa/distributions \
--header 'Authorization: Bearer <ACCESS_TOKEN>'Response Examples
{
"data": [
"salary",
"posting_duration",
"min_years_experience",
"max_years_experience"
]
}POST /distributions/{distributionFacet}
POST /distributions/{distributionFacet}Get a data distribution by percentiles or fixed interval for a selected facet.
URL Parameters
| Name | Type | Description |
|---|---|---|
distributionFacet | enum | The facet used as the domain of the distribution. Example: Must be one of: |
Query Parameters
| Name | Type | Description |
|---|---|---|
area_version | enum | Specify US Area taxonomy version to use. This parameter is optional. Default: Must be one of: |
soc_version | enum | Specify SOC taxonomy version to use. This parameter is optional. Default: Must be one of: |
onet_version | enum | Specify ONET taxonomy version to use. This parameter is optional. Default: Must be one of: |
title_version | enum | Specify Job Title taxonomy version to use. This parameter is optional. Default: Must be one of: |
company_version | enum | Specify company taxonomy version to use. This parameter is optional. Default: Must be one of: |
naics_version | enum | Specify NAICS taxonomy version to use. This parameter is optional. Default: Must be one of: |
new_taxonomy_versions | enum | Use new taxonomy versions. This parameter is optional. Must be one of: |
area_us_version | enum | Specify US Area taxonomy version to use. This parameter is optional. Default: Must be one of: |
soc_lightcast_version | enum | Specify SOC Lightcast taxonomy version to use. This parameter is optional. Default: Must be one of: |
onet_standard_version | enum | Specify ONET Standard taxonomy version to use. This parameter is optional. Default: Must be one of: |
lot_version | enum | Specify LOT taxonomy version to use. This parameter is optional. Default: Must be one of: |
Request Body
{
"filter": {
"when": "active",
"state_name": [
"California"
]
},
"distribution": {
"type": "percentile",
"options": {
"keys": [
25,
50,
75
]
},
"metrics": [
"unique_postings",
"duplicate_postings"
]
}
}Code Examples
curl --request POST \
--url https://api.lightcast.io/jpa/distributions/salary \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{ "filter": { "when": "active", "state_name": [ "California" ] }, "distribution": { "type": "percentile", "options": { "keys": [ 25, 50, 75 ] }, "metrics": [ "unique_postings", "duplicate_postings" ] } }'Response Examples
{
"data": {
"distribution": {
"buckets": [
{
"duplicate_postings": 422706,
"key": 25,
"unique_postings": 126445,
"value": 38178
},
{
"duplicate_postings": 868120,
"key": 50,
"unique_postings": 257335,
"value": 52000
},
{
"duplicate_postings": 1231723,
"key": 75,
"unique_postings": 381181,
"value": 90000
}
],
"domain": {
"max": 500000,
"min": 24980
},
"facet": "salary",
"interval": null,
"type": "percentile"
},
"totals": {
"duplicate_postings": 3874932,
"unique_postings": 1445428
}
}
}//Your request wasn't valid (bad parameter names or values).
{
"errors": [
{
"status": 400,
"title": "Malformed Request",
"detail": "Expected array"
}
]
}//Your request wasn't unauthorized.
{
"errors": [
{
"status": 401,
"title": "Unauthorized Request",
"detail": "You are not authorized to access this resource."
}
]
}//The facet you requested wasn't found.
{
"errors": [
{
"status": 404,
"title": "URL not found",
"detail": "Unrecognized facet 'foo'"
}
]
}//Your request wasn't valid (bad keyword expression).
{
"errors": [
{
"status": 422,
"title": "Invalid request content",
"detail": "Invalid keyword search expression syntax:\n\t\"general merchandise\" OR \"apparel\" OR \"grocery\" OR\n\t ^"
}
]
}
