Just send a request to this endpoint: https://api.chess.com/pub/player/gm_salzi/games/archives and replace my username with yours. You will get a list of endpoints with all your games you played in a specific month
Downloading all My Games
You'll have to know some programming if you don't want to do it manually since you'll have many monthly archives available.
The right way to go about would be to use https://api.chess.com/pub/player/{username}/games/archives to get all the archives that exist then make requests to each and append /pgn (making use of the https://api.chess.com/pub/player/{username}/games/{YYYY}/{MM}/pgn endpoint). There are some specific headers to use to ensure it's a download you can read about it here: https://www.chess.com/news/view/published-data-api#pubapi-endpoint-games-archive-list:~:text=YYYY%7D/%7BMM%7D/pgn-,Data%20Format%3A,-this%20download%20follows
Is there any way to download all of my games in pgn format through the public api or some other way? The only way I've found so far is downloading all the games from a single page. I am trying to download all my games in total and not just a single page.