{
  "openapi": "3.0.1",
  "info": {
    "title": "levels.fyi Salary Scraper",
    "description": "Scrape tech compensation from levels.fyi by company, job family and location. Per-offer rows carry company, level, title, base_salary, avg_annual_stock_grant_value, avg_annual_bonus_value and total_compensation; per-level rows carry averages and percentile bands.",
    "version": "2.0",
    "x-build-id": "pgSnyJTe91b62F9IA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/herus13~levels-fyi-salary-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-herus13-levels-fyi-salary-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/herus13~levels-fyi-salary-scraper/runs": {
      "post": {
        "operationId": "runs-sync-herus13-levels-fyi-salary-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/herus13~levels-fyi-salary-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-herus13-levels-fyi-salary-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "companies": {
            "title": "Companies",
            "type": "array",
            "description": "Company names or levels.fyi slugs to collect, one per entry — for example `google`, `Meta`, `netflix`. Provide at least one of `companies` or `discover_all`; leave empty and switch on `discover_all` to walk the whole levels.fyi company index instead.",
            "items": {
              "type": "string"
            }
          },
          "job_family": {
            "title": "Job family",
            "type": "string",
            "description": "The levels.fyi job-family slug to collect, for example `software-engineer`, `product-manager`, `data-scientist` or `hardware-engineer`. One job family per run, because levels.fyi publishes a separate page for each; run the actor again for the next one. Default software-engineer.",
            "default": "software-engineer"
          },
          "locations": {
            "title": "Locations (optional)",
            "type": "array",
            "description": "levels.fyi location slugs for metro-level pay, one per entry; each is collected separately and every row records which location it came from. Pay varies enormously by area. Examples: `san-francisco-bay-area`, `greater-seattle-area`, `new-york-city-area`, `greater-austin-area`, `united-states`, `india`, `united-kingdom`, `canada`, `germany`, `singapore`. For anywhere else, open it on levels.fyi and copy the last part of the address. Leave empty for the nationwide view.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "What to scrape",
            "enum": [
              "records",
              "aggregates"
            ],
            "type": "string",
            "description": "Which shape of data a run produces. Values: `records` gives one row per submitted offer — level, specialization, years of experience, exact base, stock, bonus and total pay, and the city; `aggregates` gives one summary row per level — how many reports stand behind it, average base, stock, bonus and total, and the percentile bands for total pay and for base. Default records. Pick one per run, or half of every exported row is empty; run it twice to get both.",
            "default": "records"
          },
          "discover_all": {
            "title": "Discover all companies",
            "type": "boolean",
            "description": "Walk every company on the levels.fyi index instead of the list in `companies`, which is ignored while this is on. Default `false`. Cap the sweep with `max_companies`, or a run covers the entire index and costs accordingly.",
            "default": false
          },
          "max_companies": {
            "title": "Max companies",
            "minimum": 1,
            "type": "integer",
            "description": "How many companies a `discover_all` sweep may cover. Minimum 1. Leave empty for no cap, which walks the whole index — long, and priced per row collected."
          },
          "max_records": {
            "title": "Max records per target",
            "minimum": 1,
            "type": "integer",
            "description": "How many per-offer salary records to collect for each company and location pair. Minimum 1. Leave empty for no cap, which takes every offer levels.fyi publishes for that pair."
          },
          "proxyUrls": {
            "title": "Your own proxy URLs (optional)",
            "type": "array",
            "description": "Leave empty: the run uses the residential proxy this actor ships with, included in the price of the run. To route the run through your own provider instead, add one gateway URL per entry, for example `http://user:pass@host:port` — works with any provider that issues URLs (DataImpulse, Bright Data, Oxylabs, Smartproxy, or your own). When set, these are used exactly as entered and nothing else is.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}