Digital Object Identifier or DOI was used as a parameter for both Altmetric and Dimensions API calls. In case of success APIs returns JSON-encoded response.
Dimensions metrics API calls look like
https://metrics-api.dimensions.ai/doi/
https://metrics-api.dimensions.ai/pmid/
https://metrics-api.dimensions.ai/id/ PMID (
PubMed identifier or Dimensions ID (identifier in Dimensions database) might be used as API call parameter aside from DOI.
Let's look at Dimensions metrics API response:
{ "doi": "10.1103/physrevmaterials.2.073804",
"times_cited": 0,
"recent_citations": 0,
"highly_cited_1": false,
"highly_cited_5": false,
"highly_cited_10": false,
"relative_citation_ratio": null,
"field_citation_ratio": null,
"license": "This data has been sourced via the Dimensions Metrics API, use of which is subject to the terms at https://dimensions.ai/policies/terms/metrics/. Any use by an unregistered organization is not authorized. Please contact info@dimensions.ai for further information."
} Only 'times_cited' attribute is necessary for widget functionality. Attribute name is pretty self-explanatory - it reflects total number of paper`s citations. More detailed info on returning values from Dimensions metrics API you can find in
the reference.
Altmetric API calls look like
https://api.altmetric.com/v1/citations/<ID>
https://api.altmetric.com/v1/doi/<DOI> It accepts paper`s Altmetric ID or DOI as parameters.
Altmetric API response contains more data than necessary so let's take a look at response fragment with the most valuable attributes:
… "cited_by_posts_count": 160, "cited_by_msm_count": 5, "cited_by_feeds_count": 1, "cited_by_tweeters_count": 106, "cited_by_fbwalls_count": 6, "cited_by_accounts_count": 118, "last_updated": 1531823409, "score": 114.3, … Fragment contains counters for different media sources that will be displayed in widget, date of last update (last time the paper was mentioned in media) in Unix time and Altmetric Attention Score
calculated using counters` weighted values. More details about Altmetric API can be found in
the reference and detailed attributes description can be found in the
following table.