# /tsukumo/products/search

`POST /api/tsukumo/products/search`

Price: 20 credits

Search TSUKUMO (ツクモ) products by keyword and/or category, narrowed by maker, availability, price range, the category-specific specification filters, merchandising labels, free shipping, dispatch speed and whether discontinued stock is included, with six orderings. Returns product cards with the product number, name, maker, image, tax-included price, availability, stock and dispatch lines, labels, star rating and review count.

## How to use it

Search shop.tsukumo.co.jp, the Japanese PC-parts and electronics shop. Give a keyword, a category (e.g. '20:2005' from the categories endpoint) or both; Japanese keywords work. Narrow with maker codes, stock labels, specs and tags taken from the facets endpoint for the same category, price_min/price_max in JPY, free_shipping, ships_within_24h, ships_within_3_days, newly_stocked and include_discontinued; order with sort. The two dispatch flags are the exception to how the other filters combine: a product carries one dispatch promise or the other, and setting both returns the products that carry either, so ask for one to narrow. Each result carries id (the thirteen-digit product number usable with the products and products/reviews endpoints), url, name, maker and maker_id, image, price with price_text and currency, availability, summary, stock_message, delivery_message, badges, rating and review_count. Prices are in JPY and tax-included. Products whose sale has ended are left out unless include_discontinued is set, and asking for a stock label instead selects availability directly — including 販売終了 and 取扱終了 — so the two cannot be combined.

## 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 query matched on product name, maker and specification text (minLength: 1)
- `category` (string, nullable) — Category to search inside, e.g. '20:2005' (from the categories endpoint) (examples: "20", "20:2005", "20:2005:2005400")
- `count` (integer, required) — Max number of results to return (min: 1)
- `maker` (array, nullable) — Maker codes as returned by the facets endpoint (examples: ["7602"])
- `stock` (array, nullable) — Availability labels as returned by the facets endpoint (examples: ["在庫あり"])
- `price_min` (integer, nullable) — Minimum tax-included price in JPY (min: 0)
- `price_max` (integer, nullable) — Maximum tax-included price in JPY (min: 0)
- `specs` (array, nullable) — Specification filters of the category being searched, spelled 'name:value' exactly as the facets endpoint returns them (examples: ["コア数:8"])
- `tags` (array, nullable) — Merchandising labels as returned by the facets endpoint (examples: ["ベストセラー"])
- `free_shipping` (boolean) — Keep only products that ship free (default: false)
- `ships_within_24h` (boolean) — Keep the products dispatched within 24 hours; set together with ships_within_3_days it widens the result to either promise rather than narrowing it (default: false)
- `ships_within_3_days` (boolean) — Keep the products dispatched within 1-3 days; set together with ships_within_24h it widens the result to either promise rather than narrowing it (default: false)
- `newly_stocked` (boolean) — Keep only products the shop has just started carrying (default: false)
- `include_discontinued` (boolean) — Also return products whose sale has ended and stock that is no longer carried (default: false)
- `sort` (string) — Result ordering (default: "recommended"; one of: "recommended", "newest", "maker_asc", "maker_desc", "price_asc", "price_desc")

## Response

### 200 — Successful Response

- `@type` (string) (default: "TsukumoProductCard")
- `id` (string, required)
- `url` (string, required)
- `name` (string, nullable)
- `maker` (string, nullable)
- `maker_id` (string, nullable)
- `image` (string, nullable)
- `price` (number, nullable)
- `currency` (string) (default: "JPY")
- `price_text` (string, nullable)
- `availability` (string, nullable)
- `summary` (string, nullable)
- `stock_message` (string, nullable)
- `delivery_message` (string, nullable)
- `badges` (array) (default: [])
- `rating` (number, nullable)
- `review_count` (integer, nullable)

## Errors

### 422 — Validation Error

Neither keyword nor category was given, a malformed category, or stock combined with include_discontinued

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 requested category holds no products on shop.tsukumo.co.jp

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.

