---
name: opencitations-api-ingestion
description: "How to get OpenCitations Index and Meta API data into a pandas DataFrame and Parquet: access, the request, the format, limits, quirks and terms."
---

# Load the citations to one DOI from OpenCitations into pandas and Parquet

Source entry: https://signal-lab-jet.vercel.app/datasets/opencitations-api
Provider: https://api.opencitations.net/
Checked against the provider's documentation: 2026-11-03

## Access
- No token needed; set OPENCITATIONS_TOKEN to send a free access token in the authorization header, as OpenCitations encourages for code.
- Index API base https://api.opencitations.net/index/v2 (operations such as citations/doi:..., references/doi:..., citation-count/doi:...).

## Request
```bash
curl 'https://api.opencitations.net/index/v2/citations/doi:10.1093/rfs/hhaa009'
```

## Format
A JSON array (or CSV with format=csv) with one row per citation: oci, citing, cited, creation, timespan, journal_sc and author_sc. citing and cited list identifiers such as omid:, doi: and pmid:, separated by spaces.

## Load into pandas and Parquet
Needs Python 3 with requests, pandas and pyarrow.
```python
"""OpenCitations Index: citations to one DOI -> pandas -> Parquet. No token needed (an optional free access token is encouraged)."""
import os
import requests
import pandas as pd

DOI = "10.1093/rfs/hhaa009"
headers = {"authorization": os.environ["OPENCITATIONS_TOKEN"]} if os.environ.get("OPENCITATIONS_TOKEN") else {}
r = requests.get(f"https://api.opencitations.net/index/v2/citations/doi:{DOI}", headers=headers, timeout=90)
r.raise_for_status()
df = pd.DataFrame(r.json())
df.to_parquet("opencitations_citations.parquet", index=False)
print(len(df), "citations to", DOI, "; columns:", ",".join(df.columns))
```
Run by us on 2026-11-03 (python 3.13.5 | pandas 3.1.0 | pyarrow 26.0.0 | requests 2.34.2). Result: 1940 citations to 10.1093/rfs/hhaa009 ; columns: oci,citing,cited,creation,timespan,journal_sc,author_sc

## Limits
- 180 requests per minute per IP address.
- Use the database dumps at download.opencitations.net for large-scale retrieval.

## Quirks
- citing and cited hold several identifiers in one string; split on spaces and pick the doi: one.
- timespan is an ISO 8601 duration such as P2Y3M, and creation can be a year or a full date.

## Terms and attribution
- All OpenCitations data is CC0 and may be reused for any purpose, including commercial purposes.
- Terms page: https://opencitations.net/

## Sources
- https://api.opencitations.net/index/v2: "API calls are rate-limited to 180 requests/minute per IP address to ensure fair usage and service availability."
- https://opencitations.net/: "The data held in any of the OpenCitations datasets are available under a Creative Commons public domain dedication (CC0)."
- https://api.opencitations.net/index/v2: "All the present operations return either a JSON document (default) or a CSV document according to the mimetype specified in the Accept header of the request."

## Help improve this skill
Missing a source, or see something to improve? Call the MCP tool suggest_source or feedback (or POST /api/suggest or /api/feedback). Reviewed ideas: https://signal-lab-jet.vercel.app/agent-suggestions

Information for educational purposes only. Free tiers, limits and licenses belong to the providers and may change; check the provider's own terms before using the data.
