Data API v4 player match history bug


#1

There is a bug with the player match history endpoint (/players/{player_id}/history)

Here is an example (with my FACEIT account ID):

https://open.faceit.com/data/v4/players/a0d61b0a-3255-4269-b042-aa2c68c0fb3e/history

which results in a response with 20 matches (in the “items” array), so it works fine.

…but when I try to receive more matches with the offset, the “items” array in the response is empty:

https://open.faceit.com/data/v4/players/a0d61b0a-3255-4269-b042-aa2c68c0fb3e/history?offset=40

The weird part is that it works with an offset of 20, but every higher offset than that just results in an empty “items” array.

I have played more than 400 matches, so an offset with 40 or higher should definitely return matches.


#2

Hi SHEIX,
there isn’t a bug in that endpoint, is the call you make that is wrong for you needs.
As you can see from the documentation here https://developers.faceit.com/docs/tools/data_api,
the /players/{player_id}/history endpoint can accept different filters via querystring:

  • game (if not defined, matches for all games will be retrieved)
  • from The timestamp (Unix time) as lower bound of the query. 1 month ago if not specified
  • to The timestamp (Unix time) as higher bound of the query. Current timestamp if not specified
  • offset and limit, the default pagination parameters.

So, the call you make, without any of these parameters, will retrieve all matches that a user has played in the last month (which are, at the time of writing, 38). You should specify from and to to get what you want :slight_smile:

Hope this can help
Lorenzo


CSGO Matches Per Player
#3

Hey Lorenzo,

I genuinely missed the

1 month ago if not specified

part of the “from” documentation.

Thanks a lot.


#4

No problem… Here to help! :slight_smile:

Cheers
Lorenzo


#5