Bulk data can be accessed at the iCite database snapshot repository.
/api/pubs
List publications, including data about each one.
Optional query parameters:
limit
: how many publications to return. The maximum allowed is 1000.offset
: only return publications with a PMID greater than this.year
: only return publications from the given year.pmids
: only return publications with the given PubMed IDs. Separate multiple IDs with commas to request up to 1000 at a time. If this parameter is provided, all other parameters are ignored.fl
: only return publications with the given fields. Separate multiple fields with commas (no space). Field names are very specific and listed in Response example below. No fl param will return all fields.format
: return data as a csv (comma separated value) by specifying format=csv rather than the default JSON.
Example: /api/pubs?offset=23456789&limit=10&format=csv
/api/pubs?pmids=28968381,28324054,23843509&fl=pmid,year,title,apt,relative_citation_ratio,cited_by_clin
/api/pubs/{pmid}
Get data on a specific publication.
Example: /api/pubs/23456789
/api/pubs?pmids={pmid1,pmid2...}
Get data on multiple specific publications.
Example: /api/pubs?pmids=23456789,27599104
Example: /api/pubs?pmids=23456789,27599104
Get the data for a specific PMID by visiting
/api/pubs/23456789
:
{ pmid: 23456789 year: 2013 title: "Hospital volume is associated with survival but not multimodality therapy in Medicare patients with advanced head and neck cancer." authors: "Arun Sharma, Stephen M Schwartz, Eduardo Méndez" journal: "Cancer" is_research_article: "Yes" relative_citation_ratio: 1.73 nih_percentile: 70.3 human: 1 animal: 0 molecular_cellular: 0 apt: 0.75 is_clinical: "No" citation_count: 26 citations_per_year: 4.33333333333333 expected_citations_per_year:2.50953735885351 field_citation_rate: 4.87055203724375 provisional: "No" x_coord: 0 y_coord: 1 cited_by_clin: [] cited_by: […] references: […] doi: "10.1002/cncr.27976" last_modified: "05/15/2022, 01:32:57" }
# If iCiteR is not installed, # install it with: install.packages("iCiteR") library(iCiteR) papers = get_metrics(c(23456789,27599104)) print(papers)
import requests response = requests.get( "/".join([ "https://icite.od.nih.gov/api", "pubs", "23456789", ]), ) pub = response.json() print(pub)
var request = new XMLHttpRequest(); request.open( "GET", [ "https://icite.od.nih.gov/api", "pubs", "23456789", ].join("/") ); request.responseType = "json"; request.onload = function () { console.log(request.response); }; request.send();
By default, responses are JSON.
CSV responses are supported as well and can be requested via Accept: text/csv
.
If user wants to generate search link programmatically, the Python code below demonstrates one way to do that.
Code Example
import requests import json def create_link(pmid_str): base_url = "https://icite.od.nih.gov" result_url_base = "https://icite.od.nih.gov/results" try: # Step 1: Submit PMIDs to get a search ID headers = {'Content-Type': 'application/json'} payload = {'pmidText': pmid_str} response = requests.post(base_url + "/searchid", headers=headers, json=payload) response.raise_for_status() # Raise an error for HTTP status codes 4xx/5xx data = response.json() search_id = data.get('search_id') if not search_id: raise ValueError('Search ID not found in response') # Step 2: Use the search ID to get results result_url = f"{result_url_base}?search_id={search_id}" return result_url except requests.exceptions.RequestException as e: print(f"Request error: {e}") raise
Please send any feedback to iCite@mail.nih.gov.