Given a uniprot ID, I am trying to automatically extract related pubmed IDs (PMIDs) from pubmed. I can map the UniProt ID to something NCBI can understand. For instance, UniProt ID O14733 can be mapped to GI: 6831583 and then you can launch a search from http://www.ncbi.nlm.nih.gov/protein/O14733 to see the associated pubmed articles with the URL http://www.ncbi.nlm.nih.gov/pubmed?linkname=protein_pubmed_weighted&from_uid=6831583.
I have never used ncbi's e-utils, so it may be a very simple modification to be able to fetch these articles automatically, but I can't figure it out. My best guess was http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&LinkName=protein_pubmed_weighted&from_uid=6831583, but this returns nothing.
Basically, given an ID such as 683583, I want to return a list of PMIDs. I would rather do this in python if possible. Any suggestions?