Live statistics chess960 from chess.com? Cross-posted stackoverflow, but nothing.

Both lichess and chess.com have the feature to play the variant chess960 live. However, only lichess has a graph showing how your live chess960 rating has changed over time. Lichess also shows other statistics like highest, lowest, best wins, worst losses, average opponent rating, etc. (chess.com does have this for correspondence chess960 though.)
I could create my own graph and statistics in Excel/Google Sheets by manually recording each game's date and my rating afterwards indicated beside my username, but...
Question: Is there a way to obtain, or what in general is the way to go about obtaining, ratings after each chess960 game using some kind of script that sees a player's public profile and then extracts the data?
I have a feeling this kind of script has been done before even if this was not specifically done for chess.com's live chess960. The script doesn't have to graph (pretty easy to do once you have to the data: just use excel/google sheets). I just need the script to collect all the dates and rating numbers for each line of the user's games.

Update 2: Fixed now. see the 'json' vs the 'preformed'. WOW.
Update 1: It appears Mike Steelson has an answer here, where the code is given as
=arrayformula( regexextract(split( substitute(substitute(substitute(getDataJSON(A1;&quot;/games&quot;;&quot;/pgn&quot;);&quot;[&quot;;&quot;&quot;);&quot;]&quot;;&quot;&quot;);&quot;&quot;&quot;&quot;;&quot;&quot;) ;char(10));&quot;\s.*&quot;) )

with an example given here
https://docs.google.com/spreadsheets/d/1MX1o5qdy0K3gTMzbimUV3SmFf-0XPCSJ8Vz4IjI-8Ak/copy
It appears there's a problem when it gets to the case of chess960 only. Consider for example this player: Replacing 'gmwso' with the player's username will yield a weird output. i imagine the output will be messier for mixed chess960 and chess.
Yes, it's possible to obtain the data you want. Chess.com has a REST API which is described in the following news post:
https://www.chess.com/news/view/published-data-api
You can use the following URL to get a list of monthly archives of a players games:
https://api.chess.com/pub/player/{username}/games/archives

In this list you will find URLs which look like this:
https://api.chess.com/pub/player/{username}/games/{YYYY}/{MM}

If you append /pgn to this URL, you will get get all the games in PGN format, which is probably simpler to parse.
Lets look at an example:
https://api.chess.com/pub/player/magnuscarlsen/games/2018/01/pgn
Here you will find games played by Magnus Carlsen in January 2018. This list contains a couple of Chess960 games, which are identified by the following tag:
[Variant &quot;Chess960&quot;]

The following tags will give you the UTC date and time of the game as well as the players ratings at the time:
[UTCDate &quot;2018.01.03&quot;]
[UTCTime &quot;21:50:55&quot;]
[WhiteElo &quot;2706&quot;]
[BlackElo &quot;2940&quot;]

Lichess has also an API to download games, which I already described here.
Code
Here's some simple Kotlin code to extract the data (you will need to change the file and user name):
import java.io.File

fun main() {
    val data = (File(&quot;ChessCom_magnuscarlsen_201801.pgn&quot;).readText().trim().split(&quot;\n\n\n&quot;).map {
        it.split('\n').filter { it.startsWith('[') }.map {
            val t = it.replace(Regex(&quot;[\\[\\]]&quot;), &quot;&quot;).split(' ', limit = 2)
            t[0] to t[1]
        }.toMap()
    })
    data.forEach {
        if (it[&quot;Variant&quot;] == &quot;\&quot;Chess960\&quot;&quot;) {
            println(&quot;${it[&quot;UTCDate&quot;]} ${it[&quot;UTCTime&quot;]} ${it[if (it[&quot;White&quot;] == &quot;\&quot;MagnusCarlsen\&quot;&quot;) &quot;WhiteElo&quot; else &quot;BlackElo&quot;]}&quot;)
        }
    }
}

Result:
&quot;2018.01.03&quot; &quot;21:50:55&quot; &quot;2706&quot;
&quot;2018.01.03&quot; &quot;21:09:41&quot; &quot;2727&quot;
&quot;2018.01.03&quot; &quot;19:43:22&quot; &quot;2703&quot;