コンテンツにスキップ

所有ソフトの分析

GET
/rest/v1/getLibraryAnalytics
curl --request GET \
--url https://game.retrogather.com/rest/v1/getLibraryAnalytics \
--header 'Authorization: Bearer <token>'

Library analytics / 所有ソフトの分析: stats for owned games, including money spent. Matches the in-app analysis dialog. Default section is summary only. summary.pricedCount = games with a price (the base of totalAmount); purchase.yearly/monthly omit games without buyDate. All plans use library rows (not physical copies): a game with several copies counts once, at its representative copy’s price, so the in-app LIGHT/PREMIUM total may be higher. Say so when answering how much the user spent; sum getPhysicalCopies for the per-copy total. Filters match getLibrary; buyDateFrom/buyDateTo still apply only to purchase amounts.

Arrays are comma-separated. Percent-encode query values; Japanese values are easier to send with POST JSON. Plans: FREE / LIGHT / PREMIUM. Scopes: library:read.

sections
Array<string>
Allowed values: summary rating platform genre purchase
platformIds
Array<integer>
<= 10 items

Platform IDs (OR)

genreId
integer
>= 1

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
string
<= 30 characters

Title, reading, or edition name

releaseYearFrom
integer

Release year from (inclusive). Analytics/export axis stays yearly.

releaseYearTo
integer

Release year to (inclusive). Analytics/export axis stays yearly.

attributes
Array<string>
<= 5 items

Attribute IDs or labels (AND)

buyPlace
string
<= 30 characters

Purchase place (substring, case-insensitive)

ratingFrom
integer
>= 1 <= 5

Minimum rating (1-5)

ratingTo
integer
>= 1 <= 5

Maximum rating (1-5)

buyDateFrom
string format: date

Purchase date from (inclusive)

buyDateTo
string format: date

Purchase date to (inclusive)

buyPriceFrom
integer

Purchase price from (JPY)

buyPriceTo
integer

Purchase price to (JPY)

Tool result JSON (no MCP envelope). Delete previews also return 200 with confirmToken.

Media typeapplication/json
Any of:
object
summary
object
key
additional properties
any
rating
Array<object>
object
key
additional properties
any
platform
Array<object>
object
key
additional properties
any
genre
Array<object>
object
key
additional properties
any
purchase
object
key
additional properties
any
key
additional properties
any
Example
{
"code": "plan_required",
"status": "PLANNED",
"items": [
{
"status": "added"
}
]
}

Invalid_input (arguments, broken JSON body)

Media typeapplication/json

Entry errors (auth, routing, quota) use error; tool errors use code and message. Check retryable when present.

object
error
string
code
string
message
string
retryable
boolean
retryAfterSec
integer
requestId
string
resetAt
string
remaining
integer
scopes
Array<string>
upgradeUrl
string
key
additional properties
any
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

Media typeapplication/json

Entry errors (auth, routing, quota) use error; tool errors use code and message. Check retryable when present.

object
error
string
code
string
message
string
retryable
boolean
retryAfterSec
integer
requestId
string
resetAt
string
remaining
integer
scopes
Array<string>
upgradeUrl
string
key
additional properties
any
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

Media typeapplication/json

Entry errors (auth, routing, quota) use error; tool errors use code and message. Check retryable when present.

object
error
string
code
string
message
string
retryable
boolean
retryAfterSec
integer
requestId
string
resetAt
string
remaining
integer
scopes
Array<string>
upgradeUrl
string
key
additional properties
any
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

Media typeapplication/json

Entry errors (auth, routing, quota) use error; tool errors use code and message. Check retryable when present.

object
error
string
code
string
message
string
retryable
boolean
retryAfterSec
integer
requestId
string
resetAt
string
remaining
integer
scopes
Array<string>
upgradeUrl
string
key
additional properties
any
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.

Media typeapplication/json

Entry errors (auth, routing, quota) use error; tool errors use code and message. Check retryable when present.

object
error
string
code
string
message
string
retryable
boolean
retryAfterSec
integer
requestId
string
resetAt
string
remaining
integer
scopes
Array<string>
upgradeUrl
string
key
additional properties
any
Examplegenerated
{
"error": "example",
"code": "example",
"message": "example",
"retryable": true,
"retryAfterSec": 1,
"requestId": "example",
"resetAt": "example",
"remaining": 1,
"scopes": [
"example"
],
"upgradeUrl": "example"
}
Retry-After
integer

Seconds

Unexpected server failure. Retrying the same call will not help.

Media typeapplication/json

Entry errors (auth, routing, quota) use error; tool errors use code and message. Check retryable when present.

object
error
string
code
string
message
string
retryable
boolean
retryAfterSec
integer
requestId
string
resetAt
string
remaining
integer
scopes
Array<string>
upgradeUrl
string
key
additional properties
any
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.

Media typeapplication/json

Entry errors (auth, routing, quota) use error; tool errors use code and message. Check retryable when present.

object
error
string
code
string
message
string
retryable
boolean
retryAfterSec
integer
requestId
string
resetAt
string
remaining
integer
scopes
Array<string>
upgradeUrl
string
key
additional properties
any
Examplegenerated
{
"error": "example",
"code": "example",
"message": "example",
"retryable": true,
"retryAfterSec": 1,
"requestId": "example",
"resetAt": "example",
"remaining": 1,
"scopes": [
"example"
],
"upgradeUrl": "example"
}
Retry-After
integer

Seconds