Hi,

I wanted to download 10 abstracts for 10 specific mouse genes (for a total of 100 abstracts). I was thinking of searching Pubmed for it, so I put in my first gene (FOS) in the search bar. But there was no option (that I could find) for mentioning the species I want to restrict my search to. So the results were either for 'Humans' or 'All organisms'. 

Since this is a pretty basic feature, I was hoping that Pubmed would allow it inherently. But it wasn't even mentioned in the 'Advanced' options. So, does anyone know if and how this can be done?
This thread piqued my interest since I wanted to write a script to do this for a web app. I'm not sure why the above examples don't work but here's how I got it going.
First you need the gene ID for Fos. You can do that just by searching:

https://www.ncbi.nlm.nih.gov/gene/14281

The Gene ID is the number at the end of the URL above. 
You can put this directly into pubmed as the `&from_uid=` in this url:

https://www.ncbi.nlm.nih.gov/pubmed?LinkName=gene_pubmed&from_uid=14281

You can also use elink as suggested by Pierre. To do that just tack it onto this url on the `&id=`:

https://eutils.ncbi.nlm.nih.gov/entrez/eutils/elink.fcgi?dbfrom=gene&dbto=pubmed&cmd=neighbor&retmode=xml&id=14281

Change 'gene' to 'protein' if you use protein accession numbers.  This will return an XML like so:

        <eLinkResult>
                <LinkSet>
                      <DbFrom>gene</DbFrom>
                      <IdList>
                            <Id>14281</Id>
                      </IdList>
                      <LinkSetDb>
                           <DbTo>pubmed</DbTo>
                           <LinkName>gene_pubmed</LinkName>
                           <Link>
                               <Id>26762887</Id>
                           </Link>
                           <Link>
                               <Id>26143639</Id>
                           </Link>
    etc...

The pub med hits are in `<LinkSetDb><Link><Id>`. You can extract these with a parsing tool or do it by hand for a few genes. Then put them into pubmed as a unique id:

https://www.ncbi.nlm.nih.gov/pubmed/?term=26762887

To put this in a program you could loop the gene names and paste them into either of the links above. For the eutils link you need to capture the url and parse it, extract the ids and paste them into a url. 
