AD SPACE AVAILABLE · BRAND PARTNERS WELCOME

Integrating the scite REST API: Querying Smart Citation Tallies, Citation Snippets, and DOI Badges in Academic Portals

Clarissa Ang · 365Finds Editorial
Indexed 88,650 Wiki articles

Put 365 Wiki to work with your AI

Copy the prompt below, paste it into the AI you already use, then ask your question.

Download full Skill

Try it with the prompt first. If you use 365 Wiki often, install the full 365Wiki Skill so you do not have to paste it again. No regular AI? Gemini or Microsoft Copilot on the web will work.

365Wiki Skill

Raw citation counts are one of the most persistent vanity metrics in academic publishing. An article displaying "Cited by 450" on an institutional repository or journal portal tells researchers nothing about whether subsequent literature validated its methodology, replicated its findings, or spent a decade systematically debunking its conclusions. A retracted study and a Nobel-winning discovery can look identical on a standard Crossref counter.

At 365Finds, we consider this lack of contextual depth a serious architectural flaw in modern scholarly platforms. Displaying scalar citation numbers creates an information silo that burdens readers with manually combing through dozens of citing PDFs just to assess whether a claim still holds up.

The scite REST API and its native dynamic badge widgets solve this exact deficit. By parsing full-text scientific literature, scite categorizes citation statements into supporting, contrasting, and mentioning contexts. This guide walks engineering teams, university repository maintainers, and bibliometric analysts through integrating https://api.scite.ai—from lightweight client-side dynamic badge embeds to high-concurrency batch tallies and citation snippet retrieval pipelines.


1. The Core Data Model: Targets, Sources, and Tally Mechanics

Before writing a single line of backend glue code, developers must understand how scite structures scholarly citations. Standard indexing treats citations as simple directed graph edges (Paper A -> Paper B). In contrast, scite operates on extracted textual statements within the full text of citing articles.

Target vs. Source

In scite API terminology:

Endpoints follow this orientation strictly. Requesting citing/{doi} returns source papers that reference the target DOI, while cited_by/{doi} yields the targets cited within that source.

The Four Smart Citation Classifications

When scite's deep-learning models classify an in-text citation snippet, they assign one of four stances:

The Critical Metric Trap: Tallies vs. citingPublications

The most common mistake 365Finds observes among engineers implementing scite is conflating total tallies with citingPublications. They are distinct measurements originating from different datasets:

+------------------------------------------------------------------------+
| scite Citation Metrics Difference                                      |
+------------------------------------------------------------------------+
| Tally Counts (total = supporting + contradicting + mentioning + ...)   |
| -> Measures individual classified CITATION STATEMENTS.                 |
| -> A single paper can cite a target multiple times across sections.    |
+------------------------------------------------------------------------+
| citingPublications                                                     |
| -> Measures distinct physical PAPERS in the broad citation graph.      |
| -> Can include papers where full text was unavailable for extraction.  |
+------------------------------------------------------------------------+

Because of this structural distinction:

Never write UI logic that assumes supporting + contradicting + mentioning = citingPublications. They represent statements versus documents.


2. Fast-Track Frontend: Embedding Dynamic DOI Badges

For university repositories (e.g., DSpace, EPrints) and publishing landing pages requiring zero server overhead, scite provides pre-built dynamic badge embeds via its CDN.

Basic Citation Type Badge

The Citation Type Badge renders a clean visual indicator displaying color-coded tallies (green for supporting, blue for mentioning, dark orange/red for contrasting):

<!-- Load the scite badge runtime once in your page template -->
<script async type="application/javascript" src="https://cdn.scite.ai/badge/scite-badge-latest.min.js"></script>

<!-- Target container for the dynamic badge -->
<div class="scite-badge"
     data-doi="10.1016/j.biopsych.2005.08.012"
     data-layout="horizontal"
     data-show-zero="true"
     data-show-labels="true"
     data-tally-show="true"
     data-tooltip-placement="auto">
</div>

Configurable HTML Data Attributes

