Download complete Phylogenetic Tree as JSON
NCBI maintains an SQL dump of their taxonomic database
You can see what that contains here
For smaller requests (depending on what you need), you might also consider the ENSEMBL REST API - although I don't know of a way to retrieve the complete tree (shoot them an email): https://rest.ensembl.org/taxonomy/classification/53399?content-type=application/json