A tweet by Peter Grabitz got my attention the other day.
This is worth of a brief investigation. It’s seldom you start an altmetrics project from a topic.
One obvious choice for getting article ID’s is either Web of Science or Scopus, but to go down that path you obviously need to have access to them to start with. Another solution is to query the PubMed API for a list of PMID’s.
Thanks to the helpful posting Hacking on the Pubmed API by Fred Trotter, you are led to the PubMed Advanced Search page. There, you can define your search with a MeSH topic, and filter articles by the publication year.
PubMed knows of 4890 articles on diabetes mellitus, published this year.
As Fred explains, by URLencoding this Search details string and joining it to the base URL, you are ready to approach the API.
The Altmetric result dataset is on Figshare.