# Rakuten Scraper — Japan Marketplace Products, Prices & Reviews (`haketa/rakuten-scraper`) Actor

Scrape Rakuten Ichiba (楽天市場) by keyword: live prices (JPY), shop name, review score & count, Rakuten points, shipping, stock and images. Fast HTTP, no login. For price monitoring, product research & e-commerce datasets.

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

## Pricing

from $3.00 / 1,000 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/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 Scraper — Japan Marketplace Products, Prices, Shops & Reviews (楽天市場)

[![Apify Actor](https://img.shields.io/badge/Apify-Actor-orange?logo=apify)](https://apify.com/haketa/rakuten-scraper)
[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://apify.com/haketa/rakuten-scraper)
[![Data Quality](https://img.shields.io/badge/Data%20Quality-Verified-blue.svg)](https://apify.com/haketa/rakuten-scraper)
[![Format](https://img.shields.io/badge/Export-JSON%20|%20CSV%20|%20Excel-brightgreen)](https://apify.com/haketa/rakuten-scraper)
[![Speed](https://img.shields.io/badge/Speed-HTTP%20Fast-yellow)](https://apify.com/haketa/rakuten-scraper)

Extract product listings, dynamic prices in Japanese Yen (JPY), verified merchant store ratings, customer reviews, Rakuten Super Points rewards, and real-time shipping costs from **Rakuten Ichiba (楽天市場)**, Japan's #1 e-commerce marketplace. Whether you need automated price monitoring, dropshipping product research, competitor benchmarking, or retail catalog enrichment, Rakuten Scraper provides structured e-commerce intelligence at scale.

***

### ⚡ At a Glance

| Feature | Specification |
|---|---|
| **Target Website** | [Rakuten Ichiba (search.rakuten.co.jp)](https://search.rakuten.co.jp) |
| **Input Options** | Search keywords (`searchTerms`), direct filtered category URLs (`startUrls`) |
| **Data Fields** | Title, subtitle, price (JPY), stock status, shop details, review score & count, points, shipping fees, genres, tags, photos |
| **Output Formats** | Dataset (JSON, CSV, Excel, XML, NDJSON), Key-Value Store run summary |
| **Pagination** | Deep pagination unlocked (1,000+ items across single or multiple queries) |
| **Proxy Requirement** | Apify Proxy datacenter proxies (fast rotation, residential proxy NOT required) |
| **Execution Speed** | High-throughput HTTP extraction (~45 products per page in sub-second cycles) |
| **Authentication** | No Rakuten account credentials or developer application approval required |

***

### 🚀 Why Scrape Rakuten Ichiba?

Rakuten Ichiba (楽天市場) is the undisputed pillar of Japan's domestic e-commerce landscape, powering tens of thousands of active digital shopfronts and hundreds of millions of consumer transactions:

- 📊 **Real-Time Price & Margin Tracking**: Monitor competitive merchant pricing in Japanese Yen (`JPY`), detect sudden price drops, and calculate exact landed costs including shipping.
- 🏪 **Merchant & Storefront Benchmarking**: Discover leading Japanese retailers, shop rating scores, storefront URLs, and store-level product catalogs.
- ⭐ **Review & Customer Satisfaction Intelligence**: Extract aggregated review scores (0.00 – 5.00) and review counts to benchmark customer sentiment against competitors.
- 🎁 **Loyalty & Points Optimization**: Track Rakuten Super Points multipliers and rewards to analyze merchant promotional campaigns.
- 🏷️ **Hierarchical Genre & Tag Classification**: Map multi-tier category hierarchies (`genrePath`) and specific product attribute tags for deep market taxonomy.

***

### 🥊 Feature Comparison: Rakuten Scraper vs Alternatives

| Feature | Rakuten Scraper (This Actor) | Official Rakuten Ichiba API | Generic DOM Scrapers | Manual Browsing |
|---|---|---|---|---|
| **API Approval Required** | ❌ No API key or application needed | ⚠️ Strict developer registration & quota | ❌ No | ⚠️ Account required |
| **Setup Time** | ⚡ Instant (1 click) | 🕒 Days / Business approval | 🔧 Hours of selector writing | 🐌 Days of manual copy-paste |
| **Full Data Structure** | 🟢 Complete (points, reviews, shipping, tags) | 🟡 Fragmented across endpoints | 🔴 Broken by layout updates | 🔴 Low quality visual notes |
| **Free Shipping Detection** | 🟢 Automatic (`isFreeShipping`, `shippingFee`) | 🟡 Nested attribute objects | 🔴 Unreliable text matching | 🔴 Manual check |
| **Deep 1,000+ Pagination** | 🟢 Automatic cursor traversal | 🟡 Strict rate & item limits | 🔴 IP blocked after page 2 | 🔴 Single page only |
| **Multi-Keyword Concurrency** | 🟢 Up to 8 concurrent feeds | 🟡 Sequential quota limits | 🔴 Thread blocking | 🔴 Single thread |

***

### 📊 Extracted Data Fields

Every scraped product is structured into normalized, strongly-typed JSON records:

#### 🏷️ Product Identification & Catalog

| Field | Type | Description | Coverage |
|---|---|---|---|
| `itemCode` | String | Unique Rakuten product code (natural primary key) | 🟢 High (100%) |
| `title` | String | Full Japanese product title | 🟢 High (100%) |
| `subtitle` | String | Marketing tagline or promotional subhead | 🟡 Conditional (~70%) |
| `url` | String | Direct canonical URL to the product page on `item.rakuten.co.jp` | 🟢 High (100%) |
| `productUrl` | String | Universal Rakuten catalog product page URL (when mapped) | 🟡 Conditional (~45%) |
| `inStock` | Boolean | `true` if currently available for purchase, `false` if sold out | 🟢 High (100%) |
| `searchTerm` | String | The search keyword that returned this product | 🟢 High (100%) |

#### 💰 Pricing, Points & Shipping

| Field | Type | Description | Coverage |
|---|---|---|---|
| `price` | Number | Product selling price in Japanese Yen (JPY) | 🟢 High (100%) |
| `currency` | String | Currency denomination (always `JPY`) | 🟢 High (100%) |
| `points` | Integer | Rakuten Super Points awarded on purchase | 🟢 High (98%) |
| `shippingFee` | Number | Exact shipping fee in JPY (`0` = free shipping) | 🟢 High (95%) |
| `isFreeShipping` | Boolean | `true` if free delivery is offered | 🟢 High (100%) |
| `shippingText` | String | Human-readable Japanese delivery timeline estimate | 🟢 High (90%) |

#### ⭐ Reviews & Merchant Store Metrics

| Field | Type | Description | Coverage |
|---|---|---|---|
| `rating` | Number | Average customer review rating (scale 0.00 – 5.00) | 🟡 Conditional (~75%) |
| `reviewCount` | Integer | Total count of submitted customer reviews | 🟡 Conditional (~75%) |
| `reviewUrl` | String | Direct URL to public customer review page | 🟡 Conditional (~75%) |
| `shopName` | String | Display name of the selling merchant | 🟢 High (100%) |
| `shopCode` | String | Merchant URL slug identifier | 🟢 High (100%) |
| `shopUrl` | String | Direct link to merchant's Rakuten storefront | 🟢 High (100%) |

#### 🗂️ Categories, Attributes & Images

| Field | Type | Description | Coverage |
|---|---|---|---|
| `genre` | String | Deepest leaf category name (e.g., `スマートフォン本体`) | 🟢 High (100%) |
| `genrePath` | String | Breadcrumb hierarchy path (e.g., `家電 > スマホ > 本体`) | 🟢 High (100%) |
| `genreId` | String | Numerical Rakuten genre taxonomy path ID | 🟢 High (100%) |
| `tags` | Array | Array of product tags (color, memory, specs, condition) | 🟢 High (95%) |
| `isUsed` | Boolean | `true` if explicitly marked as second-hand/used | 🟢 High (100%) |
| `isSuperDeal` | Boolean | `true` if featured in Rakuten SuperDeal promotion | 🟢 High (100%) |
| `imageUrl` | String | High-resolution primary product image URL | 🟢 High (100%) |
| `images` | Array | Full collection of product photo URLs | 🟢 High (100%) |
| `scrapedAt` | String | ISO 8601 timestamp of extraction | 🟢 High (100%) |

***

### 🗂️ Major Rakuten Product Genres & Categories

Rakuten Ichiba structures inventory through comprehensive top-level genres. Use these genres to refine your searches:

| Genre Name | Japanese Name | Key Product Categories |
|---|---|---|
| **Consumer Electronics** | 家電・AV・PC | Smartphones, laptops, 4K TVs, cameras, kitchen appliances |
| **Fashion & Apparel** | レディース・メンズ ファッション | Coats, sneakers, luxury watches, streetwear, bags |
| **Home & Living** | インテリア・寝具・収納 | Bedding, furniture, lighting, storage solutions, kitchenware |
| **Food & Beverage** | 食品・スイーツ・お酒 | Japanese gourmet foods, regional sweets, sake, green tea |
| **Beauty & Cosmetics** | 美容・コスメ・香水 | Skincare, cosmetics, hair care, health supplements |
| **Sports & Outdoor** | スポーツ・アウトドア | Camping gear, golf clubs, running shoes, fishing equipment |

***

### ⚙️ Input Configuration

Rakuten Scraper provides flexible parameters to configure keyword searches, price filtering, and pagination depth:

| Parameter | Type | Default | Description |
|---|---|---|---|
| `searchTerms` | Array of Strings | `["iphone"]` | Japanese or English keywords (e.g. `["ワイヤレスイヤホン", "nintendo switch"]`). |
| `startUrls` | Array of Objects | `[]` | Direct `search.rakuten.co.jp` listing URLs with custom facets applied. Overrides keywords. |
| `maxItems` | Integer | `0` (unlimited) | Total unique products to collect. Prefill is `100` for rapid testing. |
| `maxPages` | Integer | `0` (unlimited) | Result pages per query (45 products/page). Set to `0` for unconstrained pagination. |
| `sort` | String (Select) | `"standard"` | Sort order: `standard`, `priceAsc`, `priceDesc`, `newest`, or `reviewCount`. |
| `minPrice` | Integer | `0` (none) | Minimum product price in Japanese Yen. |
| `maxPrice` | Integer | `0` (none) | Maximum product price in Japanese Yen. |
| `availableOnly` | Boolean | `false` | When `true`, automatically discards sold-out products. |
| `maxConcurrency` | Integer | `3` | Parallel search workers (1–8) for rapid multi-keyword scraping. |
| `proxyConfiguration` | Object | Datacenter | Apify Proxy configuration. Datacenter proxies work reliably and inexpensively. |

#### Example Input: Multi-Product Market Research

```json
{
  "searchTerms": [
    "ワイヤレスイヤホン ノイズキャンセリング",
    "スマートウォッチ 防水"
  ],
  "sort": "reviewCount",
  "minPrice": 3000,
  "maxPrice": 35000,
  "availableOnly": true,
  "maxItems": 300,
  "maxPages": 0,
  "maxConcurrency": 3,
  "proxyConfiguration": { "useApifyProxy": true }
}
```

#### Example Input: Direct Category URL

```json
{
  "startUrls": [
    { "url": "https://search.rakuten.co.jp/search/mall/dyson/?s=2&min=20000" }
  ],
  "maxItems": 200,
  "maxPages": 0,
  "proxyConfiguration": { "useApifyProxy": true }
}
```

***

### 📦 Sample Output

```json
{
  "itemCode": "10120704",
  "title": "未使用〜中古 iPhone16 Pro 128GB/256GB/512GB/1TB SIMフリー",
  "subtitle": "iPhone16 Pro/中古/本体/スマホ/最大1年間保証/送料無料",
  "price": 116800,
  "currency": "JPY",
  "inStock": true,
  "url": "https://item.rakuten.co.jp/dai-one/16pr-128-s/",
  "productUrl": "https://product.rakuten.co.jp/product/-/828cc5c1c90bd6816316ad1a8e6a2842/",
  "shopName": "ダイワンテレコム楽天市場店",
  "shopCode": "dai-one",
  "shopUrl": "https://www.rakuten.co.jp/dai-one/",
  "rating": 4.78,
  "reviewCount": 93,
  "reviewUrl": "https://review.rakuten.co.jp/item/1/281834_10120704/1.1/",
  "points": 1061,
  "shippingFee": 0,
  "isFreeShipping": true,
  "shippingText": "13:00までの注文で最短翌日お届け",
  "genre": "スマートフォン本体",
  "genrePath": "スマートフォン・タブレット > スマートフォン本体",
  "genreId": "/0/564500/560202",
  "tags": [
    "SIMフリー",
    "iPhone 16 Pro",
    "128GB",
    "中古",
    "SIMロック解除済"
  ],
  "isUsed": true,
  "isSuperDeal": false,
  "imageUrl": "https://thumbnail.image.rakuten.co.jp/@0_mall/dai-one/cabinet/sku_top/iphone16pro.jpg",
  "images": [
    "https://thumbnail.image.rakuten.co.jp/@0_mall/dai-one/cabinet/sku_top/iphone16pro.jpg"
  ],
  "searchTerm": "iphone",
  "scrapedAt": "2026-11-10T14:46:12.335Z"
}
```

***

### 💼 Step-by-Step Practical Workflow

#### Step 1: Formulate Keywords or Source URLs

Define whether you are tracking brand names (`"sony"`, `"apple"`, `"dyson"`) or category terms. Searching with native Japanese terms (`"ポータブル電源"`, `"空気清浄機"`) unlocks maximum inventory coverage across domestic merchants.

#### Step 2: Set Sorting & Availability Filters

- Set `sort: "reviewCount"` if you want to discover the most established and trusted items in the category.
- Set `sort: "priceAsc"` to identify entry-level pricing and budget alternatives.
- Enable `availableOnly: true` if you are populating live inventory feeds to prevent scraping sold-out products.

#### Step 3: Launch Run & Stream Items

Click **Start**. Rakuten Scraper immediately begins parallel workers, streaming search pages and extracting product objects. Live progress logs show total products captured.

#### Step 4: Export to Excel, BI, or Webhooks

Download your consolidated dataset directly as CSV, Excel (`.xlsx`), or JSON. Connect via webhooks or API to integrate Rakuten prices directly into your dynamic repricer or Google Sheets.

***

### 💼 High-Impact Business Applications

#### 1. Competitive Dynamic Repricing

Stay ahead of rival merchants by tracking daily price fluctuations, shipping fee adjustments, and Rakuten Super Points promotions across competitive listings.

#### 2. Sourcing & Japanese Dropshipping Verification

Identify top-selling products by sorting by `reviewCount`. Shortlist highly rated suppliers (`rating > 4.50`) offering free shipping (`isFreeShipping: true`) for wholesale or dropshipping fulfillment.

#### 3. Market Entry & Category Sizing

Analyze product distributions across price brackets (`minPrice` to `maxPrice`). Quantify total reachable inventory, identify dominant brand tags, and assess market saturation before expanding into Japan.

#### 4. Brand Protection & Authorized Merchant Auditing

Monitor which third-party merchants are retailing your branded goods on Rakuten Ichiba. Detect unauthorized discount sellers or MAP violations across thousands of independent store operators.

***

### 💡 Practical Keyword Reference for Japanese Sourcing

Using localized Japanese terms delivers significantly higher product counts:

| Category | English Keyword | Japanese Search Term |
|---|---|---|
| **Electronics** | Noise-cancelling earphones | `ワイヤレスイヤホン ノイズキャンセリング` |
| **Home Appliances** | Robot vacuum cleaner | `ロボット掃除機 水拭き` |
| **Outdoor & Camping** | Portable power station | `ポータブル電源 大容量` |
| **Kitchenware** | Induction rice cooker | `炊飯器 圧力IH` |
| **Health & Beauty** | Hair dryer | `ヘアドライヤー 大風量` |
| **Fashion** | Men's down jacket | `ダウンジャケット メンズ 防水` |

***

### 🔗 Exporting & Microservice Integration

Automate your Rakuten data pipelines using Apify's API and client SDKs:

- **Apify API (cURL)**:
  ```bash
  curl -X GET "https://api.apify.com/v2/datasets/{DATASET_ID}/items?format=json&clean=true"
  ```
- **Python Integration**:
  ```python
  from apify_client import ApifyClient
  import pandas as pd

  client = ApifyClient("YOUR_APIFY_TOKEN")
  run = client.actor("haketa/rakuten-scraper").call(run_input={
      "searchTerms": ["空気清浄機 加湿"],
      "sort": "reviewCount",
      "maxItems": 200
  })

  items = list(client.dataset(run["defaultDatasetId"]).iterate_items())
  df = pd.DataFrame(items)
  print(f"Captured {len(df)} products. Top reviewed: {df.iloc[0]['title']}")
  ```
- **Node.js Automated Pipeline**:
  ```javascript
  import { ApifyClient } from 'apify-client';

  const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
  const run = await client.actor('haketa/rakuten-scraper').call({
      searchTerms: ['anker charger'],
      maxItems: 150,
  });
  const { items } = await client.dataset(run.defaultDatasetId).listItems();
  console.log(`Retrieved ${items.length} items from Rakuten Ichiba`);
  ```
- **Automated Webhooks**:
  Set up webhooks to automatically export newly scraped products to your PostgreSQL database, Airtable base, or BigQuery warehouse.

***

### ❓ Frequently Asked Questions

##### Do I need a Rakuten merchant account or developer API token?

No. Rakuten Scraper collects data directly from public Rakuten Ichiba search results without requiring any login credentials, session cookies, or official developer portal approval.

##### How does deep pagination work?

Rakuten renders approximately 45 products per search page. When `maxPages` is set to `0`, the actor crawls subsequent pages sequentially until your desired `maxItems` target is fulfilled or all reachable results are collected.

##### Do I need Japanese residential proxies?

No. Rakuten does not enforce aggressive geoblocks on its catalog search pages. Standard Apify datacenter proxies provide fast, reliable, and cost-effective connectivity.

##### Can I scrape used or second-hand products?

Yes. Rakuten offers both brand-new and pre-owned goods. The scraper extracts an `isUsed` boolean flag so you can easily filter between new and refurbished inventory.

##### How are duplicate products handled across multiple keywords?

The actor uses Rakuten's internal `itemCode` as a unique primary key, deduplicating products in real time during the run to ensure your exported dataset contains 0 duplicates.

##### What currency are prices returned in?

All prices are returned as integers in Japanese Yen (`JPY`, ¥), reflecting the exact listed checkout price on Rakuten Ichiba.

##### What does the `points` field represent?

The `points` field records the base Rakuten Super Points awarded to a buyer for purchasing the item (typically 1 point = 1 JPY value in the Rakuten loyalty ecosystem).

##### Can I schedule recurring daily price audits?

Yes. You can use Apify's built-in Scheduler to run Rakuten Scraper daily or weekly, feeding updated prices directly into your analytics data store.

##### Does the scraper capture estimated delivery timeframes?

Yes. The `shippingText` field captures localized Japanese delivery estimates (e.g., *"13:00までの注文で最短翌日お届け"* — order by 13:00 for next-day delivery).

##### How can I distinguish between Rakuten Ichiba marketplace merchants and official brand stores?

Many official flagship stores on Rakuten (e.g. Dyson Official, Apple authorized dealers) have distinct shop names (`shopName`) and verify their warranty coverage in product titles. All merchant details and direct storefront links (`shopUrl`) are preserved in every record.

##### Can I export product data directly to Amazon or Shopify catalog formats?

Yes. You can export Rakuten datasets as CSV or JSON and use field mapping scripts to format attributes, pricing in JPY, and image URLs directly for import into e-commerce store backends.

***

### 📋 Changelog

#### v1.2 — 2026-11

- **Deep Pagination Unlocked**: Removed restrictive 150-page cap; unlocked `maxPages: 0` for unconstrained pagination up to 1,000+ items.
- **Fast Prefill Optimization**: Configured rapid prefill defaults for sub-minute test runs.
- **Input & Output Schema Refinements**: Added standardized descriptions, output viewer URLs, and streamlined validation rules.
- **Enhanced Data Extraction**: Improved parsing of balanced JSON structures for reliable catalog attribute collection.

#### v1.1 — 2026-11

- Added support for Rakuten SuperDeal indicator (`isSuperDeal`).
- Added full product tag array parsing (`tags`).
- Added filtering by price range (`minPrice` and `maxPrice`).

#### v1.0 — 2026-11

- Initial production release for Rakuten Ichiba (楽天市場) marketplace scraping.
- Support for keywords, direct search URLs, and review metrics.
- High-throughput pure HTTP extraction without browser overhead.

# Changelog

This Actor's version history is a separate document: https://apify.com/haketa/rakuten-scraper/changelog.md

# Actor input Schema

## `searchTerms` (type: `array`):

Keywords to search on Rakuten Ichiba (Japanese or English, e.g., 'iphone', 'nintendo switch', 'ワイヤレスイヤホン').

## `startUrls` (type: `array`):

Paste direct search.rakuten.co.jp result URLs to scrape specific filtered categories or custom search queries.

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

Total unique products to collect across all searches. Set to 0 for unlimited (governed by maxPages or total reachable results). Prefill is 100 for fast runs.

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

How many result pages to crawl per keyword/URL (45 products per page). Set to 0 for unlimited pagination (governed by maxItems).

## `sort` (type: `string`):

Ordering of products on Rakuten: Standard, Price low-to-high, Price high-to-low, Newest, or Most reviewed.

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

Optional lower price threshold in Japanese Yen (JPY).

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

Optional upper price threshold in Japanese Yen (JPY).

## `availableOnly` (type: `boolean`):

Filter out sold-out items to keep only products currently in stock.

## `maxConcurrency` (type: `integer`):

How many search feeds to process in parallel.

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

Apify Proxy configuration. Datacenter proxies are fully supported.

## Actor input object example

```json
{
  "searchTerms": [
    "iphone"
  ],
  "startUrls": [],
  "maxItems": 100,
  "maxPages": 0,
  "sort": "standard",
  "availableOnly": false,
  "maxConcurrency": 3,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

Direct JSON endpoint containing all scraped Rakuten Ichiba products, prices, and reviews

## `datasetUi` (type: `string`):

Interactive dataset viewer and export UI for CSV, JSON, and Excel formats

## `output` (type: `string`):

Execution summary containing total products scraped and search queries processed

# 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 = {
    "searchTerms": [
        "iphone"
    ],
    "startUrls": [],
    "maxItems": 100,
    "maxPages": 0
};

// Run the Actor and wait for it to finish
const run = await client.actor("haketa/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 = {
    "searchTerms": ["iphone"],
    "startUrls": [],
    "maxItems": 100,
    "maxPages": 0,
}

# Run the Actor and wait for it to finish
run = client.actor("haketa/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 '{
  "searchTerms": [
    "iphone"
  ],
  "startUrls": [],
  "maxItems": 100,
  "maxPages": 0
}' |
apify call haketa/rakuten-scraper --silent --output-dataset

```

## MCP server setup

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