How to extract all peptide sequences for a UniProt protein entry with an API?
If downloading the complete database is not an option, you may able to use the instructions from this help page (based on the gff format for any given query):
https://www.uniprot.org/help/download_subsequences