# /baitoru/jobs/search

`POST /api/baitoru/jobs/search`

Price: 5 credits

Search part-time and casual job postings on baitoru (バイトル) by region, prefecture, city, small area, railway line or station, occupation, working conditions, employment type, pay basis and minimum pay, coworker traits and keyword: title, store and company, employment type, location, pay, occupation, hours, feature tags, apply options and posting end date

## How to use it

Pass exactly one location: regions or prefectures (optionally narrowed by cities and small_areas), a line, or a station. Pass a returned id to baitoru/jobs for the full posting and the employer's company id.

## Parameters

- `access-token` (string, required)

## Request body

- `timeout` (integer) — Max scrapping execution timeout (in seconds) (default: 300; min: 20; max: 1500)
- `keyword` (string, nullable) — Free-text keyword (examples: "カフェ"; minLength: 1)
- `regions` (array, nullable) — Regions (one of: "tohoku", "kanto", "koshinetsu", "tokai", "kansai", "chushikoku", "kyushu"; examples: ["kanto"])
- `prefectures` (array, nullable) — Prefectures (one of: "hokkaido", "aomori", "iwate", "miyagi", "akita", "yamagata", "fukushima", "ibaraki", "tochigi", "gumma", "saitama", "chiba", "tokyo", "kanagawa", "nigata", "toyama", "ishikawa", "fukui", "yamanashi", "nagano", "gifu", "shizuoka", "aichi", "mie", "shiga", "kyoto", "osaka", "hyogo", "nara", "wakayama", "tottori", "shimane", "okayama", "hiroshima", "yamaguchi", "tokushima", "kagawa", "ehime", "kochi", "fukuoka", "saga", "nagasaki", "kumamoto", "oita", "miyazaki", "kagoshima", "okinawa"; examples: ["tokyo"], ["tokyo","kanagawa"])
- `cities` (array, nullable) — baitoru city or ward slugs inside the given prefectures (examples: ["shinjukuku"])
- `small_areas` (array, nullable) — baitoru small-area slugs inside the given cities (examples: ["shinjukuhigashiguchi"])
- `line` (string, nullable) — baitoru railway line slug (examples: "yamanotesen"; minLength: 1)
- `station` (string, nullable) — baitoru station slug (examples: "2172shinjukueki"; minLength: 1)
- `occupations` (array, nullable) — baitoru occupation slugs (examples: ["dataentry"], ["sales"])
- `conditions` (array, nullable) — baitoru working-condition codes; all must match (examples: ["mrt7","tst2"])
- `employment_types` (array, nullable) — Employment types (one of: "part_time", "full_time", "contract", "temporary_staff", "permanent_temporary_staff", "temp_to_perm", "outsourcing"; examples: ["part_time"])
- `salary_type` (string, nullable) — Pay basis (one of: "hourly", "daily", "monthly", "annual", "commission")
- `min_salary` (integer, nullable) — Minimum pay in yen for the chosen pay basis (examples: 1200)
- `workplace_traits` (array, nullable) — baitoru coworker age, gender-ratio and atmosphere codes (examples: ["nkm2"])
- `happy_bonus` (boolean) — Only jobs paying baitoru's Happy bonus (default: false)
- `sort` (string) — Result order (default: "recommended"; one of: "recommended", "newest", "hourly_wage", "daily_wage", "monthly_salary", "annual_salary")
- `count` (integer, required) — Max number of results (min: 1; max: 5000)

## Response

### 200 — Successful Response

- `@type` (string) (default: "BaitoruJobCard")
- `id` (string, required)
- `url` (string, required)
- `store_name` (string, nullable)
- `company_name` (string, nullable)
- `employment_type` (string, nullable)
- `location` (string, nullable)
- `salaries` (array) (default: [])
  - `@type` (string) (default: "BaitoruSalary")
  - `pay_basis` (string, nullable)
  - `min_amount` (integer, nullable)
  - `max_amount` (integer, nullable)
- `job_types` (string, nullable)
- `work_time` (string, nullable)
- `work_place` (string, nullable)
- `interview_location` (string, nullable)
- `is_interview_same_as_work` (boolean, nullable)
- `features` (array) (default: [])
- `snippet` (string, nullable)
- `image` (string, nullable)
- `rich_images` (array) (default: [])
- `has_video` (boolean, nullable)
- `is_new` (boolean, nullable)
- `is_rich` (boolean, nullable)
- `is_outsourcing` (boolean, nullable)
- `is_baitoru_next` (boolean, nullable)
- `application_level` (integer, nullable)
- `phone_number` (string, nullable)
- `reception_hours` (string, nullable)
- `reception_note` (string, nullable)
- `can_apply_on_web` (boolean, nullable)
- `can_apply_by_phone` (boolean, nullable)
- `can_bulk_apply` (boolean, nullable)
- `is_external_application` (boolean, nullable)
- `external_application_url` (string, nullable)
- `expires_at` (integer, nullable)

## 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

baitoru serves no job list for this combination of filters

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.

