{
  "openapi": "3.0.1",
  "info": {
    "title": "Liepin Scraper 猎聘: China Salary Data, Jobs & Headhunter Posts",
    "description": "Liepin jobs scraper for China white-collar and headhunter postings. Get salary in CNY and USD with bonus months, salary percentiles by role and city, seniority, poster type and a monitor for new, updated and removed jobs. Search many keywords and cities per run. No login needed.",
    "version": "2.0",
    "x-build-id": "MfMxyEb4HZJ9DgzXD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/getascraper~liepin-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-getascraper-liepin-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/getascraper~liepin-scraper/runs": {
      "post": {
        "operationId": "runs-sync-getascraper-liepin-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/getascraper~liepin-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-getascraper-liepin-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": {
          "scrapeMode": {
            "title": "How do you want to find jobs?",
            "enum": [
              "search",
              "home",
              "urls"
            ],
            "type": "string",
            "description": "'Search by keyword and city' reads the Liepin job category that matches each keyword in each city. 'Featured jobs' returns the jobs shown on the Liepin home page. 'Paste links' accepts Liepin category, city and search links.",
            "default": "search"
          },
          "keywords": {
            "title": "Search keywords",
            "type": "array",
            "description": "Job titles such as python, java, 数据分析师, 产品经理 or data analyst. Each keyword is matched to a Liepin job category and combined with every city. Results are de-duplicated by job ID.",
            "items": {
              "type": "string"
            },
            "default": [
              "python"
            ]
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Liepin city codes (010 Beijing, 020 Shanghai, 030 Guangzhou, 040 Shenzhen, 180 Wuhan, 090 Chengdu, 080 Hangzhou, 060 Nanjing, 070 Suzhou, 050 Chongqing, 230 Changsha, 240 Xi'an, 280 Tianjin), Chinese names such as 杭州, English names such as Hangzhou, or 'all' for nationwide.",
            "items": {
              "type": "string"
            },
            "default": [
              "010"
            ]
          },
          "startUrls": {
            "title": "Liepin links",
            "type": "array",
            "description": "Only used when the mode is 'Paste Liepin links'. Accepts liepin.com category pages (for example /city-bj/career/python/), city pages, and search links including m.liepin.com links; for search links the keyword and city are read and the same search runs on the public category pages.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxItems": {
            "title": "Max jobs to return",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Upper limit on delivered jobs across all keywords, cities and links. Free-plan runs are capped at 25.",
            "default": 25
          },
          "pagesPerQuery": {
            "title": "Pages per search",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Most result pages to read for each keyword and city. Each page holds up to 40 jobs.",
            "default": 3
          },
          "postedBy": {
            "title": "Posted by",
            "enum": [
              "any",
              "employer",
              "headhunter"
            ],
            "type": "string",
            "description": "Keep only jobs posted directly by the hiring company, or only jobs posted by headhunting firms. 'Anyone' keeps both and the postedByType field tells them apart.",
            "default": "any"
          },
          "onlyDisclosedSalary": {
            "title": "Only jobs with a disclosed salary",
            "type": "boolean",
            "description": "Skip jobs marked 面议 (negotiable) or with a salary that cannot be read.",
            "default": false
          },
          "minMonthlySalaryCny": {
            "title": "Minimum monthly salary (CNY)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep jobs whose top salary is at least this monthly amount. Jobs without a readable salary are skipped."
          },
          "excludeKeywords": {
            "title": "Exclude words",
            "type": "array",
            "description": "Skip jobs whose title or company name contains any of these words.",
            "items": {
              "type": "string"
            }
          },
          "dropCrossCityDuplicates": {
            "title": "Drop cross-city repeats",
            "type": "boolean",
            "description": "When the same company posts the same title in several cities, keep only the first row. Off by default; repeats are flagged instead.",
            "default": false
          },
          "fallbackToFeaturedJobs": {
            "title": "Fall back to featured jobs",
            "type": "boolean",
            "description": "Off by default. When on and no category matches a keyword (or Liepin cannot be read), return the featured jobs from the Liepin home page instead, labelled home-board. Those jobs are not keyword matches and are charged like any other job.",
            "default": false
          },
          "convertToUsd": {
            "title": "Add US dollar salaries",
            "type": "boolean",
            "description": "Adds monthly and annual US dollar figures using a dated exchange rate shown on each row.",
            "default": false
          },
          "salaryStatistics": {
            "title": "Save salary statistics",
            "type": "boolean",
            "description": "Saves a SALARY_STATS record with median and percentile pay per keyword and city, per city, degree, seniority and poster type, computed only from the jobs collected in this run.",
            "default": true
          },
          "salaryStatisticsMinSample": {
            "title": "Minimum jobs per statistic",
            "minimum": 2,
            "maximum": 1000,
            "type": "integer",
            "description": "A group is left out of the statistics when fewer jobs than this have a disclosed salary.",
            "default": 5
          },
          "includeSourceFields": {
            "title": "Include raw source fields",
            "type": "boolean",
            "description": "Adds a sourceFields object with the card values as Liepin shows them (salary, dq, requireWorkYears, requireEduLevel, company, compScale, industry, recruiterTitle, jobKind, jobLabels). Useful when migrating from other Liepin scrapers.",
            "default": false
          },
          "includeJobDetail": {
            "title": "Fetch full job description",
            "type": "boolean",
            "description": "Opens each job page to add the description, full company name, work address, headcount and last update date. Slower. Jobs whose page cannot be read are not returned and not charged, because the row would not be what you asked for.",
            "default": false
          },
          "monitorMode": {
            "title": "Monitoring mode",
            "enum": [
              "snapshot",
              "changes_only"
            ],
            "type": "string",
            "description": "'Snapshot' returns every matching job on every run. 'Track changes' remembers jobs across runs (per watchlist name) and returns only new and updated jobs (with the previous salary when it changed) plus removed jobs. A job is reported removed only after two consecutive complete scans, and a scan cut short by a job or page limit never removes anything.",
            "default": "snapshot"
          },
          "stateName": {
            "title": "Watchlist name",
            "type": "string",
            "description": "Only used with 'Track changes'. Runs that share a name share history; use a different name for each keyword set or schedule.",
            "default": "default"
          },
          "includeUnchanged": {
            "title": "Also return unchanged jobs",
            "type": "boolean",
            "description": "Only used with 'Track changes'. Also returns a row for every job that is the same as last run.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Leave the default for automatic connection: the Actor starts with the cheapest connection and switches to Apify Proxy only if Liepin asks for it. Set your own groups, country or proxy URLs to force a specific connection.",
            "default": {
              "useApifyProxy": true
            }
          },
          "keyword": {
            "title": "Search keyword (single, earlier versions)",
            "type": "string",
            "description": "Kept so saved tasks keep working. Used only when the Search keywords list is left at its default."
          },
          "city": {
            "title": "City (single, earlier versions)",
            "type": "string",
            "description": "Kept so saved tasks keep working. A Liepin city code such as 010, a name, or all. Used only when the Cities list is left at its default."
          },
          "urls": {
            "title": "Links (drop-in for saswave/liepin-scraper)",
            "type": "array",
            "description": "Same input as saswave/liepin-scraper: Liepin links, including m.liepin.com search links. When set, the Actor runs in link mode.",
            "items": {
              "type": "string"
            }
          },
          "max_page": {
            "title": "max_page (drop-in)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Same as saswave/liepin-scraper: most result pages per link. 0 means as many as exist (up to 100). Overrides Pages per search."
          },
          "max_results": {
            "title": "max_results (drop-in)",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Most jobs to return; 0 means up to 5,000. Overrides Max jobs to return."
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}