# Rakuten Search API Documentation

<p><strong>Rakuten Search API Documentation</strong> Search Rakuten Ichiba, the largest online marketplace in Japan. Search by keyword, by genre, or both. Filter by price in JPY, minimum review score and availability, and sort by price, newest, review count or review score. Every item has the price as a number with currency JPY, the shop, review score and count, shipping fee, points, genre ids and an image. Each item carries an id, a shop_code and a manage_number that the item and reviews endpoints accept unchanged. Every returned item matches your price and rating filters. Sponsored rows are not returned. Rakuten lists up to 150 pages per search: a page beyond the end answers 422 and is never page 1 in disguise. The response also has the genre path, the sub genres with counts and related keywords. Images are resized to 800 pixels. Use the item endpoint for the full size photos. Cost: 1 credit per request. Empty results and failed requests are not billed.</p>

- **Documentation:** [https://scrappa.co/docs/rakuten-api/rakuten_search](https://scrappa.co/docs/rakuten-api/rakuten_search)
- **API group:** Rakuten API
- **Endpoint:** `GET https://scrappa.co/api/rakuten/search`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | string | No | Search keyword in Japanese or English, e.g. マスク. Send a query, a genre_id, or both. |
| `genre_id` | integer | No | Rakuten genre id, e.g. 568357. Take the ids from subgenres in a search result or from genre_ids of an item. |
| `min_price` | integer | No | Lowest price in JPY. Every returned item costs at least this much. |
| `max_price` | integer | No | Highest price in JPY. Every returned item costs at most this much. |
| `min_rating` | number | No | Lowest review score: 3, 3.5, 4, 4.5 or 5. Items without reviews are left out. |
| `sort` | string | No | Sort order: relevance (default), price_asc, price_desc, newest, review_count, review_score, price_shipping_asc or price_shipping_desc. |
| `page` | integer | No | Page number from 1. Rakuten shows up to 150 pages (45 items each) per search. A page beyond the end answers 422. |
| `include_sold_out` | boolean | No | Set to true to include sold out items. They are hidden by default. Each item has is_sold_out. |

## Example response

```json
{
    "data": {
        "items": [
            {
                "id": "386567_10000118",
                "url": "https://item.rakuten.co.jp/cicibella-sports/msk50-5/",
                "name": "\u9ad8\u8a55\u4fa1\uff3c\u5e74\u9593\u30e9\u30f3\u30ad\u30f3\u30b01\u4f4d\u53d7\u8cde\uff0f \u30de\u30b9\u30af \u30d0\u30a4\u30ab\u30e9\u30fc\u30de\u30b9\u30af \u4e0d\u7e54\u5e03\u30de\u30b9\u30af \u5927\u5bb9\u91cf51\u679a \u7acb\u4f53\u30de\u30b9\u30af 20\u679a 3D\u30de\u30b9\u30af ",
                "rank": 2,
                "shop": {
                    "id": 386567,
                    "url": "https://www.rakuten.co.jp/cicibella-sports/",
                    "code": "cicibella-sports",
                    "name": "cicibella sports"
                },
                "tags": [
                    {
                        "name": "\u30d9\u30fc\u30b8\u30e5",
                        "group": "\u30ab\u30e9\u30fc"
                    },
                    {
                        "name": "\u30d4\u30f3\u30af",
                        "group": "\u30ab\u30e9\u30fc"
                    }
                ],
                "image": "https://thumbnail.image.rakuten.co.jp/@0_mall/cicibella-sports/cabinet/08713654/msk50-5-nl.jpg?_ex=800x800",
                "price": 398,
                "images": [
                    "https://thumbnail.image.rakuten.co.jp/@0_mall/cicibella-sports/cabinet/08713654/msk50-5-nl.jpg?_ex=800x800"
                ],
                "points": {
                    "count": 6,
                    "base_multiplier": 1,
                    "item_multiplier": null,
                    "shop_multiplier": 2,
                    "campaign_multiplier": 1
                },
                "rating": {
                    "count": 168198,
                    "score": 4.51
                },
                "item_id": 10000118,
                "shop_id": 386567,
                "currency": "JPY",
                "genre_id": 402788,
                "shipping": {
                    "fee": 0,
                    "free": true,
                    "delivery_estimate": "12\u6642\u307e\u3067\u306e\u6ce8\u6587\u3067\u5f53\u65e5\u51fa\u8377"
                },
                "subtitle": "\u3010PFE / BFE / VFE 99%\u906e\u65ad\u3011\u3010\u30e1\u30ac\u30cd\u304c\u66c7\u308a\u306b\u304f\u3044\u3011\u3010\u8033\u304c\u75db\u304f\u306a\u3089\u306a\u3044\u3011 \u723d\u5feb\u9069 \u4e0d",
                "genre_ids": [
                    551169,
                    208264,
                    568357,
                    402788
                ],
                "shop_code": "cicibella-sports",
                "is_sold_out": false,
                "manage_number": "msk50-5",
                "price_is_from": false,
                "rank_genre_id": 568357
            }
        ],
        "filters": {
            "sort": "review_count",
            "query": "\u30de\u30b9\u30af"
        },
        "currency": "JPY",
        "subgenres": [
            {
                "id": 551169,
                "name": "\u533b\u85ac\u54c1\u30fb\u30b3\u30f3\u30bf\u30af\u30c8\u30fb\u4ecb\u8b77",
                "count": 222708
            },
            {
                "id": 100938,
                "name": "\u30c0\u30a4\u30a8\u30c3\u30c8\u30fb\u5065\u5eb7",
                "count": 22343
            }
        ],
        "genre_path": [],
        "pagination": {
            "page": 1,
            "has_next": true,
            "max_page": 150,
            "page_size": 45,
            "total_results": 1517471
        },
        "related_keywords": [
            "\u30de\u30b9\u30af \u4e0d\u7e54\u5e03"
        ]
    },
    "meta": {
        "credits": 1,
        "billable": true,
        "endpoint_family": "search"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A query parameter is missing or invalid. This response is not billable. |
| 422 | Invalid Request | The page is beyond the last page Rakuten shows, or the genre_id is unknown. This response is not billable. |
| 503 | Upstream Unavailable | Rakuten did not answer after the internal retries. This response is not billable. Retry after a few seconds. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