AttributeAccepted ValuesDefaultPurpose
data-doiValid DOI stringNoneThe target publication identifier.
data-doi-from-metatrue, falsefalseAutomatically extracts the DOI from <meta name="citation_doi">.
data-layoutvertical, horizontalhorizontalControls whether metrics stack or sit side-by-side.
data-show-labelstrue, falsetrueShows textual descriptions alongside icon tallies.
data-show-zerotrue, falsefalseWhen false, categories with 0 citations are omitted to save visual space.
data-smalltrue, falsefalseRenders a compact footprint suitable for dense search result tables.
data-section-tally-showtrue, falsefalseToggles the section distribution breakdown widget.
data-chart-typedonut, bardonutChart visualization style for section tallies.

Section Badge Embed

If your users care where citations occur (for instance, distinguishing between citations in the Introduction versus citations in the Results or Methods), embed the section widget:

<div class="scite-badge"
     data-doi="10.1016/j.biopsych.2005.08.012"
     data-tally-show="false"
     data-section-tally-show="true"
     data-section-tally-layout="vertical"
     data-chart-type="donut"
     data-show-labels="true">
</div>

[!NOTE] Scite badges are free for personal web pages and self-authored publications. Academic publishers, university libraries, and platform vendors deploying badges at scale across institutional portals are required to register usage with scite (customersupport@researchsolutions.com).


3. Querying Smart Citation Tallies via REST API

When building custom UI designs, indexing citation metrics into an internal search engine (like Elasticsearch or OpenSearch), or aggregating metrics for institutional reporting, you must query https://api.scite.ai directly.

Authentication

Endpoints require an API key generated from the scite API Console (https://scite.ai/users/me/api). Pass this token as an HTTP Bearer header:

Authorization: Bearer <YOUR_API_KEY>

Fetching a Single DOI Tally

To inspect a single paper, issue a GET request against /tallies/{doi}:

curl -X GET 'https://api.scite.ai/tallies/10.1038/nature12373' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json'

JSON Response Schema:

{
  "doi": "10.1038/nature12373",
  "total": 412,
  "supporting": 25,
  "contradicting": 2,
  "mentioning": 350,
  "unclassified": 35,
  "citingPublications": 380
}

High-Throughput Bulk Ingestion: POST /tallies

Querying single DOIs in a sequential loop across a repository of 100,000 papers is an operational disaster. Instead, scite provides a batch endpoint accepting up to 500 DOIs per payload:

curl -X POST 'https://api.scite.ai/tallies' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "dois": [
      "10.1038/nature12373",
      "10.1126/science.1157784",
      "10.1016/j.biopsych.2005.08.012"
    ]
  }'

The response is a JSON dictionary keyed by DOI:

{
  "10.1038/nature12373": {
    "doi": "10.1038/nature12373",
    "total": 412,
    "supporting": 25,
    "contradicting": 2,
    "mentioning": 350,
    "unclassified": 35,
    "citingPublications": 380
  },
  "10.1126/science.1157784": {
    "doi": "10.1126/science.1157784",
    "total": 128,
    "supporting": 14,
    "contradicting": 0,
    "mentioning": 105,
    "unclassified": 9,
    "citingPublications": 110
  }
}

4. Extracting Citation Snippets and In-Text Context

Tallies provide quantitative signals, but evidence requires qualitative verification. When a portal user clicks on "2 Contrasting Citations", they need to see exactly what the citing authors wrote.

Browsing the Citation Graph

To retrieve individual citation statements, query the citation graph endpoints:

curl -X GET 'https://api.scite.ai/api_partner/citations/citing/10.1038/nature12373?limit=20&offset=0' \
  -H 'Authorization: Bearer YOUR_API_KEY'

Detailed Citation Statement Object:

{
  "metadata": {
    "total": 412,
    "limit": 20,
    "offset": 0
  },
  "citations": [
    {
      "source": "10.1126/science.example_citing_paper",
      "target": "10.1038/nature12373",
      "type": "contradicting",
      "section": "discussion",
      "snippet": "Contrary to the observations reported in Nature by Smith et al. (2013), our repeated trials failed to demonstrate significant protein suppression under identical thermal parameters."
    },
    {
      "source": "10.1073/pnas.example_support",
      "target": "10.1038/nature12373",
      "type": "supporting",
      "section": "results",
      "snippet": "These data corroborate the kinetic behavior previously documented by Smith et al., establishing that pathway acceleration occurs within the first 120 seconds."
    }
  ]
}

Key Elements for Portal UI Rendering

