Aller au contenu
GET /v1/user/games

A user's recent games

Essayez-le en direct

10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.

En-têtes personnalisés (facultatif)
api.oanor.com/lichess-api

Ça marche. Récupérez une clé API et utilisez-la dans votre projet.

Obtenez une clé API

Extraits de code

curl "https://api.oanor.com/lichess-api/v1/user/games" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/lichess-api/v1/user/games", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/lichess-api/v1/user/games");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/lichess-api/v1/user/games",
    headers={"x-oanor-key": "oanor_test_..."}
)

Exemple de réponse

Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.

{
    "data": {
        "count": 10,
        "games": [
            {
                "id": "kAdOQKeh",
                "url": "https://lichess.org/kAdOQKeh",
                "perf": "blitz",
                "black": {
                    "user": "DrNykterstein",
                    "rating": 3145,
                    "rating_diff": 8
                },
                "clock": {
                    "total": 180,
                    "initial": 180,
                    "increment": 0
                },
                "moves": "e4 Nf6 e5 Nd5 Nc3 Nxc3 dxc3 d6 Nf3 Nc6 Bb5 a6 Bxc6+ bxc6 O-O f6 exf6 exf6 Nd4 Qd7 Qh5+ g6 Qf3 Kf7 Nxc6 Bb7 Nd8+ Rxd8 Qxb7 Qb5 Qxc7+ Rd7 c4 Rxc7 cxb5 axb5 c3 Be7 Rd1 Ra8 a3 f5 Be3 Ke6 Rd3 Bf6 Rad1 Rc6 Bf4 Be5 Re1 Kf6 Bxe5+ dxe5 Rd5 e4 Rxb5 Rd6 g3 Rd2 c4 Rc2 c5 Rd8 Rb6+ Kg5 Rd6 Ra8 c6 Rxb2 Rc1 Rc8 c7 Rb7 Rdc6 Ra7 R1c3 f4 R6c5+ Kg4 gxf4 Kxf4 Kg2 g5 R5c4 Ke5 Rc5+ Kf4 f3 exf3+ Kf2 Ke4 R5c4+ Kf5 Kxf3 h5 Rc5+ Ke6 Rc6+ Kd7 Ke4 g4 Kd5 Ra5+ R6c5 Rxc7 Rxa5 Rxc3 Ke4 Rh3 Rd5+ Ke6 Rd2 Kf6 Kf4 Rf3+ Ke4 Rxa3 Kf4 Rf3+ Ke4 Kg5 Rg2 Kh4 Ke5 Kh3 Rd2 h4 Ke4 Rf8 Ke3 g3 hxg3 hxg3 Rd1 g2",
                "rated": true,
                "speed": "blitz",
                "white": {
                    "user": "respects_55",
                    "rating": 2644,
                    "rating_diff": -5
                },
                "status": "resign",
                "winner": "black",
                "opening": {
                    "eco": "B02",
                    "ply": 5,
                    "name": "Alekhine Defense: Sämisch Attack"
                },
                "variant": "standard",
                "created_at": 1775677143033,
                "last_move_at": 1775677513708
            },
            {
                "id": "xKWdG1d1",
                "url": "https://lichess.org/xKWdG1d1",
                "perf": "blitz",
                "black": {
                    "user": "Sharkfang",
                    "rating": 2752,
                    "rating_diff": -2
                },
                "clock": {
                    "total": 180,
                    "initial": 180,
                    "increment": 0
                },
                "moves": "d4 Nf6 c4 g6 Nc3 Bg7 e3 d6 e4 O-O Nf3 e5 d5 Nbd7 Bd3 Nc5 Bc2 a5 h3 Nh5 g3 Bd7 Be3 b6 Nd2 Qe8 Qe2 f5 a4 f4 Bxc5 bxc5 g4 Nf6 f3 Rb8 Nb5 Qc8 Nb3 Ra8 Qd2 Bxb5 cxb5 Nd7 Nxa5 Nb6 Nc6 Kh8 a5 Nc4 Qc3 Ne3 Ke2 Bf6 h4 Qd7 Rag1 Bg7 Bd3 h6 b4 cxb4 Qxb4 Rfe8 Qc3 Rec8 Rc1 Qf7 Nb4 Rxa5 Nc2 Ra2 Ra1 Rxa1 Rxa1 Ng2 b6 Nxh4 b7 Rb8 Ra8 Qe8 Qc6 Qd8 Qa6 Kh7 Rxb8 Qxb8 Qa8",
                "rated": true,
                "speed": "blitz",
                "white": {
                    "user": "DrNykterstein",
                    "rating": 3131,
                    "rating_diff": 14
                },
                "status": "resign",
                "winner": "white",
                "opening": {
                    "eco": "E61",
                    "ply": 5,
                    "name": "King's Indian Defense"
    
…