Skip to content

Get a player's rating

GET
/players/{player_id}/rating
curl --request GET \
--url https://api.krkplaystennis.example/v1/players/plr_2b7xq9mhk4/rating \
--header 'X-API-Key: <X-API-Key>'

Returns a player’s current rating, confidence, and the K-factor that applies to their next rated match.

To see how the rating got to its current value, list the player’s rating history.

player_id
required

A player ID. Starts with plr_.

string
/^plr_[a-z0-9]{10}$/

The player ID.

The player’s current rating.

Media typeapplication/json
object
player_id
required

A player ID. Starts with plr_.

string
/^plr_[a-z0-9]{10}$/
value
required

A rating. New players start between 1000 and 1800, based on their self-assessed NTRP level.

integer
confidence
required

How settled a rating is, from 0 to 100. New players start at 20. Each rated match adds 10, up to 95. After 60 days without a rated match, confidence drops by 5 every 30 days, down to 20.

integer
<= 100
k_factor
required

The maximum number of points a rating can move in one match. It’s 48 when confidence is below 40, 32 when confidence is from 40 to 69, and 16 when confidence is 70 or higher.

integer
Allowed values: 48 32 16
rated_matches
required

Number of rated matches the player has played.

integer
last_rated_match_at
required

When the player’s most recent rated match was played. null if the player has no rated matches.

string | null format: date-time
updated_at
required

When the rating or confidence last changed.

string format: date-time

Examples

Examplerating

Ola's rating after one rated match

{
"player_id": "plr_2b7xq9mhk4",
"value": 1432,
"confidence": 30,
"k_factor": 48,
"rated_matches": 1,
"last_rated_match_at": "2026-10-10T18:00:00+02:00",
"updated_at": "2026-10-10T20:43:12Z"
}

The credentials are missing, invalid, or expired.

Media typeapplication/problem+json

An error, as RFC 9457 problem details.

object
type
required

A URL that identifies the error type and links to its documentation.

string format: uri
title
required

A short summary of the error type. It’s the same for every error of this type.

string
status
required

The HTTP status code.

integer
>= 400 <= 599
detail
required

An explanation of this occurrence of the error.

string
instance

The request path that caused the error.

string
errors

One item per invalid field or parameter. Only for invalid-request, invalid-score, and validation-failed.

Array<object>
object
pointer
required

A JSON Pointer to the invalid field in the request body, or #/ followed by the name of an invalid query parameter.

string
detail
required

What’s wrong with the field and how to fix it.

string

Examples

Exampleunauthenticated

Missing API key

{
"type": "https://saverio-cirillo.com/krk-plays-tennis-api/errors/#unauthenticated",
"title": "Authentication required",
"status": 401,
"detail": "Send a valid API key in the X-API-Key header.",
"instance": "/v1/players/plr_2b7xq9mhk4"
}

No resource exists with this ID.

Media typeapplication/problem+json

An error, as RFC 9457 problem details.

object
type
required

A URL that identifies the error type and links to its documentation.

string format: uri
title
required

A short summary of the error type. It’s the same for every error of this type.

string
status
required

The HTTP status code.

integer
>= 400 <= 599
detail
required

An explanation of this occurrence of the error.

string
instance

The request path that caused the error.

string
errors

One item per invalid field or parameter. Only for invalid-request, invalid-score, and validation-failed.

Array<object>
object
pointer
required

A JSON Pointer to the invalid field in the request body, or #/ followed by the name of an invalid query parameter.

string
detail
required

What’s wrong with the field and how to fix it.

string

Examples

ExamplenotFound

Unknown player ID

{
"type": "https://saverio-cirillo.com/krk-plays-tennis-api/errors/#not-found",
"title": "Not found",
"status": 404,
"detail": "No player exists with the ID plr_0000000000.",
"instance": "/v1/players/plr_0000000000"
}

You sent too many requests. Wait for the number of seconds in Retry-After, then retry.

Media typeapplication/problem+json

An error, as RFC 9457 problem details.

object
type
required

A URL that identifies the error type and links to its documentation.

string format: uri
title
required

A short summary of the error type. It’s the same for every error of this type.

string
status
required

The HTTP status code.

integer
>= 400 <= 599
detail
required

An explanation of this occurrence of the error.

string
instance

The request path that caused the error.

string
errors

One item per invalid field or parameter. Only for invalid-request, invalid-score, and validation-failed.

Array<object>
object
pointer
required

A JSON Pointer to the invalid field in the request body, or #/ followed by the name of an invalid query parameter.

string
detail
required

What’s wrong with the field and how to fix it.

string

Examples

ExamplerateLimited

Rate limit reached

{
"type": "https://saverio-cirillo.com/krk-plays-tennis-api/errors/#rate-limited",
"title": "Rate limit reached",
"status": 429,
"detail": "This API key is limited to 60 requests per minute. Retry after 30 seconds.",
"instance": "/v1/matches"
}
Retry-After
integer
>= 1

Number of seconds to wait before you retry.

Example
30

© 2026 Saverio Cirillo · KRKplaysTennis is a fictional API · Built with Starlight