When transforming this payload for frontend display:

  1. Highlight the Sentiment Badge: Render a prominent tag for type (supporting in green, contradicting in amber/red).
  2. Expose the section Field: Citations occurring in the results or discussion sections carry vastly higher argumentative weight than a passing reference in the introduction.
  3. Display the Full snippet: The textual excerpt provides surrounding context, shielding researchers from quoting errors or misunderstandings without forcing them to download the source paper immediately.

5. Industrial Architecture: Caching, Rate Limits, and Data Pipelines

At 365Finds, our firm recommendation for production portals is unequivocal: never query the scite REST API on the synchronous HTTP request path of your public article pages.

Doing so introduces external latency, violates rate limits during traffic spikes, and risks rendering broken article pages if third-party network connectivity degrades. Instead, implement an asynchronous ingest and read-through caching topology.

[Academic User Browser]
        |
        v
[Portal Reverse Proxy / Web App]
        |
        +---> Read Cached Tally (Redis / PostgreSQL)  <--- High Speed (< 5ms)
        |
        +---> (Optional) On-Click Fetch Snippets Modal
                    |
                    v
         [Internal API Gateway Cache]
                    |  (Cache Miss)
                    v
         [scite REST API (api.scite.ai)]

1. Rate Limit Enforcement

The scite API communicates active limits through response headers:

RateLimit-Limit: 100
RateLimit-Remaining: 84
RateLimit-Reset: 12
X-RateLimit-Limit-Minute: 1000
X-RateLimit-Remaining-Minute: 920

Your ingestion client must parse these headers. If you receive an HTTP 429 Too Many Requests:

2. Tiered Caching Strategy

3. Graceful UI Fallbacks

If a paper is newly published, pre-printed, or outside scite's indexed collection, /tallies/{doi} may return a 404 Not Found or empty counts (total: 0).


6. Implementation Reference: Python Ingestion Worker

The following standalone Python module demonstrates an enterprise-grade batch pipeline for fetching and staging scite tallies with error handling and chunking:

import time
import requests
from typing import Dict, List, Optional

class SciteIngestionPipeline:
    def __init__(self, api_key: str, base_url: str = "https://api.scite.ai"):
        self.base_url = base_url
        self.session = requests.Session()
        self.session.headers.update({
            "Authorization": f"Bearer {api_key}",
            "Content-Type": "application/json",
            "Accept": "application/json"
        })

    def fetch_batch_tallies(self, dois: List[str], chunk_size: int = 500) -> Dict[str, dict]:
        """
        Splits DOI list into chunks of up to 500 items and posts to /tallies.
        """
        aggregated_results = {}
        
        for i in range(0, len(dois), chunk_size):
            chunk = dois[i:i + chunk_size]
            url = f"{self.base_url}/tallies"
            payload = {"dois": chunk}
            
            retries = 3
            while retries > 0:
                try:
                    response = self.session.post(url, json=payload, timeout=30)
                    
                    if response.status_code == 200:
                        aggregated_results.update(response.json())
                        break
                    elif response.status_code == 429:
                        reset_seconds = int(response.headers.get("RateLimit-Reset", 5))
                        time.sleep(reset_seconds + 1)
                        retries -= 1
                    elif response.status_code in (401, 403):
                        raise PermissionError(f"Scite API authorization error: {response.text}")
                    else:
                        response.raise_for_status()
                except requests.RequestException as exc:
                    retries -= 1
                    if retries == 0:
                        print(f"Failed to fetch chunk starting at index {i}: {exc}")
                    time.sleep(2)
                    
        return aggregated_results

# Example usage:
if __name__ == "__main__":
    PIPELINE = SciteIngestionPipeline(api_key="YOUR_PRODUCTION_API_KEY")
    SAMPLE_DOIS = [
        "10.1038/nature12373",
        "10.1126/science.1157784",
        "10.1016/j.biopsych.2005.08.012"
    ]
    tally_data = PIPELINE.fetch_batch_tallies(SAMPLE_DOIS)
    for doi, stats in tally_data.items():
        print(f"DOI: {doi} -> Supporting: {stats.get('supporting')}, Contrasting: {stats.get('contradicting')}")

Connecting your academic portal to scite replaces opaque numeric metrics with empirical controversy awareness. By combining the zero-config client badge for immediate frontend deployment with an asynchronous batch pipeline for deep metric indexing, your platform provides researchers with immediate visibility into whether scientific claims stand supported, contested, or simply repeated.


References