# /lagou/jobs/search

`POST /api/lagou/jobs/search`

Price: 10 credits

Search Lagou job postings by keyword, city and district, with filters for education, work experience, the company's funding stage, employment type, company size, industry and campus recruitment; each job carries salary, requirements, full description, location, recruiter and hiring company.

## How to use it

Find tech and internet jobs in China; Lagou shows at most 45 results per query to visitors, so narrow with city, district and filters rather than raising count. Pass an id to lagou/jobs for the annual salary band and company products, or a company id to lagou/companies.

## Parameters

- `access-token` (string, required)

## Request body

- `timeout` (integer) — Max scrapping execution timeout (in seconds) (default: 300; min: 20; max: 1500)
- `keyword` (string, required) — Search keyword (examples: "Java"; minLength: 1; maxLength: 100)
- `count` (integer, required) — Max number of jobs to return (min: 1; max: 45)
- `city` (string, nullable) — City name in Chinese as the site lists it; omit for all of China (examples: "北京")
- `district` (string, nullable) — District name in Chinese within the city; requires city (examples: "海淀区")
- `education` (string, nullable) — Required education level (one of: "college", "bachelor", "master", "doctorate", "not_required")
- `work_experience` (string, nullable) — Required work experience (one of: "student_or_graduate", "up_to_3_years", "three_to_five_years", "five_to_ten_years", "over_10_years", "not_required")
- `finance_stage` (string, nullable) — Funding stage of the hiring company (one of: "unfunded", "angel", "series_a", "series_b", "series_c", "series_d_and_above", "listed", "no_funding_needed")
- `job_nature` (string, nullable) — Employment type (one of: "full_time", "part_time", "internship")
- `company_size` (string, nullable) — Hiring company's headcount band (one of: "under_15", "size_15_50", "size_50_150", "size_150_500", "size_500_2000", "over_2000")
- `industry` (string, nullable) — Hiring company's primary industry (one of: "ecommerce", "auto_trading", "gaming", "tools", "software_services", "data_services", "it_services", "marketing_services", "ai_services")
- `campus_only` (boolean) — Only campus recruitment jobs (default: false)
- `sort` (string) — Result order (default: "default"; one of: "default", "newest")

## Response

### 200 — Successful Response

- `@type` (string) (default: "LagouJob")
- `id` (string, required)
- `url` (string, required)
- `full_title` (string, nullable)
- `category` (string, nullable)
- `subcategory` (string, nullable)
- `specialty` (string, nullable)
- `position_type` (string, nullable)
- `position_category` (string, nullable)
- `tags` (array) (default: [])
- `skills` (array) (default: [])
- `industry_tags` (array) (default: [])
- `perks` (array) (default: [])
- `salary` (string, nullable)
- `salary_min` (number, nullable)
- `salary_max` (number, nullable)
- `salary_months` (integer, nullable)
- `annual_salary` (string, nullable)
- `work_experience` (string, nullable)
- `education` (string, nullable)
- `job_nature` (string, nullable)
- `advantage` (string, nullable)
- `description` (string, nullable)
- `description_html` (string, nullable)
- `department` (string, nullable)
- `headcount` (integer, nullable)
- `province` (string, nullable)
- `city` (string, nullable)
- `district` (string, nullable)
- `business_areas` (array) (default: [])
- `address` (string, nullable)
- `latitude` (number, nullable)
- `longitude` (number, nullable)
- `subway_line` (string, nullable)
- `subway_station` (string, nullable)
- `nearby_stations` (array) (default: [])
- `published_at` (integer, nullable)
- `published_date` (string, nullable)
- `recruiter_last_login_at` (integer, nullable)
- `is_campus` (boolean, nullable)
- `is_expired` (boolean, nullable)
- `recruiter` (object, nullable)
  - `@type` (string) (default: "LagouRecruiter")
  - `id` (string, required)
  - `name` (string, nullable)
  - `image` (string, nullable)
- `company` (object, nullable)
  - `@type` (string) (default: "LagouJobCompany")
  - `id` (string, required)
  - `url` (string, required)
  - `name` (string, nullable)
  - `short_name` (string, nullable)
  - `image` (string, nullable)
  - `size` (string, nullable)
  - `industry` (string, nullable)
  - `finance_stage` (string, nullable)
  - `benefits` (array) (default: [])
  - `slogan` (string, nullable)
  - `website` (string, nullable)
  - `description` (string, nullable)
  - `investors` (string, nullable)
  - `is_verified` (boolean, nullable)
  - `is_famous` (boolean, nullable)
  - `products` (array) (default: [])
    - `@type` (string) (default: "LagouProduct")
    - `name` (string, required)
    - `url` (string, nullable)
    - `description` (string, nullable)
    - `image` (string, nullable)
    - `types` (array) (default: [])

## Errors

### 422 — Validation Error

The request body did not validate

What to do: Check the fields against this schema. A URN with the wrong prefix is the most common cause.

- `detail` (array)
  - `loc` (array, required)
  - `msg` (string, required)
  - `type` (string, required)
  - `input` (any)
  - `ctx` (object)

### 408

The request ran past its time limit

What to do: Raise `timeout` in the request body, up to the maximum this endpoint documents. Lowering `count` or turning off the `with_*` flags also helps, because less work finishes sooner.

### 412

The district is not listed for this city

What to do: Retrying will not help: either the entity does not exist, or the input points at a different one.

### 429

Too many requests: a rate limit or a usage window is exhausted

What to do: When the response carries an X-Retry-After header, wait that many seconds and retry: the same number is in the body as `detail.retry_after`, and the limit clears once that window passes. The message in the body names the limit that was hit.

### 500

Something broke on our side

What to do: Retrying will not help. If it keeps happening, send us the X-Request-ID from the response headers.

### 529

Rate limit reached, or the endpoint is overloaded

What to do: Wait at least 30 seconds, then retry.

## Response envelope

Success: Array of objects (may be empty if no results)

Error: Error may coexist with partial results if it occurs mid-execution. Check X-Error header and status code.

Every response carries these headers:

- `X-Error` — Error message text (present only on error)
- `X-Request-ID` — Unique request identifier
- `X-Execution-Time` — Execution time in seconds
- `X-Result-Count` — How many records the body carries. 0 means an empty result, which is a normal answer and not by itself an error. A non-zero count can come back together with X-Error when the failure happened partway through — read this header and X-Error independently.
- `X-Total-Available-Results` — How many records exist for this query, when the endpoint can say. On a `dry_run` request this is the answer and the body is empty. It saturates: the endpoint's documented maximum means 'at least that many', any smaller number is exact.
- `X-Warning` — Present when the request body carried keys this endpoint does not document. They were ignored, so any filter you meant to apply through them did not apply. Check the spelling against this schema and retry.
- `X-Retry-After` — Seconds to wait before retrying. Present only on 429.

