Scraper APILevels.fyi
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.
- 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; what a run costs is in Usage and units.
Inputs
The fields of input. A field that is not listed here is refused.
| Field | Type | Description |
|---|---|---|
companyrequired | string | 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 | 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. |
companyis the company's name as it stands in its Levels.fyi address (stripefor levels.fyi/companies/stripe), or the address of its salaries page. A company Levels.fyi keeps under another name is followed there.- Without
rolethe records cover every role of the company: a row withlevelnulland the role'smedian_total, then a row for each level with itsaverage_total. Amounts are in US dollars. - With
rolethe records are that role's: the row withlevelnullcarries the pay distribution (total_percentiles,base_percentiles,stock_percentiles,bonus_percentiles), and each level rowaverage_total,average_base,average_stockandaverage_bonus. Amounts are in the currency of the country the page shows the company in, named incurrency. Wherefront_loaded_vestingistrue, 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
failedwithnot_found, and costs nothing — see the reasons of this family.
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. |
p10 (in total_percentiles) | integer or null | The 10th percentile. |
p25 (in total_percentiles) | integer or null | The 25th percentile. |
p50 (in total_percentiles) | integer or null | The median. |
p75 (in total_percentiles) | integer or null | The 75th percentile. |
p90 (in total_percentiles) | integer or null | The 90th percentile. |
base_percentiles | object or null | The distribution of yearly base salary for the role. On the same row. |
p10 (in base_percentiles) | integer or null | The 10th percentile. |
p25 (in base_percentiles) | integer or null | The 25th percentile. |
p50 (in base_percentiles) | integer or null | The median. |
p75 (in base_percentiles) | integer or null | The 75th percentile. |
p90 (in base_percentiles) | integer or null | The 90th percentile. |
stock_percentiles | object or null | The distribution of yearly stock grants for the role. On the same row. |
p10 (in stock_percentiles) | integer or null | The 10th percentile. |
p25 (in stock_percentiles) | integer or null | The 25th percentile. |
p50 (in stock_percentiles) | integer or null | The median. |
p75 (in stock_percentiles) | integer or null | The 75th percentile. |
p90 (in stock_percentiles) | integer or null | The 90th percentile. |
bonus_percentiles | object or null | The distribution of yearly bonuses for the role. On the same row. |
p10 (in bonus_percentiles) | integer or null | The 10th percentile. |
p25 (in bonus_percentiles) | integer or null | The 25th percentile. |
p50 (in bonus_percentiles) | integer or null | The median. |
p75 (in bonus_percentiles) | integer or null | The 75th percentile. |
p90 (in bonus_percentiles) | 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
# Start a run and wait up to 60 seconds for it to finish
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"}}'
# Read its records, with the id the first call answered
curl "https://api.enrichednow.com/v1/runs/$RUN_ID/records?limit=100" \
-H "Authorization: Bearer $ENRICHEDNOW_API_KEY"from enrichednow import EnrichedNow
client = EnrichedNow() # reads ENRICHEDNOW_API_KEY
# Start a run, wait for it to end, and get its records
result = client.scrape("levels.salaries", {
"company": "stripe",
"role": "product-manager",
})
print(result.run.id, result.run.status, result.run.record_count)
# Read its records: pages are fetched as you go
for record in result.records:
print(record)Install it with pip install enrichednow, then save as run.py and run python3 run.py
import EnrichedNow from "enrichednow";
const client = new EnrichedNow(); // reads ENRICHEDNOW_API_KEY
// Start a run, wait for it to end, and get its records
const { run, records } = await client.scrape("levels.salaries", {
company: "stripe",
role: "product-manager",
});
console.log(run.id, run.status, run.record_count);
// Read its records: pages are fetched as you go
for await (const record of records) console.log(record);Install it with npm install enrichednow, then save as run.mjs and run node run.mjs
package main
import (
"context"
"fmt"
"log"
"time"
enrichednow "github.com/enrichednow/enrichednow-go"
)
func main() {
client, err := enrichednow.NewClient() // reads ENRICHEDNOW_API_KEY
if err != nil {
log.Fatal(err)
}
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute)
defer cancel()
// Start a run, wait for it to end, and get its records
run, records, err := client.Scrape(ctx, "levels.salaries", map[string]any{"company": "stripe", "role": "product-manager"})
if err != nil {
log.Fatal(err)
}
fmt.Println(run.ID, run.Status, run.RecordCount)
// Read its records: pages are fetched as you go
for records.Next() {
fmt.Println(string(records.Current()))
}
if err := records.Err(); err != nil {
log.Fatal(err)
}
}Install it with go get github.com/enrichednow/enrichednow-go@latest, then save as run.go and run go run run.go
import com.enrichednow.EnrichedNowClient;
import com.enrichednow.ScrapeResult;
import java.util.Map;
public class Run {
public static void main(String[] args) {
EnrichedNowClient client = EnrichedNowClient.fromEnv(); // reads ENRICHEDNOW_API_KEY
// Start a run, wait for it to end, and get its records
ScrapeResult result = client.scrape("levels.salaries", Map.of("company", "stripe", "role", "product-manager"));
System.out.println(result.run().id() + " " + result.run().status() + " " + result.run().recordCount());
// Read its records: pages are fetched as you go
for (Map<String, Object> record : result.records()) {
System.out.println(record);
}
}
}Add com.enrichednow:enrichednow-java:0.4.0 to your Maven or Gradle build, then save as Run.java
enrichednow run levels.salaries --input company=stripe --input role=product-managerInstall it with curl -fsSL https://raw.githubusercontent.com/enrichednow/enrichednow-cli/main/install.sh | sh
It starts a run with this scraper’s example input, waits for it to finish and reads its records a page at a time. The key is read from ENRICHEDNOW_API_KEY.
The body on its own:
{
"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.
{
"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.
{
"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 lists every status and the reasons every scraper shares; the reasons of the Levels.fyi scrapers are in their own section there.