reference_retriever
References and cited-by utilities.
pypaperretriever.reference_retriever.ReferenceRetriever
ReferenceRetriever(
email: str,
doi: Optional[str] = None,
pmid: Optional[str] = None,
standardize: bool = True,
)
Retrieve references and citing articles using a DOI or PMID.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
email
|
str
|
Email address for API access. |
required |
doi
|
str | None
|
Digital Object Identifier. |
None
|
pmid
|
str | None
|
PubMed identifier. |
None
|
standardize
|
bool
|
If |
True
|
Initialize the retriever with either DOI or PMID.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
email
|
str
|
Email for API access |
required |
doi
|
str
|
Digital Object Identifier |
None
|
pmid
|
str
|
PubMed ID |
None
|
Source code in pypaperretriever/reference_retriever.py
fetch_references
Fetch references for the current paper.
Returns:
Type | Description |
---|---|
List[Dict[str, Any]]
|
list[dict[str, Any]]: Reference metadata. |
Raises:
Type | Description |
---|---|
ValueError
|
If neither DOI nor PMID is provided. |
Source code in pypaperretriever/reference_retriever.py
fetch_cited_by
Fetch articles that cite the current paper.
Returns:
Type | Description |
---|---|
List[Dict[str, Any]]
|
list[dict[str, Any]]: Citing article metadata. |
Raises:
Type | Description |
---|---|
ValueError
|
If PMID conversion fails or is not provided. |
Source code in pypaperretriever/reference_retriever.py
get_paper_metadata
Fetch metadata for the current paper.
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
dict[str, Any]: Metadata including identifiers, title and authors. |
Source code in pypaperretriever/reference_retriever.py
get_references_europe
Fetch references from the Europe PMC API.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pmid
|
str
|
PubMed identifier. |
required |
Returns:
Type | Description |
---|---|
List[Dict[str, Any]]
|
list[dict[str, Any]]: Reference metadata. |
Source code in pypaperretriever/reference_retriever.py
get_references_entrez_pubmed
Fetch references from PubMed via Entrez.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pmid
|
str
|
PubMed identifier. |
required |
Returns:
Type | Description |
---|---|
List[Dict[str, Any]]
|
list[dict[str, Any]]: Reference metadata. |
Source code in pypaperretriever/reference_retriever.py
get_references_crossref
Fetch references from the CrossRef API.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
doi
|
str
|
DOI of the paper. |
required |
Returns:
Type | Description |
---|---|
List[Dict[str, Any]]
|
list[dict[str, Any]]: Reference metadata. |
Source code in pypaperretriever/reference_retriever.py
get_citing_articles_europe
Fetch citing articles from the Europe PMC API.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pmid
|
str
|
PubMed identifier. |
required |
Returns:
Type | Description |
---|---|
List[Dict[str, Any]]
|
list[dict[str, Any]]: Citing article metadata. |
Source code in pypaperretriever/reference_retriever.py
get_citing_articles_pubmed
Fetch citing articles from PubMed via Entrez.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pmid
|
str
|
PubMed identifier. |
required |
Returns:
Type | Description |
---|---|
List[Dict[str, Any]]
|
list[dict[str, Any]]: Citing article metadata. |