# levels.salaries

Pay at a company as Levels.fyi publishes it: total compensation by role and level, and for one role the base, stock, bonus and pay distribution.

Levels.fyi salaries, one of the Levels.fyi scrapers.

| | |
| --- | --- |
| Id | `levels.salaries` |
| Version | 1 |
| Billed per | request — 1 unit for a charged run |
| Runs | within one request |

Start it with `POST /v1/scrapers/levels.salaries/runs`. How runs work is in [Running a scraper](https://docs.enrichednow.com/running-a-scraper.md); what a run costs is in [Usage and units](https://docs.enrichednow.com/usage-and-units.md).

## Inputs

The fields of `input`. A field that is not listed here is refused.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `company` | string | yes | The company's name as it stands in its Levels.fyi address, e.g. `stripe` for levels.fyi/companies/stripe; or the address of its salaries page or of one role's page (`https://www.levels.fyi/companies/stripe/salaries/software-engineer`). Limit: at least 1 characters, at most 400 characters. |
| `role` | string | no | A role, as in its Levels.fyi address, e.g. `software-engineer` or `product-manager`: the rows are then that role's levels, with base, stock and bonus and the role's pay distribution. Left out: every role of the company, with the total compensation of each level. Limit: at most 120 characters. |

- `company` is the company's name as it stands in its Levels.fyi address (`stripe` for levels.fyi/companies/stripe), or the address of its salaries page. A company Levels.fyi keeps under another name is followed there.
- Without `role` the records cover every role of the company: a row with `level` `null` and the role's `median_total`, then a row for each level with its `average_total`. Amounts are in US dollars.
- With `role` the records are that role's: the row with `level` `null` carries the pay distribution (`total_percentiles`, `base_percentiles`, `stock_percentiles`, `bonus_percentiles`), and each level row `average_total`, `average_base`, `average_stock` and `average_bonus`. Amounts are in the currency of the country the page shows the company in, named in `currency`. Where `front_loaded_vesting` is `true`, the stock is the first year's and the bonus includes the sign-on bonus, as Levels.fyi shows them.
- Every record is a figure Levels.fyi publishes for a company, a role or a level. The individual submissions the page lists are not read or returned.
- A company or a role Levels.fyi has no page for ends the run `failed` with `not_found`, and costs nothing — see [the reasons of this family](https://docs.enrichednow.com/results-and-statuses.md#levels-fyi).

## Record fields

Every record of a run has these fields. A value that is not known is `null` — never an empty string and never `0`.

| Field | Type | Notes |
| --- | --- | --- |
| `company` | string | The company's name, e.g. `Stripe`. |
| `company_slug` | string | The company's name in its Levels.fyi address, e.g. `stripe`. |
| `role` | string | The role (Levels.fyi calls it a job family), e.g. `Software Engineer`. |
| `role_slug` | string | The role's name in its Levels.fyi address, e.g. `software-engineer`. |
| `level` | string or null | The level this row is about, as the company names it, e.g. `L4`. Null on the row for the role as a whole. |
| `level_slug` | string or null | The level's name in its Levels.fyi address, e.g. `l4`. Null on the row for the role as a whole. |
| `level_titles` | array of string | Every name the page gives the level, e.g. `L4`, `SWE III`. Empty on the row for the role as a whole. |
| `country` | string or null | The country the figures are for, e.g. `United States`: the one the page shows for the company by default. |
| `currency` | string | The currency of every amount in this row, as a three-letter code: the one the page shows them in. A role's page shows the currency of the company's own country, e.g. `INR`; a company's page of every role shows `USD`. |
| `front_loaded_vesting` | boolean or null | True when the company's stock grants vest more in the first years than later. Levels.fyi then shows pay for the first year: `average_stock` is the first year's stock and `average_bonus` includes the sign-on bonus. False where it shows stock and bonus a year; null where the page's data does not say. |
| `submissions` | integer or null | The number of pay submissions the row's figures were computed from, where the page's data states it. |
| `average_total` | integer or null | The average yearly total compensation: base, stock and bonus together. On a level's row, the level's average; on the row for a role as a whole, the role's average where the page gives one. |
| `average_base` | integer or null | The average yearly base salary. Given when a role was asked for. |
| `average_stock` | integer or null | The average stock grant a year; the first year's where `front_loaded_vesting` is true. Given when a role was asked for. |
| `average_bonus` | integer or null | The average yearly bonus; with the sign-on bonus in it where `front_loaded_vesting` is true. Given when a role was asked for. |
| `median_total` | integer or null | The median yearly total compensation. On the row for the role as a whole. |
| `total_percentiles` | object or null | The distribution of yearly total compensation for the role. On the row for the role as a whole, when a role was asked for. |
| `total_percentiles.p10` | integer or null | The 10th percentile. |
| `total_percentiles.p25` | integer or null | The 25th percentile. |
| `total_percentiles.p50` | integer or null | The median. |
| `total_percentiles.p75` | integer or null | The 75th percentile. |
| `total_percentiles.p90` | integer or null | The 90th percentile. |
| `base_percentiles` | object or null | The distribution of yearly base salary for the role. On the same row. |
| `base_percentiles.p10` | integer or null | The 10th percentile. |
| `base_percentiles.p25` | integer or null | The 25th percentile. |
| `base_percentiles.p50` | integer or null | The median. |
| `base_percentiles.p75` | integer or null | The 75th percentile. |
| `base_percentiles.p90` | integer or null | The 90th percentile. |
| `stock_percentiles` | object or null | The distribution of yearly stock grants for the role. On the same row. |
| `stock_percentiles.p10` | integer or null | The 10th percentile. |
| `stock_percentiles.p25` | integer or null | The 25th percentile. |
| `stock_percentiles.p50` | integer or null | The median. |
| `stock_percentiles.p75` | integer or null | The 75th percentile. |
| `stock_percentiles.p90` | integer or null | The 90th percentile. |
| `bonus_percentiles` | object or null | The distribution of yearly bonuses for the role. On the same row. |
| `bonus_percentiles.p10` | integer or null | The 10th percentile. |
| `bonus_percentiles.p25` | integer or null | The 25th percentile. |
| `bonus_percentiles.p50` | integer or null | The median. |
| `bonus_percentiles.p75` | integer or null | The 75th percentile. |
| `bonus_percentiles.p90` | integer or null | The 90th percentile. |
| `median_years_of_experience` | number or null | The median years of experience of the people at this level, where the page's data states it. |
| `url` | string | The Levels.fyi page the row can be seen on. |
| `fetched_at` | string (date-time) | When the page was read, in UTC. |

## Example request

It starts a run with this scraper's example input and waits up to 60 seconds for it. The key is read from `ENRICHEDNOW_API_KEY`.

```bash
curl -X POST "https://api.enrichednow.com/v1/scrapers/levels.salaries/runs?wait=60" \
  -H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":{"company":"stripe","role":"product-manager"}}'
```

## Example response

The run, once it has ended. A run that has not ended within `wait` comes back with `202` and the status `queued` or `running`.

```json
{
  "id": "run_841742f37553189ff9c27ba1",
  "scraper_id": "levels.salaries",
  "scraper_version": 1,
  "status": "ok",
  "reason": null,
  "input": {
    "company": "stripe",
    "role": "product-manager"
  },
  "record_count": 1,
  "units": 1,
  "units_per_request": 1,
  "units_per_record": null,
  "units_per_page": null,
  "diagnostics": {
    "requests": 1,
    "bytes": 259214,
    "wall_ms": 885,
    "facts": {}
  },
  "created_at": "2026-11-16T22:37:50.170950Z",
  "started_at": "2026-11-16T22:37:50.178331Z",
  "finished_at": "2026-11-16T22:37:51.066313Z"
}
```

Its records, from `GET /v1/runs/{id}/records`. The record is a real one: this scraper's own parser read it from a page recorded from the site.

```json
{
  "records": [
    {
      "company": "Stripe",
      "company_slug": "stripe",
      "role": "Product Manager",
      "role_slug": "product-manager",
      "level": "L2",
      "level_slug": "l2",
      "level_titles": [
        "L2"
      ],
      "country": "United States",
      "currency": "USD",
      "front_loaded_vesting": false,
      "submissions": 11,
      "average_total": 263112,
      "average_base": 176636,
      "average_stock": 70000,
      "average_bonus": 16475,
      "median_total": null,
      "total_percentiles": null,
      "base_percentiles": null,
      "stock_percentiles": null,
      "bonus_percentiles": null,
      "median_years_of_experience": 5,
      "url": "https://www.levels.fyi/companies/stripe/salaries/product-manager/levels/l2",
      "fetched_at": "2026-11-19T18:07:40.900839Z"
    }
  ],
  "next_cursor": null
}
```

A run does not always end `ok`. [Results and statuses](https://docs.enrichednow.com/results-and-statuses.md#reason-codes) lists every status and the reasons every scraper shares; [the reasons of the Levels.fyi scrapers](https://docs.enrichednow.com/results-and-statuses.md#levels-fyi) are in their own section there.
