Endpoint Examples

/distributions

Calculate data distributions based around numerical job posting fields such as salary and years of experience.

GET /distributions

Get a list of available distribution facets.

Code Examples

curl --request GET \
  --url https://api.lightcast.io/global-postings/distributions \
  --header 'Authorization: Bearer <ACCESS_TOKEN>'

Response Examples

{
  "data": [
    "salary",
    "posting_duration",
    "min_years_experience",
    "max_years_experience"
  ]
}

POST /distributions/\{distributionFacet}

Get a data distribution by percentiles or fixed interval for a selected facet.

URL Parameters

NameTypeDescription
distributionFacetenum

The facet used as the domain of the distribution.

Example: salary

Must be one of: max_years_experience, min_years_experience, posting_duration, salary

Query Parameters

NameTypeDescription
new_taxonomy_versionsenum

Use new taxonomy versions.
This parameter is optional.

Default: False

Must be one of: false, false

lot_versionenum

Specify LOT taxonomy version to use.
This parameter is optional.
Default: 7

Must be one of: 6, 7

area_versionenum

Specify area taxonomy version to use.
This parameter is optional.
Default: lf_area_2025_1

Must be one of: lf_area_2025_1

area_laa_versionenum

Specify LAA area taxonomy version to use.
This parameter is optional.
Default: 2

Must be one of: 1, 2

datasetenum

Specify dataset to query.
This parameter is optional.

Default: global

Must be one of: global, global_plus

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/global-postings/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": [
        {
          "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                                                  ^"
    }
  ]
}