/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/uk-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
| Nmae | Type | Description |
|---|---|---|
soc_version | enum | Specify SOC taxonomy version to use. This parameter is optional. Default: Must be one of: |
area_version | enum | Specify area 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: |
new_taxonomy_versions | enum | Use new taxonomy versions. This parameter is optional. 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"
},
"distribution": {
"type": "percentile",
"options": {
"keys": [
25,
50,
75
]
},
"metrics": [
"unique_postings",
"duplicate_postings"
]
}
}Code Examples
curl --request POST \
--url https://api.lightcast.io/uk-jpa/distributions/salary \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{ "filter": { "when": "active" }, "distribution": { "type": "percentile", "options": { "keys": [ 25, 50, 75 ] }, "metrics": [ "unique_postings", "duplicate_postings" ] } }'Response Examples
{
"data": {
"distribution": {
"buckets": [
{
"key": 25,
"duplicate_postings": 361090,
"unique_postings": 199249,
"value": 22984
},
{
"key": 50,
"duplicate_postings": 700781,
"unique_postings": 399057,
"value": 30500
},
{
"key": 75,
"duplicate_postings": 1104367,
"unique_postings": 600056,
"value": 42949
}
],
"domain": {
"max": 500000,
"min": 10004
},
"facet": "salary",
"interval": null,
"type": "percentile"
},
"totals": {
"duplicate_postings": 2959846,
"unique_postings": 2338693
}
}
}//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 ^"
}
]
}
