# Hareruya MTG Scraper - Magic Singles & Prices (`lulzasaur/hareruyamtg-scraper`) Actor

Scrape Hareruya (hareruyamtg.com), a major Japanese Magic: The Gathering singles retailer. Search cards by name for set, rarity, condition (NM/SP/MP/HP), foil, language, price in JPY, stock, image and product URL from the English site via its JSON search API.

- **URL**: https://apify.com/lulzasaur/hareruyamtg-scraper.md
- **Developed by:** [lulz bot](https://apify.com/lulzasaur) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.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.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Hareruya MTG Scraper

Scrape **[Hareruya](https://www.hareruyamtg.com/en/)** (hareruyamtg.com) — one of the largest Japanese Magic: The Gathering singles retailers — from its English-language site. Search cards by name and get structured pricing, condition, stock, foil, language and rarity data for every printing.

### What it does

Given a list of card names, this Actor queries Hareruya's fast JSON search API and returns one record per listing (each set/condition/language/foil combination is its own listing).

### Input

| Field | Type | Description |
|-------|------|-------------|
| `searchQueries` | array of strings | Card names to search (e.g. `["ragavan", "lightning bolt"]`). |
| `maxListings` | integer | Max listings per query (0 = unlimited). Default `100`. |
| `minPrice` | integer | Only return listings at or above this JPY price. Default `1`. |
| `proxyConfiguration` | object | Optional proxy. Usually not needed. |

#### Example

```json
{
    "searchQueries": ["ragavan"],
    "maxListings": 100,
    "minPrice": 1
}
```

### Output

Each dataset item looks like:

```json
{
    "productId": "98154",
    "cardName": "Ragavan, Nimble Pilferer",
    "productName": "《Ragavan, Nimble Pilferer》[MH2]",
    "productNameJa": "(138)《敏捷なこそ泥、ラガバン/Ragavan, Nimble Pilferer》[MH2] 赤R",
    "setCode": "MH2",
    "rarityCode": "R",
    "rarity": "Rare",
    "foil": false,
    "languageCode": 1,
    "language": "Japanese",
    "conditionCode": 1,
    "condition": "NM",
    "priceJpy": 6000,
    "currency": "JPY",
    "stock": 552,
    "inStock": true,
    "onSale": false,
    "weeklySales": 22,
    "imageUrl": "https://files.hareruyamtg.com/img/goods/L/MH2/JP/00138.jpg",
    "url": "https://www.hareruyamtg.com/en/products/detail/98154",
    "searchQuery": "ragavan",
    "source": "hareruyamtg.com",
    "scrapedAt": "2026-07-09T00:00:00.000Z"
}
```

#### Field notes

- **condition**: `NM` (Near Mint), `SP` (Slightly Played), `MP` (Moderately Played), `HP` (Heavily Played), `DMG` (Damaged).
- **language**: Japanese, English, and other MTG print languages where available.
- **priceJpy**: price in Japanese Yen.
- **rarity**: derived from the card listing (`Common`, `Uncommon`, `Rare`, `Mythic Rare`, etc.).

### Use cases

- Track Japanese-market MTG singles prices for arbitrage vs. TCGplayer / Card Kingdom / Cardmarket.
- Monitor stock and condition availability for hard-to-find printings.
- Build price datasets for collectors, resellers and Discord price bots.

### Pricing

This Actor uses the pay-per-result model. You are charged a small fee per dataset item returned.

# Actor input Schema

## `searchQueries` (type: `array`):

Card names to search on Hareruya (e.g. 'ragavan', 'lightning bolt', 'sol ring'). Each query returns the matching Magic: The Gathering singles with prices, conditions and stock.

## `maxListings` (type: `integer`):

Maximum number of card listings to return per search query (0 = unlimited). Hareruya returns 60 listings per API page.

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

Only return listings priced at or above this amount in JPY. Default 1 excludes zero-priced/unavailable placeholder rows.

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

Proxy settings. Hareruya's JSON search API responds directly and usually works without a proxy; enable Apify Proxy only if you hit rate limits.

## Actor input object example

```json
{
  "searchQueries": [
    "ragavan"
  ],
  "maxListings": 100,
  "minPrice": 1,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `results` (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 = {
    "searchQueries": [
        "ragavan"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("lulzasaur/hareruyamtg-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 = { "searchQueries": ["ragavan"] }

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

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

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

```

## CLI example

```bash
echo '{
  "searchQueries": [
    "ragavan"
  ]
}' |
apify call lulzasaur/hareruyamtg-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=lulzasaur/hareruyamtg-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

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