# Keirin (Japan Track Cycling) — Race Cards, Results & Payouts (`jpmarketdata/keirin-race-checker`) Actor

Japanese keirin (track cycling) as clean English JSON: race cards with rating points, riding style, S/B and winning-move counts, gear ratio, plus finish order, kimarite and every payout pool. No login, one call per race. From $0.02 — no subscription. 競輪の出走表・結果・払戻を1コールで。

- **URL**: https://apify.com/jpmarketdata/keirin-race-checker.md
- **Developed by:** [h ichi](https://apify.com/jpmarketdata) (community)
- **Categories:** Other, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 race analyzeds

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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use 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

## Keirin (Japan Track Cycling) — Race Cards, Results & Payouts

Structured, English-normalized data for **keirin** — Japan's public-gambling track cycling, racing nearly 365 days a year across **43 velodromes** with roughly ¥1 trillion in annual betting turnover. Data comes on demand from the public [netkeirin](https://keirin.netkeiba.com) pages (no login; `robots.txt` allows all). One call per race returns:

- **Race card** — every rider (fields are 7 or 9 strong depending on the meeting) with **rating points** (競走得点), riding **style** (nige / makuri / oikomi), **S and B counts**, **winning-move counts** (nige / makuri / sashi / mark), finish-position counts (1st / 2nd / 3rd / unplaced), **win, top-2 and top-3 rates**, **gear ratio**, prefecture, age, class (S1/S2/A1…), graduating class, and the rider's own pre-race **comment**
- **Result** (once the race is official) — finish order with **bracket and car number** (they are *not* the same in keirin), margin, **last-lap time**, the winning move (**kimarite**), S/B flags, and **every payout pool** with popularity rank: quinella, exacta, wide, trio, trifecta — plus bracket quinella/exacta when the meeting offers them
- Race metadata — grade (GI/GII/GIII/FI/FII), event title, race name, start and betting-close time, distance, laps, and the velodrome's **bank length and home straight**

### Why this exists

The official keirin.jp portal **disallows crawling of its race pages**, and there is no free public API for keirin cards or payouts (the one paid voting API was withdrawn in 2024). This actor is the on-demand structured view of the public netkeirin pages: race-day cards and same-day results, in one call, with English field names. Nothing is stored between runs.

Built for **betting-model developers, data scientists and analytics tools** — keirin is one of the most feature-rich Japanese racing datasets, and every column a keirin model normally starts from is in the card.

### Pricing — from $0.02 per race, no subscription

| Event | Price | When |
|---|---|---|
| Race summary (card + result + payouts) | $0.02 | Per race that returned data |
| Individual rider entry | $0.002 | Only if you enable **Include individual entries** |

A default run (1 race) costs **$0.02**. Races that do not exist (day off, shorter card, card not published yet) come back as `status: "no_data"` and are **never charged**.

### Input

| Field | Example | Notes |
|---|---|---|
| `velodrome` | `"35"` | **Required.** 2-digit velodrome code: 11=Hakodate … 35=Hiratsuka … 87=Kumamoto (pick from the dropdown) |
| `date` | `"20260630"` | Optional. Race day (YYYYMMDD or YYYY-MM-DD). **Leave it empty and the actor uses this velodrome's latest race day** |
| `races` | `[1]` | Race numbers 1-12; empty = the whole card |
| `includeResult` | `true` | Fetch result/payouts per race |
| `includeIndividualEntries` | `false` | Push each rider as its own record |

The 12-digit netkeirin `race_id` is simply `YYYYMMDD` + velodrome code + race number, so the actor never has to search for races.

**Latest race day (default)** — with `date` left empty the actor reads the velodrome's own schedule page: the meeting in progress if there is one, otherwise the most recent finished meeting, and takes the newest day that has a published card. That costs one extra request and keeps a saved input working forever, which a hard-coded date would not — netkeirin only keeps about a month of history.

### Output example (one race)

```json
{
  "type": "race_summary",
  "raceId": "202606303501",
  "date": "2026-06-30",
  "velodromeCode": 35,
  "velodrome": "Hiratsuka",
  "raceNumber": 1,
  "grade": "FI",
  "eventTitle": "HPCJC×ウィンチケット杯",
  "raceName": "A級 予選",
  "startTime": "15:51",
  "distanceM": 1625,
  "laps": 4,
  "bankLengthM": 400.0,
  "homeStraightM": 54.2,
  "riders": 7,
  "status": "finished",
  "entries": [
    {"bracket": 1, "carNumber": 1, "playerId": 15893, "name": "岩辺陸",
     "prefecture": "静岡", "age": 21, "period": 127, "classGrade": "A2",
     "ratingPoints": 91.5, "style": "逃", "styleEn": "nige (front runner)",
     "sCount": 7, "bCount": 9,
     "winningMoves": {"nige": 3, "makuri": 8, "sashi": 2, "mark": 3},
     "finishCounts": {"first": 8, "second": 8, "third": 4, "unplaced": 4},
     "winPct": 33.3, "top2Pct": 66.6, "top3Pct": 83.3,
     "gearRatio": 3.92, "comment": "自力で。"}
  ],
  "result": {
    "placings": [
      {"position": 1, "bracket": 4, "carNumber": 4, "playerId": 15548,
       "name": "白井優太朗", "margin": null, "lastLapSeconds": 11.4,
       "kimarite": "捲", "kimariteEn": "makuri (outside sweep)",
       "tookS": false, "tookB": false}
    ],
    "payouts": [
      {"betType": "quinella", "betTypeJa": "2車複", "combination": "3-4",
       "payoutJpy": 7500, "popularity": 15},
      {"betType": "trifecta", "betTypeJa": "3連単", "combination": "4>3>1",
       "payoutJpy": 20090, "popularity": 54}
    ]
  }
}
````

### Use cases

- **Prediction models** — pull the full feature set (rating points, style, winning-move mix, gear ratio) before the race and the result after, without scraping a disallowed site
- **Payout research** — trifecta / trio payout distributions per velodrome, bank length or grade in a handful of calls
- **Dashboards & bots** — same-day results with kimarite and last-lap times, as JSON

### Notes & limits

- A field is **7 or 9 riders** depending on the meeting, and the **bracket number is not the car number** — both are returned separately
- Bet types vary by meeting (bracket pools only appear in 9-rider fields), so every payout row is returned rather than a fixed list
- `status` is `finished` (card + result), `not_run_yet` (asked for the result, race not official yet), `result_not_requested` (`includeResult` was off) or `no_data` (no such race — free)
- If the result page itself fails, the race card is still returned and `resultError` carries the reason — you never lose a card you paid for
- Odds pages are not server-rendered and are out of scope for v1
- Read-only and throttled (~1 request / 1.5 s). No login, no personal data beyond the public rider register, nothing stored between runs

***

### 日本語ガイド

**競輪(netkeirin)の出走表・結果・全賭式払戻を1コールで構造化JSONにして返す Actor です。**

- **概要**: レース単位で、出走表(7車立て/9車立て可変。競走得点・脚質・S/B・決まり手別回数・着別度数・勝率/2連対率/3連対率・ギヤ倍数・府県/年齢/期別/級班・選手コメント)と、確定後は着順(枠番と車番を別々に・着差・上り・決まり手・S/B)と全賭式の払戻(人気順位付き)を英語フィールド名で返します。
- **使い方**: 必須は `velodrome`(2桁の競輪場コード。35=平塚、45=豊橋 など全43場をプルダウンから選択)だけです。`races` を空にするとその日の全レースを取得します。
- **開催日の自動解決**: `date` は**省略可**です。空(または `auto`)にすると、その競輪場の**最新開催日**(開催中ならその節、節間なら直近に終了した節)を日程ページから自動で解決します(追加リクエスト1回)。netkeirin の履歴保持は約1ヶ月のため、固定日付を保存しておくといずれ取得できなくなります。特定の日を指定したいときだけ `date`(YYYYMMDD)を入れてください。
- **料金**: レースサマリー1件 $0.02。個別選手レコードが必要な場合のみ `includeIndividualEntries` を ON(+$0.002/車)。**開催のない日・存在しないレース番号は `no_data` として返り、課金されません。** サブスクリプション不要です。
- **status の値**: `finished`(結果まで確定)/ `not_run_yet`(結果を要求したが未確定)/ `result_not_requested`(`includeResult` が OFF)/ `no_data`(該当レースなし・無課金)。結果ページだけ失敗した場合も出走表は返り、理由が `resultError` に入ります。
- **注意**: 公式 keirin.jp は robots.txt でレースページのクロールを禁じているため一切アクセスしません。オッズは非SSRのため v1 対象外です。

# Actor input Schema

## `date` (type: `string`):

Race day in YYYYMMDD or YYYY-MM-DD form. Leave empty (or type auto) to use this velodrome's latest race day — the meeting in progress, or its most recent one if it is between meetings. Each velodrome only races on some days, so an explicit date must be one on which it was racing. Past dates work for as long as netkeirin keeps them (about a month).

## `velodrome` (type: `string`):

Which of the 43 keirin velodromes to fetch, by its netkeirin 2-digit code.

## `races` (type: `array`):

Which races (1-12) to fetch. Leave empty for the whole card of the day. Each race that returns data costs $0.02; races that do not exist are reported as no\_data and cost nothing.

## `includeResult` (type: `boolean`):

Also fetch the result page per race (finish order, margins, last-lap time, kimarite, every payout pool). Races that have not been declared official yet simply report not\_run\_yet.

## `includeIndividualEntries` (type: `boolean`):

Off by default: a run costs a flat $0.02 per race summary. Enable to also push each rider entry as its own record at +$0.002 per entry.

## Actor input object example

```json
{
  "velodrome": "35",
  "races": [
    1
  ],
  "includeResult": true,
  "includeIndividualEntries": false
}
```

# 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 = {
    "velodrome": "35",
    "races": [
        1
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("jpmarketdata/keirin-race-checker").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 = {
    "velodrome": "35",
    "races": [1],
}

# Run the Actor and wait for it to finish
run = client.actor("jpmarketdata/keirin-race-checker").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 '{
  "velodrome": "35",
  "races": [
    1
  ]
}' |
apify call jpmarketdata/keirin-race-checker --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Keirin (Japan Track Cycling) — Race Cards, Results & Payouts",
        "description": "Japanese keirin (track cycling) as clean English JSON: race cards with rating points, riding style, S/B and winning-move counts, gear ratio, plus finish order, kimarite and every payout pool. No login, one call per race. From $0.02 — no subscription. 競輪の出走表・結果・払戻を1コールで。",
        "version": "0.1",
        "x-build-id": "b4geqrkc5LTgSoFm8"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/jpmarketdata~keirin-race-checker/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-jpmarketdata-keirin-race-checker",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/jpmarketdata~keirin-race-checker/runs": {
            "post": {
                "operationId": "runs-sync-jpmarketdata-keirin-race-checker",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/jpmarketdata~keirin-race-checker/run-sync": {
            "post": {
                "operationId": "run-sync-jpmarketdata-keirin-race-checker",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "velodrome"
                ],
                "properties": {
                    "date": {
                        "title": "Race date (optional)",
                        "type": "string",
                        "description": "Race day in YYYYMMDD or YYYY-MM-DD form. Leave empty (or type auto) to use this velodrome's latest race day — the meeting in progress, or its most recent one if it is between meetings. Each velodrome only races on some days, so an explicit date must be one on which it was racing. Past dates work for as long as netkeirin keeps them (about a month)."
                    },
                    "velodrome": {
                        "title": "Velodrome",
                        "enum": [
                            "11",
                            "12",
                            "13",
                            "21",
                            "22",
                            "23",
                            "24",
                            "25",
                            "26",
                            "27",
                            "28",
                            "31",
                            "32",
                            "34",
                            "35",
                            "36",
                            "37",
                            "38",
                            "42",
                            "43",
                            "44",
                            "45",
                            "46",
                            "47",
                            "48",
                            "51",
                            "53",
                            "54",
                            "55",
                            "56",
                            "61",
                            "62",
                            "63",
                            "71",
                            "73",
                            "74",
                            "75",
                            "81",
                            "83",
                            "84",
                            "85",
                            "86",
                            "87"
                        ],
                        "type": "string",
                        "description": "Which of the 43 keirin velodromes to fetch, by its netkeirin 2-digit code.",
                        "default": "35"
                    },
                    "races": {
                        "title": "Race numbers",
                        "type": "array",
                        "description": "Which races (1-12) to fetch. Leave empty for the whole card of the day. Each race that returns data costs $0.02; races that do not exist are reported as no_data and cost nothing."
                    },
                    "includeResult": {
                        "title": "Include result & payouts",
                        "type": "boolean",
                        "description": "Also fetch the result page per race (finish order, margins, last-lap time, kimarite, every payout pool). Races that have not been declared official yet simply report not_run_yet.",
                        "default": true
                    },
                    "includeIndividualEntries": {
                        "title": "Include individual entries",
                        "type": "boolean",
                        "description": "Off by default: a run costs a flat $0.02 per race summary. Enable to also push each rider entry as its own record at +$0.002 per entry.",
                        "default": false
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
