The Lichess Player Games endpoint (https://explorer.lichess.ovh/player) is effectively unusable.
The documentation is found at: https://lichess.org/api#tag/Opening-Explorer/operation/openingExplorerPlayer
The example given is: "https://explorer.lichess.ovh/player?player=revoof&color=white&play=d2d4,d7d5&recentGames=1"
and the response sample is given as:
"{"opening": {"eco": "D00","name": "Queen's Pawn Game"},"queuePosition": 25,"white": 366,"draws": 23,"black": 279,"moves": [{},{},{},{},{}],"recentGames": [{}]}"
However the real world response, to the example above is:
"{"white":366,"draws":23,"black":279,"moves":[{"uci":"c2c4","san":"c4","averageOpponentRating":1695,"performance":1744,"white":361,"draws":23,"black":272,"game":null,"opening":{"eco":"D06","name":"Queen's Gambit"}},{"uci":"c2c3","san":"c3","averageOpponentRating":1797,"performance":1797,"white":2,"draws":0,"black":2,"game":null,"opening":null},{"uci":"e2e4","san":"e4","averageOpponentRating":1762,"performance":1640,"white":1,"draws":0,"black":2,"game":null,"opening":{"eco":"D00","name":"Blackmar-Diemer Gambit"}},{"uci":"g1f3","san":"Nf3","averageOpponentRating":1497,"performance":1374,"white":1,"draws":0,"black":2,"game":null,"opening":{"eco":"D02","name":"Queen's Pawn Game: Zukertort Variation"}},{"uci":"h2h4","san":"h4","averageOpponentRating":1674,"performance":874,"white":0,"draws":0,"black":1,"game":{"id":"9vA24xBn","winner":"black","speed":"bullet","mode":"rated","black":{"name":"MentalBlood","rating":1674},"white":{"name":"revoof","rating":1657},"year":2020,"month":"2020-06"},"opening":null},{"uci":"h2h3","san":"h3","averageOpponentRating":1696,"performance":2496,"white":1,"draws":0,"black":0,"game":{"id":"zyI4GGKv","winner":"white","speed":"bullet","mode":"rated","black":{"name":"gocool99","rating":1696},"white":{"name":"revoof","rating":1702},"year":2020,"month":"2020-07"},"opening":null}],"recentGames":[{"uci":"c2c4","id":"ycZbWQZO","winner":"white","speed":"bullet","mode":"rated","black":{"name":"Winavesh","rating":1700},"white":{"name":"revoof","rating":1700},"year":2024,"month":"2024-11"}],"opening":{"eco":"D00","name":"Queen's Pawn Game"},"queuePosition":85}"
The "queuePosition" is now placed at the end of the response which would not make a big difference EXCEPT that a HttpResponse is only available when the Status code and headers have been received. With the format above this means that using the API we need to wait until the queueposition is 0. This means that the example given in the documentation now takes a long time to resolve and is received as:
{"white":366,"draws":23,"black":279,"moves":[{"uci":"c2c4","san":"c4","averageOpponentRating":1695,"performance":1744,"white":361,"draws":23,"black":272,"game":null,"opening":{"eco":"D06","name":"Queen's Gambit"}},{"uci":"c2c3","san":"c3","averageOpponentRating":1797,"performance":1797,"white":2,"draws":0,"black":2,"game":null,"opening":null},{"uci":"e2e4","san":"e4","averageOpponentRating":1762,"performance":1640,"white":1,"draws":0,"black":2,"game":null,"opening":{"eco":"D00","name":"Blackmar-Diemer Gambit"}},{"uci":"g1f3","san":"Nf3","averageOpponentRating":1497,"performance":1374,"white":1,"draws":0,"black":2,"game":null,"opening":{"eco":"D02","name":"Queen's Pawn Game: Zukertort Variation"}},{"uci":"h2h4","san":"h4","averageOpponentRating":1674,"performance":874,"white":0,"draws":0,"black":1,"game":{"id":"9vA24xBn","winner":"black","speed":"bullet","mode":"rated","black":{"name":"MentalBlood","rating":1674},"white":{"name":"revoof","rating":1657},"year":2020,"month":"2020-06"},"opening":null},{"uci":"h2h3","san":"h3","averageOpponentRating":1696,"performance":2496,"white":1,"draws":0,"black":0,"game":{"id":"zyI4GGKv","winner":"white","speed":"bullet","mode":"rated","black":{"name":"gocool99","rating":1696},"white":{"name":"revoof","rating":1702},"year":2020,"month":"2020-07"},"opening":null}],"recentGames":[{"uci":"c2c4","id":"ycZbWQZO","winner":"white","speed":"bullet","mode":"rated","black":{"name":"Winavesh","rating":1700},"white":{"name":"revoof","rating":1700},"year":2024,"month":"2024-11"}],"opening":{"eco":"D00","name":"Queen's Pawn Game"},"queuePosition":85}
{"white":366,"draws":23,"black":279,"moves":[{"uci":"c2c4","san":"c4","averageOpponentRating":1695,"performance":1744,"white":361,"draws":23,"black":272,"game":null,"opening":{"eco":"D06","name":"Queen's Gambit"}},{"uci":"c2c3","san":"c3","averageOpponentRating":1797,"performance":1797,"white":2,"draws":0,"black":2,"game":null,"opening":null},{"uci":"e2e4","san":"e4","averageOpponentRating":1762,"performance":1640,"white":1,"draws":0,"black":2,"game":null,"opening":{"eco":"D00","name":"Blackmar-Diemer Gambit"}},{"uci":"g1f3","san":"Nf3","averageOpponentRating":1497,"performance":1374,"white":1,"draws":0,"black":2,"game":null,"opening":{"eco":"D02","name":"Queen's Pawn Game: Zukertort Variation"}},{"uci":"h2h4","san":"h4","averageOpponentRating":1674,"performance":874,"white":0,"draws":0,"black":1,"game":{"id":"9vA24xBn","winner":"black","speed":"bullet","mode":"rated","black":{"name":"MentalBlood","rating":1674},"white":{"name":"revoof","rating":1657},"year":2020,"month":"2020-06"},"opening":null},{"uci":"h2h3","san":"h3","averageOpponentRating":1696,"performance":2496,"white":1,"draws":0,"black":0,"game":{"id":"zyI4GGKv","winner":"white","speed":"bullet","mode":"rated","black":{"name":"gocool99","rating":1696},"white":{"name":"revoof","rating":1702},"year":2020,"month":"2020-07"},"opening":null}],"recentGames":[{"uci":"c2c4","id":"ycZbWQZO","winner":"white","speed":"bullet","mode":"rated","black":{"name":"Winavesh","rating":1700},"white":{"name":"revoof","rating":1700},"year":2024,"month":"2024-11"}],"opening":{"eco":"D00","name":"Queen's Pawn Game"},"queuePosition":66}
{"white":366,"draws":23,"black":279,"moves":[{"uci":"c2c4","san":"c4","averageOpponentRating":1695,"performance":1744,"white":361,"draws":23,"black":272,"game":null,"opening":{"eco":"D06","name":"Queen's Gambit"}},{"uci":"c2c3","san":"c3","averageOpponentRating":1797,"performance":1797,"white":2,"draws":0,"black":2,"game":null,"opening":null},{"uci":"e2e4","san":"e4","averageOpponentRating":1762,"performance":1640,"white":1,"draws":0,"black":2,"game":null,"opening":{"eco":"D00","name":"Blackmar-Diemer Gambit"}},{"uci":"g1f3","san":"Nf3","averageOpponentRating":1497,"performance":1374,"white":1,"draws":0,"black":2,"game":null,"opening":{"eco":"D02","name":"Queen's Pawn Game: Zukertort Variation"}},{"uci":"h2h4","san":"h4","averageOpponentRating":1674,"performance":874,"white":0,"draws":0,"black":1,"game":{"id":"9vA24xBn","winner":"black","speed":"bullet","mode":"rated","black":{"name":"MentalBlood","rating":1674},"white":{"name":"revoof","rating":1657},"year":2020,"month":"2020-06"},"opening":null},{"uci":"h2h3","san":"h3","averageOpponentRating":1696,"performance":2496,"white":1,"draws":0,"black":0,"game":{"id":"zyI4GGKv","winner":"white","speed":"bullet","mode":"rated","black":{"name":"gocool99","rating":1696},"white":{"name":"revoof","rating":1702},"year":2020,"month":"2020-07"},"opening":null}],"recentGames":[{"uci":"c2c4","id":"ycZbWQZO","winner":"white","speed":"bullet","mode":"rated","black":{"name":"Winavesh","rating":1700},"white":{"name":"revoof","rating":1700},"year":2024,"month":"2024-11"}],"opening":{"eco":"D00","name":"Queen's Pawn Game"},"queuePosition":64}
{"white":366,"draws":23,"black":279,"moves":[{"uci":"c2c4","san":"c4","averageOpponentRating":1695,"performance":1744,"white":361,"draws":23,"black":272,"game":null,"opening":{"eco":"D06","name":"Queen's Gambit"}},{"uci":"c2c3","san":"c3","averageOpponentRating":1797,"performance":1797,"white":2,"draws":0,"black":2,"game":null,"opening":null},{"uci":"e2e4","san":"e4","averageOpponentRating":1762,"performance":1640,"white":1,"draws":0,"black":2,"game":null,"opening":{"eco":"D00","name":"Blackmar-Diemer Gambit"}},{"uci":"g1f3","san":"Nf3","averageOpponentRating":1497,"performance":1374,"white":1,"draws":0,"black":2,"game":null,"opening":{"eco":"D02","name":"Queen's Pawn Game: Zukertort Variation"}},{"uci":"h2h4","san":"h4","averageOpponentRating":1674,"performance":874,"white":0,"draws":0,"black":1,"game":{"id":"9vA24xBn","winner":"black","speed":"bullet","mode":"rated","black":{"name":"MentalBlood","rating":1674},"white":{"name":"revoof","rating":1657},"year":2020,"month":"2020-06"},"opening":null},{"uci":"h2h3","san":"h3","averageOpponentRating":1696,"performance":2496,"white":1,"draws":0,"black":0,"game":{"id":"zyI4GGKv","winner":"white","speed":"bullet","mode":"rated","black":{"name":"gocool99","rating":1696},"white":{"name":"revoof","rating":1702},"year":2020,"month":"2020-07"},"opening":null}],"recentGames":[{"uci":"c2c4","id":"ycZbWQZO","winner":"white","speed":"bullet","mode":"rated","black":{"name":"Winavesh","rating":1700},"white":{"name":"revoof","rating":1700},"year":2024,"month":"2024-11"}],"opening":{"eco":"D00","name":"Queen's Pawn Game"},"queuePosition":22}
{"white":366,"draws":23,"black":279,"moves":[{"uci":"c2c4","san":"c4","averageOpponentRating":1695,"performance":1744,"white":361,"draws":23,"black":272,"game":null,"opening":{"eco":"D06","name":"Queen's Gambit"}},{"uci":"c2c3","san":"c3","averageOpponentRating":1797,"performance":1797,"white":2,"draws":0,"black":2,"game":null,"opening":null},{"uci":"e2e4","san":"e4","averageOpponentRating":1762,"performance":1640,"white":1,"draws":0,"black":2,"game":null,"opening":{"eco":"D00","name":"Blackmar-Diemer Gambit"}},{"uci":"g1f3","san":"Nf3","averageOpponentRating":1497,"performance":1374,"white":1,"draws":0,"black":2,"game":null,"opening":{"eco":"D02","name":"Queen's Pawn Game: Zukertort Variation"}},{"uci":"h2h4","san":"h4","averageOpponentRating":1674,"performance":874,"white":0,"draws":0,"black":1,"game":{"id":"9vA24xBn","winner":"black","speed":"bullet","mode":"rated","black":{"name":"MentalBlood","rating":1674},"white":{"name":"revoof","rating":1657},"year":2020,"month":"2020-06"},"opening":null},{"uci":"h2h3","san":"h3","averageOpponentRating":1696,"performance":2496,"white":1,"draws":0,"black":0,"game":{"id":"zyI4GGKv","winner":"white","speed":"bullet","mode":"rated","black":{"name":"gocool99","rating":1696},"white":{"name":"revoof","rating":1702},"year":2020,"month":"2020-07"},"opening":null}],"recentGames":[{"uci":"c2c4","id":"ycZbWQZO","winner":"white","speed":"bullet","mode":"rated","black":{"name":"Winavesh","rating":1700},"white":{"name":"revoof","rating":1700},"year":2024,"month":"2024-11"}],"opening":{"eco":"D00","name":"Queen's Pawn Game"},"queuePosition":0}"
I imagine that this could be fixed back to how it was 2 years ago.
thank you