This skill enables AI agents to help you query UniProt programmatically using the REST API to retrieve protein sequences, annotations, and functional information.
pip install requestsTell your AI agent what you want to do:
- "Download the FASTA sequence for UniProt P04637"
- "Search UniProt for all human kinases"
- "Map these gene names to UniProt accessions"
- "Get functional annotations for BRCA1"
"Download the protein sequence for UniProt accession P53_HUMAN"
"Find all reviewed human proteins with 'transcription factor' in their name"
"Convert these gene names to UniProt IDs: TP53, BRCA1, EGFR"
"Download all Swiss-Prot entries for E. coli K-12 as FASTA"
"Get accession, gene name, and subcellular location for all human membrane proteins"
- Construct the appropriate REST API query
- Choose the right endpoint (search, stream, idmapping)
- Set output format (FASTA, JSON, TSV, XML)
- Handle pagination for large result sets
- Parse and present the results
| Format | Use Case |
|---|---|
fasta |
Sequences for alignment/BLAST |
json |
Programmatic parsing |
tsv |
Tabular analysis, pandas |
xml |
Full structured data |
txt |
Human-readable flat file |
gff |
Feature coordinates |
- Use
reviewed:truefor Swiss-Prot (curated) entries only - Use the stream endpoint for >500 results
- Specify fields in TSV format to reduce data transfer
- Be polite with requests - add delays for batch queries
- Cache results when possible - UniProt updates frequently but not constantly