paper_firehose.core.apis¶
API client modules for fetching abstracts from various sources.
This package provides a unified interface for fetching abstracts from: - Crossref - Semantic Scholar - OpenAlex - PubMed
- paper_firehose.core.apis.get_crossref_abstract(doi, *, mailto, max_retries=3, session=None)[source]¶
Return the plain-text abstract for DOI or None if not available.
Implements exponential backoff on 429/5xx and honors Retry-After when present. Also sends Crossref the mailto parameter.
- Parameters:
- Return type:
- Returns:
Plain-text abstract or None if not available
- paper_firehose.core.apis.get_openalex_abstract(doi, *, mailto, session=None)[source]¶
Fetch an abstract from OpenAlex by DOI, reconstructing when inverted-indexed.
- paper_firehose.core.apis.get_pubmed_abstract_by_doi(doi, *, session=None)[source]¶
Look up a DOI in PubMed and return the combined abstract text if available.
Uses ESearch to find PMID by DOI, then EFetch to retrieve the abstract XML.
- paper_firehose.core.apis.get_semantic_scholar_abstract(doi, *, session=None)[source]¶
Fetch abstract from Semantic Scholar Graph API by DOI (no key needed).
- paper_firehose.core.apis.search_crossref_abstract_by_title(title, *, mailto, max_retries=2, session=None)[source]¶
Best-effort abstract lookup by title when DOI is missing or returns no abstract.
Uses Crossref’s works search endpoint with a bibliographic query. Returns the first item’s abstract if available.
- Parameters:
- Return type:
- Returns:
Plain-text abstract or None if not available
Modules
Crossref API client for fetching paper abstracts. |
|
OpenAlex API client for fetching paper abstracts. |
|
PubMed API client for fetching paper abstracts. |
|
Semantic Scholar API client for fetching paper abstracts. |