# rakuten.books_search

A page of Rakuten Books' search results: books, music, films, games and e-books with title, creators, release, publisher, price, stock and rating.

Rakuten Books search, one of the Rakuten scrapers.

| | |
| --- | --- |
| Id | `rakuten.books_search` |
| Version | 1 |
| Billed per | request — 1 unit for a charged run |
| Runs | within one request |

Start it with `POST /v1/scrapers/rakuten.books_search/runs`. How runs work is in [Running a scraper](https://docs.enrichednow.com/running-a-scraper.md); what a run costs is in [Usage and units](https://docs.enrichednow.com/usage-and-units.md).

## Inputs

The fields of `input`. A field that is not listed here is refused.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `keywords` | string | yes | What to search for, in Japanese or in Latin letters: a title, an author, an artist, an ISBN (`python`, `鬼滅の刃`, `宇多田ヒカル`). Limit: at least 1 characters, at most 100 characters. |
| `sort` | "recommended" \| "best_selling" \| "newest" \| "oldest" \| "price_low" \| "price_high" \| "most_reviews" \| "best_rated" | no | The order: the store's recommended order (default), best selling, newest or oldest release, cheapest or dearest, most reviewed, best rated. Default: `"recommended"`. |
| `page` | integer | no | Which page of results, from 1; 30 items a page. Limit: 1 to 100. Default: `1`. |

## Record fields

Every record of a run has these fields. A value that is not known is `null` — never an empty string and never `0`.

| Field | Type | Notes |
| --- | --- | --- |
| `position` | integer | The item's place in the results, from 1 across pages (30 a page). |
| `item_id` | string | The item's id: `rb:<number>` for an item sold by Rakuten Books, `rd:<number>` for a download (a game's or a service's code), `rk:<code>` for a Kobo e-book. `rakuten.book` takes it. |
| `url` | string | The item's page on books.rakuten.co.jp. |
| `title` | string | The title as the store writes it, with the series in brackets where it gives one. |
| `kind` | string or null | What it is, as the card labels it: `本` (book), `CD`, `DVD`, `ブルーレイ`, `電子` (a Kobo e-book), `ゲーム`, ... |
| `creators` | array of string | The authors, artists or makers the card names, in its order. |
| `codes` | string or null | The codes the card prints, as printed: `ISBN：9784815630614`, or a JAN and a catalogue number (`JAN：4547366664386 \| ESCL-5928/9`). |
| `series` | string or null | The series the card names (シリーズ名). |
| `release` | string or null | When it was or will be released, as the card writes it, e.g. `2026年04月01日頃発売` (about 1 April 2026). |
| `release_date` | string (date) or null | The day of `release`, when it names one. |
| `publisher` | string or null | The publisher or label the card names. |
| `format` | string or null | The format the card names, in Japanese: `単行本` (a book), `文庫` (a pocket book), ... |
| `price` | integer or null | The price in yen, tax included. 0 for a free e-book. |
| `list_price` | integer or null | The maker's suggested price, struck through, when the card shows a reduction. |
| `currency` | string | Always `JPY`. Default: `"JPY"`. |
| `free_shipping` | boolean | True when the card says delivery is free (送料無料). |
| `availability` | string or null | What the card says of stock, in Japanese: `在庫あり` (in stock), `予約受付中` (taking pre-orders), `ご注文できない商品*` (cannot be ordered), ... |
| `rating` | number or null | The average of its reviews, out of 5; null for an item without reviews. |
| `review_count` | integer or null | How many reviews it has. |
| `image` | string or null | The cover's picture. |
| `total_results` | integer or null | How many results the store says the search has, the same on every record. |
| `fetched_at` | string (date-time) | When the store answered, in UTC. |

## Example request

It starts a run with this scraper's example input and waits up to 60 seconds for it. The key is read from `ENRICHEDNOW_API_KEY`.

```bash
curl -X POST "https://api.enrichednow.com/v1/scrapers/rakuten.books_search/runs?wait=60" \
  -H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":{"keywords":"python"}}'
```

## Example response

The run, once it has ended. A run that has not ended within `wait` comes back with `202` and the status `queued` or `running`.

```json
{
  "id": "run_841742f37553189ff9c27ba1",
  "scraper_id": "rakuten.books_search",
  "scraper_version": 1,
  "status": "ok",
  "reason": null,
  "input": {
    "keywords": "python"
  },
  "record_count": 1,
  "units": 1,
  "units_per_request": 1,
  "units_per_record": null,
  "units_per_page": null,
  "diagnostics": {
    "requests": 1,
    "bytes": 259214,
    "wall_ms": 885,
    "facts": {}
  },
  "created_at": "2026-11-16T22:37:50.170950Z",
  "started_at": "2026-11-16T22:37:50.178331Z",
  "finished_at": "2026-11-16T22:37:51.066313Z"
}
```

Its records, from `GET /v1/runs/{id}/records`. The record is a real one: this scraper's own parser read it from a page recorded from the site.

```json
{
  "records": [
    {
      "position": 1,
      "item_id": "rb:18513563",
      "url": "https://books.rakuten.co.jp/rb/18513563/",
      "title": "ひとつひとつしっかり身につく Pythonの教科書 （基礎から丁寧に学ぶ教科書シリーズ）",
      "kind": "本",
      "creators": [
        "菅原 朋子"
      ],
      "codes": "ISBN：9784815630614",
      "series": null,
      "release": "2026年04月01日頃発売",
      "release_date": "2026-04-01",
      "publisher": "SBクリエイティブ",
      "format": "単行本",
      "price": 3080,
      "list_price": null,
      "currency": "JPY",
      "free_shipping": true,
      "availability": "在庫あり",
      "rating": 4,
      "review_count": 1,
      "image": "https://tshop.r10s.jp/book/cabinet/0614/9784815630614_1_7.jpg?downsize=130:*",
      "total_results": 26367,
      "fetched_at": "2026-11-19T21:13:52.980938Z"
    }
  ],
  "next_cursor": null
}
```

A run does not always end `ok`. [Results and statuses](https://docs.enrichednow.com/results-and-statuses.md#reason-codes) lists every status and the reasons every scraper shares; [the reasons of the Rakuten scrapers](https://docs.enrichednow.com/results-and-statuses.md#rakuten) are in their own section there.
