I would use the NCBI Entrez Utilities web interface, specifically Entrez Link (elink) can give you citations for PMC articles. Sadly this does not cover all articles in PubMed, only the citations for the subset in PubMedCentral (PMC) have this citation data. See http://www.ncbi.nlm.nih.gov/books/NBK25499/
There is an example of fetching citations for a PMC paper using the Biopython wrapper for Entrez in the Biopython Tutorial, http://biopython.org/DIST/docs/tutorial/Tutorial.html or http://biopython.org/DIST/docs/tutorial/Tutorial.pdf
There are several text-mining tools, but I think they are typically for words commonly present in the same publication (usually in the abstract):
It is not an algorithm per se, but I typically use Google Scholar to browse citations (typically going in the other direction, but I know it can work both ways since that is how it creates your library by default).
ResearchGate also provides citations (in both directions) for publications. For example, I can use it to see papers I have cited and papers ctiing my own papers:
So here is what I came up with, based on helpful comments here and from Twitter. Thanks especially to Peter Cock, Karin Verspoor and Nick Semenkovich.
Apparently, things have progressed a bit at the NIH since the Biopython manual was written, and PubMed can be queried for PMIDs, and not only for PMC-available papers. How far back the ability to retrieve citations of non-PMC papers goes I am not sure. But it does work.
#!/usr/bin/env python import sys from Bio import Entrez as ez ez.email = "email@example.com" def get_citations(pmid): """ Returns the pmids of the papers this paper cites """ cites_list =  handle = ez.efetch("pubmed", id=pmid, retmode="xml") pubmed_rec = ez.parse(handle).next() for ref in pubmed_rec['MedlineCitation']['CommentsCorrectionsList']: if ref.attributes['RefType'] == 'Cites': cites_list.append(str(ref['PMID'])) return cites_list if __name__ == '__main__': z = get_citations(sys.argv) for i in z: print i
So I tried to run this to see which papers the biopython paper (PMID: 19304878) cites:
$ ./my_citations.py 19304878 11975335 10827456 14630660 14681378 14871861 15117750 3162770 7984417 16381881 16377612 17148479 17202161 17562476 18689808 12368254
One of the returned references, 10827456, is a TIGS paper, which is not in PMC.
Not all references were returned. But as far as I could tell, those references that were not returned were references to book chapters & articles that are not indexed in pubmed.
You can use Europe PMC RESTful API for this. The reference module (https://europepmc.org/RestfulWebService#refs) retrieves a count and list of publications referenced in a given publication. Construct the URL using your PMID: http://www.ebi.ac.uk/europepmc/webservices/rest/MED/[PMID]/references. The output format is XML or JSON. Note that not all publications will have reference lists available. To find publications which do, use query=has_reflist:y (http://www.ebi.ac.uk/europepmc/webservices/rest/search?query=has_reflist:y).