プレイ記録の分析
const url = 'https://game.retrogather.com/rest/v1/getPlayAnalytics';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"sections":["summary"],"statuses":["PLANNED"],"platformIds":[1],"genreId":1,"title":"example","attributes":["example"],"consoleIds":["example"],"playStartDateFrom":"2026-04-15","playStartDateTo":"2026-04-15","playEndDateFrom":"2026-04-15","playEndDateTo":"2026-04-15","clearTargetDateFrom":"2026-04-15","clearTargetDateTo":"2026-04-15","clearTargetOverdue":"overdue","totalPlayTimeFrom":1,"totalPlayTimeTo":1,"ratingFrom":1,"ratingTo":1,"releaseYearFrom":1,"releaseYearTo":1,"playTimeTrendFrom":"2026-04-15","playTimeTrendTo":"2026-04-15","playTimeTrendGranularity":"day","includeHistory":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://game.retrogather.com/rest/v1/getPlayAnalytics \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "sections": [ "summary" ], "statuses": [ "PLANNED" ], "platformIds": [ 1 ], "genreId": 1, "title": "example", "attributes": [ "example" ], "consoleIds": [ "example" ], "playStartDateFrom": "2026-04-15", "playStartDateTo": "2026-04-15", "playEndDateFrom": "2026-04-15", "playEndDateTo": "2026-04-15", "clearTargetDateFrom": "2026-04-15", "clearTargetDateTo": "2026-04-15", "clearTargetOverdue": "overdue", "totalPlayTimeFrom": 1, "totalPlayTimeTo": 1, "ratingFrom": 1, "ratingTo": 1, "releaseYearFrom": 1, "releaseYearTo": 1, "playTimeTrendFrom": "2026-04-15", "playTimeTrendTo": "2026-04-15", "playTimeTrendGranularity": "day", "includeHistory": true }'Play analytics / プレイ記録の分析: stats for play records and play time. Default section is summary only. monthlyTrend.endedCount is status-agnostic; monthlyResults splits clears vs dropped. Attribute counts can exceed record counts. playTimeTrend reads PlayLog minutes for at most 90 JST days. Default uses the latest record per game. Filters match getPlayRecords.
Plans: FREE / LIGHT / PREMIUM. Scopes: play:read. FREE: not available: consoleIds, includeHistory (see x-rgg-plan-differences). LIGHT: not available: includeHistory (see x-rgg-plan-differences).
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”object
(LIGHT+: console)
Play statuses (OR)
Platform IDs (OR)
Genre ID from listGenres. A root ID matches the game’s genreId or genreSubId. A non-root ID matches titleKana using that genre’s taxonomy key.
Title, reading, or edition name
Attribute IDs or labels (AND)
Played console IDs (OR) (LIGHT+)
YYYY-MM-DD
YYYY-MM-DD
YYYY-MM-DD
YYYY-MM-DD
YYYY-MM-DD
YYYY-MM-DD
Overdue: unfinished (PLANNED/PLAYING/PAUSED) with clearTargetDate before today. COMPLETED/DROPPED are never overdue.
Total play time from (minutes)
Total play time to (minutes)
Minimum rating (1-5)
Maximum rating (1-5)
Release year from (inclusive). Analytics/export axis stays yearly.
Release year to (inclusive). Analytics/export axis stays yearly.
YYYY-MM-DD (JST), inclusive. playTimeTrend covers at most 90 days; default is the 90 days up to today.
YYYY-MM-DD (JST), inclusive.
True counts every play cycle instead of the latest record per game. (PREMIUM)
Responses
Section titled “ Responses ”Tool result JSON (no MCP envelope). Delete previews also return 200 with confirmToken.
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
Example
{ "code": "plan_required", "status": "PLANNED", "items": [ { "status": "added" } ]}Invalid_input (arguments, broken JSON body)
Entry errors (auth, routing, quota) use error; tool errors use code and message. Check retryable when present.
object
Examplegenerated
{ "error": "example", "code": "example", "message": "example", "retryable": true, "retryAfterSec": 1, "requestId": "example", "resetAt": "example", "remaining": 1, "scopes": [ "example" ], "upgradeUrl": "example"}Missing or invalid API key
Entry errors (auth, routing, quota) use error; tool errors use code and message. Check retryable when present.
object
Examplegenerated
{ "error": "example", "code": "example", "message": "example", "retryable": true, "retryAfterSec": 1, "requestId": "example", "resetAt": "example", "remaining": 1, "scopes": [ "example" ], "upgradeUrl": "example"}Insufficient_scope, plan_required, or access_suspended
Entry errors (auth, routing, quota) use error; tool errors use code and message. Check retryable when present.
object
Examplegenerated
{ "error": "example", "code": "example", "message": "example", "retryable": true, "retryAfterSec": 1, "requestId": "example", "resetAt": "example", "remaining": 1, "scopes": [ "example" ], "upgradeUrl": "example"}Target or tool not found
Entry errors (auth, routing, quota) use error; tool errors use code and message. Check retryable when present.
object
Examplegenerated
{ "error": "example", "code": "example", "message": "example", "retryable": true, "retryAfterSec": 1, "requestId": "example", "resetAt": "example", "remaining": 1, "scopes": [ "example" ], "upgradeUrl": "example"}Burst or daily quota exceeded. See resetAt.
Entry errors (auth, routing, quota) use error; tool errors use code and message. Check retryable when present.
object
Examplegenerated
{ "error": "example", "code": "example", "message": "example", "retryable": true, "retryAfterSec": 1, "requestId": "example", "resetAt": "example", "remaining": 1, "scopes": [ "example" ], "upgradeUrl": "example"}Headers
Section titled “Headers”Seconds
Unexpected server failure. Retrying the same call will not help.
Entry errors (auth, routing, quota) use error; tool errors use code and message. Check retryable when present.
object
Examplegenerated
{ "error": "example", "code": "example", "message": "example", "retryable": true, "retryAfterSec": 1, "requestId": "example", "resetAt": "example", "remaining": 1, "scopes": [ "example" ], "upgradeUrl": "example"}Temporary failure or maintenance. Retry after Retry-After.
Entry errors (auth, routing, quota) use error; tool errors use code and message. Check retryable when present.
object
Examplegenerated
{ "error": "example", "code": "example", "message": "example", "retryable": true, "retryAfterSec": 1, "requestId": "example", "resetAt": "example", "remaining": 1, "scopes": [ "example" ], "upgradeUrl": "example"}Headers
Section titled “Headers”Seconds
