# Cainz Scraper - Products, Prices, Stock & Categories (Japan) (`abotapi/cainz-com-scraper`) Actor

Scrape Cainz (cainz.com) home-improvement and household products in Japan: prices in yen, sale flags, stock, JAN barcodes, specifications, ratings, variations, images, category paths and supplier codes. Read categories by name or code, or paste category, product, home page and campaign links.

- **URL**: https://apify.com/abotapi/cainz-com-scraper.md
- **Developed by:** [Abot API](https://apify.com/abotapi) (community)
- **Categories:** Automation, Developer tools, E-commerce
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 product results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Cainz Scraper: Products, Prices, Stock & Categories (Japan)

Cainz Scraper turns cainz.com, the Japanese home-improvement and household store, into structured product data. Read categories by name (Japanese, or English for the top-level groups) or by code, or paste a category, product, home page or campaign link, and get prices in yen, sale flags, stock status, JAN barcodes, specifications, ratings, variations, image galleries, category paths and supplier codes. Export to JSON, CSV or Excel, or pull results straight into your app through the API.

### Why This Scraper?

- **Every way into the catalog.** Category names or codes in search mode, or category pages, single product pages, the home page and campaign or guide pages in URL mode, each read to its natural end or to the cap you set.
- **Rich product rows.** Name in kanji and katakana, JAN barcode, brand, supplier code and name, department, line and class codes, origin country, tax rate and category, sale period and the full image gallery.
- **Prices and stock.** Price in yen, the on-sale flag, availability, the stock status text, the store code and, on the product page, the stock line of each store with its on-hand count.
- **Variations and specifications.** Colour, size and other options with their images, the linked variant products, and every specification as a labelled name and value.
- **Ratings and badges.** Review score, review count and star rating, the product label and the flyer or campaign badges.
- **Category path and page facts.** The full breadcrumb of each product, the page title and the share title, plus the structured product block of its page.
- **Monitoring built in.** Label every product NEW, UPDATED, REAPPEARED or EXPIRED across scheduled runs, track price and stock only, resume an interrupted crawl, get a chat alert when a run finishes, and export through MCP connectors.

### Use Cases

- **Price and promotion monitoring:** track prices and sale flags across DIY, garden, pet, furniture and household categories, and get alerted only to what actually changed.
- **Catalog enrichment:** match your own product list to Cainz by JAN barcode and add specifications, images and category paths.
- **Stock tracking:** follow availability and per-store stock status for products you resell or compare.
- **Market research:** study range depth, price bands and own-brand share in a category such as paint, storage or pet supplies.
- **Content and campaign tracking:** read the products that a campaign or guide page features.

### Data You Get

> Sample shape: values are illustrative placeholders, not from a live record.

| Field | Example |
| --- | --- |
| `product_id` / `sku` / `jan_code_gtin` | `"0000000000000"` (the JAN or in-house code) |
| `product_name` / `product_name_kanji` / `product_name_katakana` | `"Sample Interior Cushion Grey"` / the registered kanji name / the registered katakana name |
| `product_url` | the product page |
| `category_id` / `category_name` / `category_breadcrumb` / `department_code` / `line_code` / `class_code` | `"0000"` / `"Sample Category"` / `[{"code": "t00", "name": "Sample Group"}]` / `"000"` / `"000"` / `"0000"` |
| `brand_name` / `supplier_code` / `supplier_name` | `"Sample Brand"` / `"000000"` / the supplier's registered name |
| `price` / `price_currency` / `is_on_sale` | `1780` / `"JPY"` / `false` |
| `availability_status` / `store_code` / `stock_status` | `"InStock"` / `"000"` / the stock status text |
| `stock_status_updated_at` | the stock refresh note the list page shows |
| `store_inventory` | each store line with `type`, `store_code`, `stock_status`, `quantity_available`, `price`, `selectable` (product page) |
| `image_url` / `image_urls` | main image / full gallery |
| `variation_id` / `variation_label` / `variation_options` / `variant_product_ids` | the variation axis, its label, each option with name and swatch, and the linked products |
| `review_score` / `review_total_reviews` / `review_stars` | `4.5` / `12` / `5` |
| `origin_country_code` / `sales_start_date` / `sales_end_date` | `"JPN"` / the sale period, when the product has one |
| `consumption_tax_rate` / `consumption_tax_category` | `10` / `"0"` |
| `wappens_badges` / `label` / `labels` / `promotion_name` | the flyer or campaign badges / the product label / every label / the running promotion |
| `description` / `specifications` / `search_keywords` | the product copy / `[{"name": "Colour", "value": "Grey"}]` / the site's own search keywords |
| `related_product_ids` / `product_classification` / `cainz_original_product` | related products / the classification names / whether it is an own-brand product |
| `search_total_count` / `search_page_no` / `search_page_size` / `search_offset` / `price_range_min` / `price_range_max` | the result counters and price range of the list page the row came from |
| `ld_json_product_name` / `ld_json_images` / `ld_json_description` / `ld_json_sku` / `ld_json_brand` / `ld_json_offers_price` / `ld_json_offers_currency` / `ld_json_offers_availability` / `ld_json_offers_url` | the structured product block and offer of the product page |
| `page_title` / `seo_title` | the page title and the share title of the product page |
| `source_url` / `position` / `scraped_at` | the link or page the row came from, its result position, and when it was read |
| `changeType` / `changedFields` / `firstSeenAt` / `lastSeenAt` | incremental mode only: `"NEW"`, `"UPDATED"`, `"UNCHANGED"`, `"REAPPEARED"` or `"EXPIRED"`, the fields that changed, and when the product was first and last seen |

The category path, per-store stock lines, label list, structured product block and page titles come from each product's own page: on category runs they need **Fetch product details**; rows from pasted product links always carry them. Some products have no brand, no sale period, no badge or no reviews, and those fields are then empty. Free-text keyword search is not available, because the site ignores keywords on its category pages.

**Output views.** The dataset has two views in the Console: **Products** and **Changes (incremental)**. Each run also stores a run summary under the `OUTPUT` key of its default key-value store.

### How to Use

1. Keep the default **search** mode and add one or more categories by name or code, or switch to **url** mode and paste category, product, home page or campaign links.
2. Type a category the way the site shows it (for example `屋根・トタン塗料`, `ペンキ` or `ソファー`), a top-level group in English (`Paint`, `Furniture & Interior`), or the code after `category=` in any Cainz category link (for example `4116`).
3. Narrow with brands, a price range, a minimum rating or on-sale only.
4. Keep **Fetch product details** on for the richest rows, or turn it off for a cheaper listing-level pull.
5. Set **Max items** to control run size and cost, then click **Start**.

**One category:**

```json
{
  "mode": "search",
  "categories": ["4116"],
  "maxItems": 20
}
```

**Two categories, filtered:**

```json
{
  "mode": "search",
  "categories": ["10", "41"],
  "maxPrice": 5000,
  "minRating": 4,
  "maxItems": 50
}
```

**Links of several kinds, a few products from each:**

```json
{
  "mode": "url",
  "urls": [
    "https://www.cainz.com/search/?category=10",
    "https://www.cainz.com/g/4549509686033.html",
    "https://www.cainz.com/contents/sale/"
  ],
  "maxItemsPerSearch": 10,
  "maxItems": 30
}
```

#### Caps and pagination

**Max items** stops the whole run once that many products have been returned (`0` = no cap). **Max items per category or link** caps each one on its own, so one large category cannot use up the whole run. **Max pages** limits how many result pages (40 products each) every category or link walks; it does not cap the run by itself. Without a cap, each category is walked to its natural end. The site lists at most 49 result pages (1,960 products) for one category; a larger category continues into its sub-categories automatically, with duplicates dropped. A pasted link with `&page=N` starts at that page and never triggers EXPIRED detection. A home page or campaign link reads a sample of the products and categories it links, so it never counts as a complete scan either.

#### Resume and recurring updates

- **Resume** (`resumeFromRunId`) skips products already collected by an earlier run: paste its run or dataset ID and those products are neither returned nor charged again.
- **Incremental mode** (`incrementalMode`) is for scheduled runs over the same categories or links. Each product is classified `NEW`, `UPDATED` (with `changedFields`), `UNCHANGED` (left out and not billed unless `emitUnchanged` is on), `REAPPEARED`, or `EXPIRED` (only after a run whose walks all reached their end, never after a capped, page-limited or resumed run, and only with `emitExpired` on). The result position, scrape time, the page a product was found through, the search-wide counters, the stock refresh note and the per-store on-hand counts never count as a change. `ignoreFieldsForChanges` defaults to the review score, the review count and the star rating, which drift with every new review; remove names to be told about them, or add more. `changeScope: "priceAndStock"` compares only price, sale flag, availability and stock status; `compactUpdates` returns slim rows with just what moved. If a product's page cannot be read during an incremental run, that product is held back (not returned, not charged, its saved state untouched) and the next run that can read it reports it. `stateKey` names or shares the stored state; leave it empty and the actor derives one from the run's categories, links and filter setup.

#### Alerts

Fill in a Slack incoming webhook, a Discord channel webhook or a Telegram bot, and the actor posts one short summary when the run finishes: the number of rows (and, in incremental mode, how many are new, updated, reappeared or expired) followed by up to **Rows listed per alert** products. With **Alert on changes only** on and Incremental changes on, nothing is sent when nothing changed. Alerts are free and never change the run's result; leave every field empty to skip them.

### Send results into your apps (MCP connectors)

Optionally pipe the scraped results into the apps you already use, via Model Context Protocol (MCP) connectors. This is an extra delivery step **after** the scrape: the Apify dataset is never changed.

**What gets written to the connector:** a condensed, human-readable **summary** of each record, not the full JSON. Each item becomes one entry with a **title** and its key fields flattened to plain text. The **complete record always stays in the Apify dataset**.

1. Authorize a connector once under **Apify, Settings, Integrations** (Notion, Linear, Airtable, or Apify).
2. Select it in the **"Pipe results into your apps"** input field (`mcpConnectors`). (If the picker is empty, you haven't authorized a connector yet.)
3. For **Notion**, also set `notionParentPageUrl` to the page where items should be created.
4. Optionally set `maxNotifyListings` to cap how many items are written to each connector per run (default 50).

The connection is mediated by Apify's MCP proxy, so this actor never sees your third-party credentials. Leave the field empty to skip.

### Input Parameters

| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| `mode` | string | `search` | `search` (category names or codes) or `url` (pasted links). |
| `categories` | array | `4116` | Search mode: category names as the site shows them (or one part of the name, a path like `ペンキ（塗料）・塗装用品 / 屋根・トタン塗料`, or a top-level group in English), or category codes (the number after `category=` in a Cainz category link), each read separately. A pasted category link is accepted too. A name matching several categories, or none, is skipped and named in the log and in the run's status message. |
| `brands` | array | (none) | Keep only these brands, spelled as the store spells them; matches part of the name, ignoring case. |
| `minPrice` | integer | (none) | Lowest price kept, in yen. |
| `maxPrice` | integer | (none) | Highest price kept, in yen. |
| `minRating` | number | (none) | Only products with a review score of at least this many stars. |
| `onSaleOnly` | boolean | `false` | Only products currently marked as on sale. |
| `urls` | array | one link of each shape | URL mode: category (`/search/?category=4116`, also `&page=2`), product (`/g/<code>.html`), the home page, or campaign, hub and guide pages under `/contents/`. A keyword-only search link is read as the home page. |
| `fetchDetails` | boolean | `true` | Category rows: add the category path, per-store stock lines, label list, structured product block and page titles (charged per enriched row). |
| `maxPages` | integer | (none) | Optional page limit per category or link; does not cap the run, Max items does. |
| `maxItems` | integer | `20` | Cap on the whole run; `0` = no cap. |
| `maxItemsPerSearch` | integer | `0` | Cap per category or pasted link; `0` = no per-category cap. |
| `proxy` | object | Automatic | Apify Proxy settings, or your own proxy URLs. |
| `resumeFromRunId` | string | (none) | Run or dataset ID whose products are skipped. |
| `incrementalMode` | boolean | `false` | Return only new, changed and reappeared products on repeat runs. |
| `stateKey` | string | (auto) | Name or share the incremental state. |
| `changeScope` | string | `all` | `all` or `priceAndStock`. |
| `compactUpdates` | boolean | `false` | Slim UPDATED rows with only what moved. |
| `expireAfterMissedScans` | integer | `1` | Complete scans a product must be missing before EXPIRED. |
| `emitUnchanged` | boolean | `false` | Also return UNCHANGED rows (billed as rows). |
| `emitExpired` | boolean | `false` | Also return EXPIRED rows after a complete scan (billed as rows). |
| `ignoreFieldsForChanges` | array | review score, count, stars | Fields that never count as a change; remove names to be told about them. |
| `mcpConnectors` | array | (none) | Optional MCP connectors to send results into, see above. |
| `notionParentPageUrl` | string | (none) | Notion page that receives the items (Notion connector only). |
| `maxNotifyListings` | integer | `50` | Cap on items written to each connector per run. |
| `notifyOnlyChanges` | boolean | `false` | Send the alert only when something changed (needs Incremental changes). |
| `notificationLimit` | integer | `5` | Product rows listed in an alert. |
| `slackWebhookUrl` | string | (none) | Optional Slack incoming webhook for the run summary. |
| `discordWebhookUrl` | string | (none) | Optional Discord channel webhook for the run summary. |
| `telegramBotToken` | string | (none) | Optional Telegram bot token for the run summary. |
| `telegramChatId` | string | (none) | Telegram chat that receives the summary. |

### Output Example

> Sample shape: values are illustrative placeholders, not from a live record.

```json
{
  "kind": "product",
  "product_id": "0000000000000",
  "product_name": "Sample Storage Box Grey 30L",
  "product_url": "https://www.cainz.com/g/0000000000000.html",
  "category_id": "0000",
  "category_name": "Sample Category",
  "category_breadcrumb": [{"code": "t00", "name": "Sample Group"}, {"code": "0000", "name": "Sample Category"}],
  "department_code": "000",
  "line_code": "000",
  "class_code": "0000",
  "brand_name": "Sample Brand",
  "supplier_code": "000000",
  "sku": "0000000000000",
  "jan_code_gtin": "0000000000000",
  "price": 1780,
  "price_currency": "JPY",
  "is_on_sale": false,
  "availability_status": "InStock",
  "store_code": "000",
  "stock_status": "In stock",
  "image_url": "https://imgix.example.com/0000000000000/product/0000000000000_01.jpg",
  "image_urls": ["https://imgix.example.com/0000000000000/product/0000000000000_01.jpg"],
  "variation_label": "Colour",
  "variation_options": [{"option_id": "00000000000000000", "name": "Grey", "image_url": null}],
  "review_score": 4.5,
  "review_total_reviews": 12,
  "review_stars": 5,
  "origin_country_code": "JPN",
  "consumption_tax_rate": 10,
  "consumption_tax_category": "0",
  "wappens_badges": [],
  "label": "Sample label",
  "store_inventory": [{"type": "delivery", "store_code": "000", "stock_status": "In stock", "quantity_available": 5, "price": 1780, "selectable": true}],
  "page_title": "Sample Storage Box Grey 30L | Sample Category",
  "seo_title": "Sample Storage Box Grey 30L",
  "position": 1,
  "scraped_at": "2026-01-20T08:00:00+00:00"
}
```

### Plan Requirement

Pay per event: one unit per returned product row, plus an actor start event, plus a detail-enrichment unit for each category row actually enriched with its product page. Each unit is charged per row, as the row is delivered, never as a single total at the end. A row whose product page could not be read still ships, without that unit, and an unchanged product left out in incremental mode is neither returned nor charged. Rows from pasted product links carry the full product page from the same read and never carry the detail-enrichment unit.

### FAQ

#### How much does it cost?

You pay per product row returned, plus one detail-enrichment unit per category row enriched with its product page (on by default; turn `fetchDetails` off for listing-only rows). The **Pricing** tab shows the current rates. Use **Max items** to cap the cost of any run.

#### Is it legal to scrape cainz.com?

This actor collects only publicly available product data that Cainz shows on its own pages. You are responsible for how you use it: follow Cainz's terms and the laws that apply to you, and get legal advice if you plan commercial redistribution. Prices and specifications are generally facts, but images and description text may be subject to third-party rights.

#### How do I pick a category?

Type its name the way the site shows it, for example `屋根・トタン塗料` or just `ペンキ`; top-level groups also accept their English name, such as `Paint` or `Furniture & Interior`. If a name matches several categories, the log lists them so you can type the full path instead. Any skipped entry is also listed in the run's status message and in the run summary (`categoriesSkipped`), so a partly skipped run never narrows quietly. You can also use the code: open the category on the site and copy the number after `/search/?category=`, for example `4116`. Top-level groups have short codes (`10`, `41`) and sub-categories have longer ones that start with their parent's code.

#### Can I search by keyword?

Not directly: the site ignores free-text keywords on its category pages and sends a keyword-only link to its home page. Read the category that fits your topic, then narrow with brand, price and rating filters.

#### Can I get only new or changed products on a schedule?

Yes. Schedule the actor from the **Schedules** tab and turn on **Incremental mode**. Each run then returns only new, updated and reappeared products; unchanged ones are not billed unless you turn `emitUnchanged` on. Use `changeScope: "priceAndStock"` to be told only about price and stock moves.

#### Why does a category return fewer products than the site shows?

The site lists at most 49 result pages (1,960 products) for one category, so the actor continues into its sub-categories when a category is larger. Products that appear in no sub-category are not reachable. Filters you set (brands, price, rating, on sale) narrow the same result the site would show.

#### Which proxy should I use?

The default (Automatic) is a datacenter connection measured to work on every page this actor reads, and it needs a plan with Apify Proxy access. Apify free plans include no Apify proxy: a free run continues only on a backup datacenter connection (never residential), or you can enter your own proxy URLs. Residential is recommended for the most reliable results on large or frequent runs. If the connection you selected is unavailable or keeps getting refused, the run automatically continues on a backup connection (the other Apify proxy tier, then a backup gateway) rather than stopping; that escalation is disclosed in the run log the first time it happens, and any residential traffic it uses is billed to your own Apify plan. Set `CAINZ_COM_ALTERNATE_CONNECTION=0` in the run's environment variables to disable the backup connection entirely. If you enter your own proxy URLs, they are used as-is with no backup connection; if your proxy re-signs HTTPS traffic, the run says so once in the log ("The custom proxy re-signs HTTPS traffic; retrying without certificate verification for it.") and continues on it.

#### Why did my run fail instead of returning an empty dataset?

If every category or link could not be read, the run stops with a clear message so "no products matched" is never confused with "nothing could be read". Run it again in a few minutes. The messages you may see in the run log:

- When the selected connection is unavailable to your account, the log says: "The selected connection is unavailable to this run. Apify free plans do not include residential proxies. Continuing on a backup connection; some pages may still be unavailable. For residential access, upgrade at https://apify.com/pricing or supply your own proxy URLs."
- When pages are then read over the backup connection: "Served over the backup connection (the default connection was unavailable)." Set `CAINZ_COM_ALTERNATE_CONNECTION=0` in the run's environment variables to disable the backup connection.
- If the proxy connection is refused for the account and no page could be read: "The proxy connection was refused for this account, so no page could be read. Your Apify plan does not include proxy access; a paid plan is required: https://apify.com/pricing. If you entered your own proxy URLs, check that their credentials are valid."
- If the run reaches the maximum cost per run you set, it stops and its status says: "Stopped early: the run reached the maximum cost per run you set, after N row(s). Nothing more was read, delivered or charged. Raise the maximum cost per run to collect more."
- If the run has no residential access and the backup connection still could not load a usable page: "No results: residential proxies are unavailable on this run (Apify free plans do not include them), and the backup connection could not load the requested Cainz pages. Upgrade at https://apify.com/pricing or supply your own proxy URLs, then try again."
- If every request failed for another reason: "Could not load any results page (the requests failed), so nothing was collected. This is a connection problem, not an empty search. Please try again later."

Each of these failure messages ends with how many of your categories or links could not be read (or, in incremental mode, how many products were held back because their page could not be read). A run with no usable category (none resolved) or no supported links fails at once with "Nothing to scrape: add category names or codes in Search mode, or paste valid cainz.com category, product or campaign links in URL mode." If only some categories or links could be read, you still get what was found, and the run's status message says how many could not be read.

#### Why does a row have no category path, store stock lines or page titles?

Those fields come from the product's own page and need **Fetch product details** on category runs. If a product page could not be read during the run, the row still ships with everything else and is not charged for the missing part.

#### Can I use it with AI agents or MCP?

Yes. Call it from any Apify integration or MCP client, and use the connector field to push results into Notion, Linear or Airtable.

### 🔗 Want more e-commerce data?

Pair this actor with these related scrapers from the same team:

<table>
<tr><td>🛒 <a href="https://apify.com/abotapi/nitori-net-jp-scraper"><b>Nitori Japan Scraper</b></a><br>Scrape Nitori Japan (nitori-net.jp) furniture and home goods by keyword, category or URL...</td><td>🛒 <a href="https://apify.com/abotapi/mistore-jp-scraper"><b>Isetan Mitsukoshi</b></a><br>Scrape the Isetan Mitsukoshi department store online shop (mistore.jp). Search by keyword...</td></tr>
<tr><td>🛒 <a href="https://apify.com/abotapi/obi-de-scraper"><b>OBI.de Scraper</b></a><br>Scrape OBI (obi.de) DIY/home-improvement products: current + strike-through original...</td><td>🔌 <a href="https://apify.com/abotapi/lowes-com-scraper"><b>Lowe's Scraper</b></a><br>Scrape Lowe's (lowes.com) home improvement, tools, appliances and building supplies by...</td></tr>
<tr><td>🛒 <a href="https://apify.com/abotapi/wayfair-scraper"><b>Wayfair Scraper</b></a><br>Scrape Wayfair.com furniture and home products by keyword or URL, including product...</td><td>🛒 <a href="https://apify.com/abotapi/castorama-fr-scraper"><b>Castorama.fr</b></a><br>Scrape Castorama.fr DIY and home-improvement products by keyword, category, or URL...</td></tr>
</table>

👉 [Browse all abotapi scrapers](https://apify.com/abotapi)

### 💬 Support

- 🐞 **Found a bug or a missing field?** Open a ticket on the [Issues tab](https://apify.com/abotapi/cainz-com-scraper/issues/open). We usually reply within hours.
- 🛠️ **Need another site, extra fields or a private build?** Email <contact@abotapi.com>.
- ⭐ **Enjoying it?** A quick review on the actor page helps other users find it.

# Actor input Schema

## `mode` (type: `string`):

Choose 'search' to read categories by name or code or 'url' to paste category, product, home page or campaign links.

## `categories` (type: `array`):

One or more categories, by the name the site shows (for example '屋根・トタン塗料', 'ペンキ' or 'ソファー'), the English name of a top-level group (for example 'Paint' or 'Furniture & Interior'), a path such as 'ペンキ（塗料）・塗装用品 / 屋根・トタン塗料', or the category code: the number after category= in a Cainz category link (4116 for Roof & Tin Paint). Pasting a whole category link also works. A name that matches several categories, or none, is skipped and named in the log and in the run's status message. Each category is read separately, up to the 49 result pages (1,960 products) the site lists per category; a larger category continues into its sub-categories automatically. The site ignores free-text keywords, so use URL mode for a home page or campaign page.

## `brands` (type: `array`):

Only return products of these brands, written the way Cainz shows them (for example 'CAINZ', 'PRO'). Matches part of the brand name, ignoring case. Leave empty for all brands.

## `minPrice` (type: `integer`):

Lowest price in yen (tax included). Leave empty for no lower bound.

## `maxPrice` (type: `integer`):

Highest price in yen (tax included). Leave empty for no upper bound.

## `minRating` (type: `number`):

Only products with a customer review score of at least this many stars (1 to 5). Unrated products are left out. Leave empty for all.

## `onSaleOnly` (type: `boolean`):

Only return products currently marked as on sale. Off by default.

## `urls` (type: `array`):

Paste Cainz links: a category page (/search/?category=4116, also its \&page=2), a product page (/g/<code>.html), the home page, or a campaign, hub or guide page under /contents/ (the products and categories those pages link are read). A keyword-only search link is read as the home page, because the site does not serve keyword results. Store locator, cart and file links are not product listings and are skipped.

## `fetchDetails` (type: `boolean`):

Read each category row's product page to add the category path, per-store stock lines, the full label list, the structured product block and the page titles. Charged once per row enriched. Rows from pasted product links already carry all of this and are never charged for it. Turn off for a cheaper listing-level pull.

## `maxPages` (type: `integer`):

Optional. Limits how many result pages each category or link walks (40 products per page). Empty or 0 means no page limit; it does NOT cap the run and defers to Max items below, which is the single default cap (20).

## `maxItems` (type: `integer`):

THE cap on this run: the maximum number of product rows returned across the whole run. Defaults to 20 so a first run is fast and cheap. Use 0 for unlimited (a whole category or the whole catalog).

## `maxItemsPerSearch` (type: `integer`):

Optional. Caps how many products each category or pasted link may return, so one large category cannot use up the whole run. 0 (default) = no per-category cap; Max items still caps the run.

## `proxy` (type: `object`):

Leave this on the default (Automatic) for most runs; it is a datacenter connection measured to work on every page this actor reads, and it needs a plan with Apify Proxy access (free plans continue on a backup datacenter connection only, or use your own proxy URLs). Residential is recommended for the most reliable results on large or frequent runs, and is billed to your own Apify plan.

## `resumeFromRunId` (type: `string`):

Paste a previous run ID or dataset ID to continue a large crawl without returning or charging for products already collected there. For recurring monitoring of the same search, use Incremental mode below instead.

## `incrementalMode` (type: `boolean`):

Turn this on for daily or recurring monitoring. The first run returns every matching product as NEW. Later runs normally return only NEW, UPDATED and REAPPEARED products. A product counts as UPDATED when any of its fields changed, except the result position, the scrape time, the page it was found through, the search-wide counters (total, page, price range), the stock-status refresh time, the per-store on-hand counts, and by default its review score, review count and star rating (see Ignore fields below); with 'Price and stock only' just price, sale flag, availability and stock status are compared. State is kept separately for each category, link, filter and detail setup; use State key to name or deliberately share a monitoring campaign.

## `stateKey` (type: `string`):

Optional. Name this monitoring campaign to keep its state stable, or to deliberately share state across differently configured runs. Leave empty to derive a key automatically from this run's search and filter setup.

## `changeScope` (type: `string`):

'Price and stock only' compares just price, sale flag, availability and stock status (and the per-store stock lines); a description, image, specification or badge change is treated as UNCHANGED and is never returned or billed as UPDATED. 'All fields' compares the whole record (minus the fields listed under Incremental changes).

## `compactUpdates` (type: `boolean`):

When on, an UPDATED row carries only identifiers plus the price/stock fields that actually moved (priceChanges, variantChanges), instead of the full record. Off by default.

## `expireAfterMissedScans` (type: `integer`):

A tracked product absent from this many consecutive complete scans in a row is marked EXPIRED; fewer misses are held over without being reported. 1 (default) expires on the first miss, matching this actor's previous behaviour.

## `emitUnchanged` (type: `boolean`):

Off by default. Turn on to also return products that have not changed since the last run, marked UNCHANGED. This returns, and bills, extra rows you already have.

## `emitExpired` (type: `boolean`):

Off by default. Turn on to also return products that were present in a previous run but are no longer found, marked EXPIRED. Only produced once a run has fully scanned the tracked search, never when Max items or Max pages capped it, when a pasted link started past page 1, or when Resume was used. This returns, and bills, extra synthetic rows.

## `ignoreFieldsForChanges` (type: `array`):

Field names that must NOT count as a change in incremental mode. The default list leaves out the review score (review_score), the review count (review_total_reviews) and the star rating (review_stars), which drift with every new review; remove names from the list to be told about them. A product whose only differences are in these fields is treated as UNCHANGED, so it is not returned or billed as UPDATED. Names match at any nesting depth. The fields still appear in the output of rows that are returned.

## `mcpConnectors` (type: `array`):

Optionally send results into the apps you already use, via Model Context Protocol (MCP) connectors. Authorize one under Apify, Settings, API & Integrations, then select it here. Notion gets a rich page-per-item export; other connectors get a best-effort write or digest. Leave empty to skip; this never changes the dataset output. Supported: Notion (https://mcp.notion.com/mcp), Linear (https://mcp.linear.app/sse), Airtable (https://mcp.airtable.com/mcp), Apify (https://mcp.apify.com).

## `notionParentPageUrl` (type: `string`):

URL or id of the Notion page under which item pages are created. Required to enable the Notion export; ignored by other connectors.

## `maxNotifyListings` (type: `integer`):

Cap on items written to each connector per run. Does not affect the dataset.

## `notifyOnlyChanges` (type: `boolean`):

Only send the alert when Incremental changes is on and at least one product is NEW, UPDATED, REAPPEARED or EXPIRED. Without Incremental changes every finished run sends its summary.

## `notificationLimit` (type: `integer`):

How many product rows the alert message lists (the run's totals are always in the first line).

## `slackWebhookUrl` (type: `string`):

Optional Slack incoming-webhook URL to post the summary to.

## `discordWebhookUrl` (type: `string`):

Optional Discord channel webhook URL to post the summary to.

## `telegramBotToken` (type: `string`):

Optional. Token of a Telegram bot you own (from BotFather). Used together with the chat ID below to post the run summary. Leave empty to skip.

## `telegramChatId` (type: `string`):

Optional. ID of the Telegram chat or channel that receives the summary. Needed only together with the bot token above.

## Actor input object example

```json
{
  "mode": "search",
  "categories": [
    "4116"
  ],
  "onSaleOnly": false,
  "urls": [
    "https://www.cainz.com/",
    "https://www.cainz.com/search/?category=10",
    "https://www.cainz.com/search/?category=10&page=2",
    "https://www.cainz.com/search/?keyword=%E3%83%9A%E3%83%B3%E3%82%AD",
    "https://www.cainz.com/g/4549509686033.html",
    "https://www.cainz.com/contents/sale/",
    "https://www.cainz.com/contents/",
    "https://www.cainz.com/contents/shoppingguide/sitemap.html"
  ],
  "fetchDetails": true,
  "maxItems": 20,
  "maxItemsPerSearch": 0,
  "proxy": {
    "useApifyProxy": true
  },
  "incrementalMode": false,
  "changeScope": "all",
  "compactUpdates": false,
  "expireAfterMissedScans": 1,
  "emitUnchanged": false,
  "emitExpired": false,
  "ignoreFieldsForChanges": [
    "review_score",
    "review_total_reviews",
    "review_stars"
  ],
  "maxNotifyListings": 50,
  "notifyOnlyChanges": false,
  "notificationLimit": 5
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `changes` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "mode": "search",
    "categories": [
        "4116"
    ],
    "onSaleOnly": false,
    "urls": [
        "https://www.cainz.com/",
        "https://www.cainz.com/search/?category=10",
        "https://www.cainz.com/search/?category=10&page=2",
        "https://www.cainz.com/search/?keyword=%E3%83%9A%E3%83%B3%E3%82%AD",
        "https://www.cainz.com/g/4549509686033.html",
        "https://www.cainz.com/contents/sale/",
        "https://www.cainz.com/contents/",
        "https://www.cainz.com/contents/shoppingguide/sitemap.html"
    ],
    "fetchDetails": true,
    "maxItems": 20,
    "proxy": {
        "useApifyProxy": true
    },
    "incrementalMode": false,
    "compactUpdates": false,
    "emitUnchanged": false,
    "emitExpired": false,
    "ignoreFieldsForChanges": [
        "review_score",
        "review_total_reviews",
        "review_stars"
    ],
    "notifyOnlyChanges": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("abotapi/cainz-com-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "mode": "search",
    "categories": ["4116"],
    "onSaleOnly": False,
    "urls": [
        "https://www.cainz.com/",
        "https://www.cainz.com/search/?category=10",
        "https://www.cainz.com/search/?category=10&page=2",
        "https://www.cainz.com/search/?keyword=%E3%83%9A%E3%83%B3%E3%82%AD",
        "https://www.cainz.com/g/4549509686033.html",
        "https://www.cainz.com/contents/sale/",
        "https://www.cainz.com/contents/",
        "https://www.cainz.com/contents/shoppingguide/sitemap.html",
    ],
    "fetchDetails": True,
    "maxItems": 20,
    "proxy": { "useApifyProxy": True },
    "incrementalMode": False,
    "compactUpdates": False,
    "emitUnchanged": False,
    "emitExpired": False,
    "ignoreFieldsForChanges": [
        "review_score",
        "review_total_reviews",
        "review_stars",
    ],
    "notifyOnlyChanges": False,
}

# Run the Actor and wait for it to finish
run = client.actor("abotapi/cainz-com-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "mode": "search",
  "categories": [
    "4116"
  ],
  "onSaleOnly": false,
  "urls": [
    "https://www.cainz.com/",
    "https://www.cainz.com/search/?category=10",
    "https://www.cainz.com/search/?category=10&page=2",
    "https://www.cainz.com/search/?keyword=%E3%83%9A%E3%83%B3%E3%82%AD",
    "https://www.cainz.com/g/4549509686033.html",
    "https://www.cainz.com/contents/sale/",
    "https://www.cainz.com/contents/",
    "https://www.cainz.com/contents/shoppingguide/sitemap.html"
  ],
  "fetchDetails": true,
  "maxItems": 20,
  "proxy": {
    "useApifyProxy": true
  },
  "incrementalMode": false,
  "compactUpdates": false,
  "emitUnchanged": false,
  "emitExpired": false,
  "ignoreFieldsForChanges": [
    "review_score",
    "review_total_reviews",
    "review_stars"
  ],
  "notifyOnlyChanges": false
}' |
apify call abotapi/cainz-com-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,abotapi/cainz-com-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/rC6wDpY2Jceia3Vr4/builds/PW4lWyLHonzhbU25j/openapi.json
