# Rakuten Product Search Scraper (`bovi/rakuten-scraper`) Actor

Search public Rakuten Ichiba listings and collect product titles, item URLs, shop codes, images, prices, ratings and review counts when published.

- **URL**: https://apify.com/bovi/rakuten-scraper.md
- **Developed by:** [Vitalii Bondarev](https://apify.com/bovi) (community)
- **Categories:** E-commerce
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.60 / 1,000 rakuten product search scrapers

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-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

## Rakuten Product Search Scraper

Scrape public Rakuten Ichiba search results on search.rakuten.co.jp and extract the product records published as JSON-LD. Each scraped product is $0.0016 on the Free plan, plus $0.00005 for each Actor start on the Free plan.

- Monitor listed prices for a keyword across Rakuten shops without signing in to Rakuten.
- Compare ratings and review counts, when the markup includes them, for assortment research.
- Export titles, item URLs, shop codes, and images to build a product catalog.
- Store each item URL once, even when the same product appears on another page or keyword.
- Use your Apify account only; the run creates an Apify residential proxy before the first request.

### What you get

Each dataset row is one unique Rakuten item. The Actor reads `application/ld+json` Product objects on public mall search pages and does not sign in. A row is stored only when the markup has a title, an `http` or `https` URL on `item.rakuten.co.jp` with a shop segment and an item segment, and an offer price with a currency. Shop is the first path segment of that item URL.

Products view columns: Product, Price, Currency, Rating, Reviews, Shop, Product URL, and Image URL.

| Field | Type | When it is present |
| --- | --- | --- |
| title | string | Product name from JSON-LD. Always stored. |
| url | string | Item URL on item.rakuten.co.jp. Always stored. |
| shop | string | Shop code taken from the item URL path. Always stored. |
| price | number | Offer price. A whole number is stored as an integer. Always stored. |
| priceCurrency | string | Offer currency text, JPY on the sample record. Always stored. |
| image | string | Image URL. Key omitted when the markup has no image. |
| rating | number | `aggregateRating.ratingValue`. Key omitted when it is missing. |
| reviewCount | integer | `aggregateRating.reviewCount` when it is a whole number of zero or more. Otherwise omitted. |

> **Note:** Search-page JSON-LD does not include complete specifications, loyalty points, or live stock. Those values are not collected. Ratings, review counts, and prices can differ from one run to the next.

### Sample output

One record from a successful run whose input searched `コーヒー` with `maxResults` set to 3:

```json
{
  "title": "【500円OFFクーポン※店内で2点購入】 澤井珈琲｜送料無料 コーヒー コーヒー豆 コーヒー粉 珈琲豆 豆のまま \"グルメ大賞9度受賞の1番選ばれるコーヒーセット\" 1kg 2kg 3kg 抱えきれないコーヒー福袋 フォルティシモ ビクトリー 人気 ブラジル エチオピア 【RD】【TS】",
  "url": "https://item.rakuten.co.jp/sawaicoffee-tea/ac-sale-1960/?scid=seo-carousel-search",
  "shop": "sawaicoffee-tea",
  "price": 2788,
  "priceCurrency": "JPY",
  "image": "https://thumbnail.image.rakuten.co.jp/@0_mall/sawaicoffee-tea/cabinet/raknewthum/261116/ac-sale-1960_01.jpg",
  "rating": 4.7,
  "reviewCount": 50514
}
```

### Pricing

Billing is pay per event. The Free-plan prices below are the listing rates for the two charged events.

| Event | Free-plan price | When it applies |
| --- | --- | --- |
| `apify-actor-start` | $0.00005 | Charged when the Actor starts. Events depend on memory: one event per GB, with a minimum of one event. |
| `apify-default-dataset-item` | $0.0016 | One scraped product pushed to the dataset. This is the primary event. |

Default run memory is 512 MB, so a default start is one `apify-actor-start` event ($0.00005 per event on the Free plan). Only a product that is pushed creates an `apify-default-dataset-item` event. Duplicate URLs and markup that lacks a price or currency are not pushed, so they are not item events.

3000 results = $4.80005 on Free. That is 3000 × $0.0016 = $4.80, plus one Actor start at $0.00005 on the Free plan.

1,000 products × $0.0016 per product = $1.6 on the Free plan. 10,000 products × $0.0016 per product = $16 on the Free plan. 1,000 Actor starts × $0.00005 per event = $0.05 on the Free plan. 10,000 Actor starts × $0.00005 per event = $0.5 on the Free plan.

The Apify Free plan includes $5 of monthly platform credit. If that credit is spent only on this Actor, one start leaves enough for 3,124 product results: floor((5 − 0.00005) / 0.0016) = 3,124.

Platform usage — compute, Apify Proxy traffic including residential, and storage — is included in these event prices and is paid by the Actor developer. This Actor is not on pay-per-event plus usage, so you do not pay a separate platform-usage charge for the run.

### How to use

1. Open Rakuten Product Search Scraper in Apify and sign in with your Apify account.
2. Enter one or more Japanese or English keywords.
3. Set maxResults to the number of unique products you want across those keywords.
4. Leave the residential proxy in place unless you intentionally turn the proxy off.
5. Start the run and open the dataset to read titles, prices, shops, and item URLs.
6. Repeat the run with Apify Schedules. Daily is a practical starting point for listing and price checks; it is only a starting point, not a statement of how often Rakuten updates pages.

```json
{
  "keywords": ["コーヒー"],
  "maxResults": 3,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

Export the dataset as JSON or CSV, or read the same items through the Apify dataset API.

### Input parameters

| Parameter | What it does | Default |
| --- | --- | --- |
| keywords | Required search terms. Each term is URL-encoded into `https://search.rakuten.co.jp/search/mall/{keyword}/`. Later pages add `?p=`. Terms are trimmed, and terms that match under case-folding are searched once. A non-list value that is a single string is treated as one term. An empty or unusable value falls back to the default term. | \["コーヒー"] |
| maxResults | Stops the run after this many unique products across all keywords. The input minimum is 1. A non-numeric value is treated as 50. | 50 |
| proxyConfiguration | Built before the first request. The default turns on Apify Proxy and selects the residential group. If `useApifyProxy` is false and `proxyUrls` is absent, requests go out with no proxy. | Apify Proxy, residential group |

### Limits and edge cases

For each keyword the Actor requests up to 100 search pages, or fewer when it already has `maxResults` unique URLs. The same item is identified by its URL with the query string, fragment, and a trailing slash removed. Within a page, products that are not `Product` JSON-LD, or that fail the title, host, price, or currency checks, are dropped before they can be stored. On the Free plan, the input cap is 1 search term per run and the result-page cap is 1.

| Condition | What you see | What to do |
| --- | --- | --- |
| Free plan, and the first page does not already fill maxResults | One search page is fetched (the first page of the first keyword). Later pages are not requested. The run stops, keeps rows already pushed, and adds no extra rows. The status message is a Free-plan preview that names the result-pages cap and points at the billing subscription page. Key-value store `OUTPUT` contains `free_plan_preview`, `items_returned`, `items_requested`, `limits_applied` (`result_pages`), `upgrade_url`, and `message`. | Move to a paying plan to fetch later pages and later keywords, or set maxResults within what one page returns. |
| Free plan, and the first page already fills maxResults | Status text is `Collected` plus the number of records. The preview `OUTPUT` record is not written, because the page cap was never reached. | Nothing, if that count is what you wanted. |
| Free plan, first page has no product rows, and another keyword is still queued | The next keyword is not requested. The run finishes with no dataset rows and writes the same Free-plan `OUTPUT` preview, with `items_returned` at 0. It does not fail with the empty-result error. | Put a keyword that returns products first, or run on a paying plan so later keywords are fetched. |
| Every fetched page has no structured products, and the free-plan cap was not applied | The run fails with `Rakuten returned no structured product records; refusing an empty success.` This is a single empty keyword, or a paying run whose keywords are all empty. | Change the keyword. An empty keyword on a paying run does not by itself fail the Actor if a later keyword returns rows. |
| Response body is a block or human-check page | Parsing raises `Rakuten returned a block or challenge page.` The run fails. Rows pushed from earlier pages stay in the dataset. A body that arrives as a normal response is not retried. | Run again with the default residential proxy left on. |
| The HTTP request fails | Each request allows six attempts and a 40-second timeout. Failed attempts wait 1, 2, 4, 8, then 16 seconds. With a proxy configured, each attempt uses a new proxy session. The last error fails the run. Rows already pushed remain. | Rerun. Leave `useApifyProxy` on with the residential group. |
| The same item URL appears again | The duplicate is skipped and does not count toward maxResults. | No action. |
| A later page adds no new URLs | That keyword stops. Other keywords still run unless a stop condition is already set. | Narrow or change the keyword if you expected more distinct items. |
| A keyword reaches 100 pages | That keyword stops at page 100 even if maxResults is higher. | Split the search into narrower terms. |
| The run hits the dataset charge limit while pushing | The run stops and logs `Charge limit reached; stopping with` the number of rows. Rows already pushed, including the row that reached the limit, stay in the dataset. | Raise the run charge limit if you still need more products. |

### FAQ

#### How much does it cost to scrape Rakuten products?

Free-plan event prices are in Pricing: $0.0016 per product and $0.00005 per Actor start. 3000 results = $4.80005 on Free with one default 512 MB start. The $5 credit count and included platform usage are stated there, not as a separate charge.

#### What happens when the search returns no products?

If fetched pages contain no priced `item.rakuten.co.jp` products and the Free-plan page cap was not applied, the run fails with `Rakuten returned no structured product records; refusing an empty success.` One empty keyword does not fail a paying run when a later keyword returns rows. On the Free plan, an empty first page does not continue into the next keyword; the run ends as a preview with zero dataset rows.

#### Why did the run stop or fail before maxResults?

A Free-plan run requests only one search page, then stops if more pages or keywords would be needed. A block or human-check body fails the run with `Rakuten returned a block or challenge page.` A request that still fails after six attempts fails the run and leaves earlier rows in the dataset. Reaching maxResults, 100 pages, a later page with no new URLs, or the dataset charge limit also stops collection. The status line `Collected` plus a count means the run finished without the Free-plan cap.

#### Do I need a Rakuten login or an API key?

No. The Actor reads public search pages and does not sign in to Rakuten. You do not provide a Rakuten password, cookies, or an API key. Your Apify account is the only account used to start the run.

#### Is collecting this public Rakuten data legal?

The Actor collects product records that Rakuten publishes as JSON-LD on public search pages. It does not decide whether a particular use is allowed. Source terms and applicable law depend on your use case. This page is not a legal guarantee.

### Usage statistics

This Actor creates a small, content-free summary at the end of each run, used only to monitor reliability and improve this Actor. No input values, credentials or scraped data are sent.

A copy of the exact record for your run is saved as `USAGE_STATS` in your own Apify key-value store.

To opt out, set `disableUsageStats` to `true` in the input. Nothing is sent then.

[Full list of collected fields](https://api.apify.com/v2/key-value-stores/v9rgHjMKLDGtHf8tD/records/index.html)

# Actor input Schema

## `keywords` (type: `array`):

Rakuten Ichiba search terms. Japanese and English terms are supported.

## `maxResults` (type: `integer`):

Maximum number of unique product records to collect across all keywords.

## `proxyConfiguration` (type: `object`):

Optional proxy settings. The actor uses Apify RESIDENTIAL by default.

## Actor input object example

```json
{
  "keywords": [
    "コーヒー"
  ],
  "maxResults": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset with the collected records.

# 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 = {
    "keywords": [
        "コーヒー"
    ],
    "maxResults": 50,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("bovi/rakuten-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 = {
    "keywords": ["コーヒー"],
    "maxResults": 50,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("bovi/rakuten-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 '{
  "keywords": [
    "コーヒー"
  ],
  "maxResults": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call bovi/rakuten-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bovi/rakuten-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/xEIvMvl1BYjqRbxxm/builds/muFzz04stA9bPPi7G/openapi.json
