The request in the OP was a fresh one. Now I also get this "301 Moved Permanently" status which is strange and I have never experienced it before.
As I said the JSON is more powerful than the PGN and in the database you only have the PGN. So only from the database, you cannot reconstruct game duration.
You have to make an API request to obtain the JSON.
Request to obtain JSON of a single game:
curl "
lichess.org/game/export/yNFRBVc4" -H "Accept: application/json"
response:
{"id":"yNFRBVc4","rated":true,"variant":"atomic","speed":"rapid","perf":"atomic","createdAt":1579519705716,"lastMoveAt":1579520292314,"status":"resign","players":{"white":{"user":{"id":"ceres222","name":"ceres222"},"rating":2057,"ratingDiff":8},"black":{"user":{"id":"lishadowapps","name":"lishadowapps"},"rating":2221,"ratingDiff":-8}},"winner":"white","moves":"e3 e6 Nf3 f5 Ne5 d5 Nd7 Bb4 c3 Qh4 g3 Nf6 f3 Ne4 fxe4 Qg4 Qxg4 Nc6 d4 b6 Ba6 Bxa6 O-O Ne5 dxe5 O-O-O cxb4 g5 b4 c6 Bb2 e5 b5 h5 Ba3 Rh6 Be7 Re8 Bxg5 h4 Rc1 Rg8 Nf6","tournament":"Osax2LaF","clock":{"initial":300,"increment":10,"totalTime":700}}
You can make a batch request with up to 300 game ids at once.
Request to obtain up to 300 games ( 2 games for now ):
curl -X POST "
lichess.org/games/export/_ids" -d "yNFRBVc4,twK6DTs3" -H "Accept: application/x-ndjson"
response:
{"id":"yNFRBVc4","rated":true,"variant":"atomic","speed":"rapid","perf":"atomic","createdAt":1579519705716,"lastMoveAt":1579520292314,"status":"resign","players":{"white":{"user":{"id":"ceres222","name":"ceres222"},"rating":2057,"ratingDiff":8},"black":{"user":{"id":"lishadowapps","name":"lishadowapps"},"rating":2221,"ratingDiff":-8}},"winner":"white","moves":"e3 e6 Nf3 f5 Ne5 d5 Nd7 Bb4 c3 Qh4 g3 Nf6 f3 Ne4 fxe4 Qg4 Qxg4 Nc6 d4 b6 Ba6 Bxa6 O-O Ne5 dxe5 O-O-O cxb4 g5 b4 c6 Bb2 e5 b5 h5 Ba3 Rh6 Be7 Re8 Bxg5 h4 Rc1 Rg8 Nf6","tournament":"Osax2LaF","clock":{"initial":300,"increment":10,"totalTime":700}}
{"id":"twK6DTs3","rated":true,"variant":"atomic","speed":"rapid","perf":"atomic","createdAt":1579518661274,"lastMoveAt":1579519193201,"status":"mate","players":{"white":{"user":{"id":"hyperion_chess","name":"Hyperion_Chess"},"rating":2077,"ratingDiff":-4},"black":{"user":{"id":"lishadowapps","name":"lishadowapps"},"rating":2217,"ratingDiff":4}},"winner":"black","moves":"e3 e6 Nf3 f5 Ne5 d5 h4 Bb4 c3 Nf6 Nf7 O-O Qh5 Nxh5 Nxd8 f4 f3 e5 d4 e4 Ba6 bxa6 O-O g5 Na3 Bxa3 exf4 Nd7 Bxg5 e3 f4 e2 Rfe1 Nf6 f5 Kf7 g4 Nxg4 f6 Rg8+ Kh2 Rg2+ Kh1 Rh2+ Kg1 Rg8#","tournament":"Osax2LaF","clock":{"initial":300,"increment":10,"totalTime":700}}