Skip to content
Retrieve PubMed article information to create citations using NCBI's Entrez (API)
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Pubmed Citation Generator

Writing citations for research papers is time-consuming!

Great news, NCBI’s databases (web API) are accessible using Python. Thus, this program can create MLA citations for the first five articles found.


A step-by-step tutorial on how I wrote the program can be found here.

How it works

When running the script in terminal, you will be asked to enter search terms to find your articles. Results will display the PubMed ID and citation for each of the five articles.

For example, the search terms "drosophila circadian clock" (my research focus) results in (only 1 out of 5 shown):

Please enter a search for PubMed articles: drosophila circadian clock 
Beginning article search
Retrieving articles 1 of 5
PubMed ID: 30881291
Chen W, Xue Y, Scarfe L, Wang D, Zhang Y. Loss of <i>Prune</i> in Circadian Cells Decreases the Amplitude of the Circadian Locomotor Rhythm in <i>Drosophila</i>. Front Cell Neurosci 2019;13():76. doi: 10.3389/fncel.2019.00076


  • Python3
  • Basic knowledge of data parsing and web API



Getting started

Clone the repository from github and go into the peptide-search folder in terminal.

git clone
cd pubmed-search-api

Running the script

Run the script in terminal and enter search terms to find your article.



You should see the first five articles showing its unique PubMed ID and citation written in MLA format.

Results for "drosophila circadian clock" as an example:

Good luck!


Ying Li

You can’t perform that action at this time.