epmc_refs() function retrieves only a subset of references for certain papers
Opened this issue · 2 comments
I've been using the epmc_refs() function to fetch references for specific papers. For some paper IDs, it seems that the function only retrieves a subset of the references rather than the complete set. For in stance, this discrepancy has been observed for the paper with ID "36770874".
refs_subset <- epmc_refs("36770874", limit = 1000) #69 records found. Returning 69
Here the full text with 150 references https://europepmc.org/backend/ptpmcrender.fcgi?accid=PMC9921868&blobtype=pdf
Hi @francivita the Europe PMC API just returns 69 records: https://www.ebi.ac.uk/europepmc/webservices/rest/MED/36770874/references?page=1&pageSize=25&format=xml
Seems like the API just returns refeferences with a PMID.
Hi @francivita
Just a follow up. You can also make use of the DOI and query the Crossref API with the ropensci/rcrossref package.
Here is an example, which returns all 150 references. Hope it helps.
# Call Crossref API
library(rcrossref)
cr_df <- rcrossref::cr_works("https://doi.org/10.3390/molecules28031208")
# Get tibble with reference data
cr_df$data$reference
#> [[1]]
#> # A tibble: 150 × 10
#> key unstructured doi.asserted.by first.page DOI article.title volume
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 ref_1 FAO (2021, Nove… <NA> <NA> <NA> <NA> <NA>
#> 2 ref_2 <NA> crossref 1 10.1… Medicinal pl… 27
#> 3 ref_3 Pushpgandhan, P… <NA> <NA> <NA> <NA> <NA>
#> 4 ref_4 Prajapati, N.D.… <NA> <NA> <NA> <NA> <NA>
#> 5 ref_5 <NA> crossref 2373 10.3… Review Stero… 14
#> 6 ref_6 <NA> <NA> 397 <NA> Post-infecti… 93
#> 7 ref_7 <NA> crossref 337 10.1… Distribution… 65
#> 8 ref_8 <NA> <NA> 1 <NA> Therapeutic … 4
#> 9 ref_9 <NA> <NA> 2278 <NA> Botanical, c… 1
#> 10 ref_10 <NA> <NA> 357 <NA> Potential of… 13
#> # ℹ 140 more rows
#> # ℹ 3 more variables: year <chr>, journal.title <chr>, author <chr>
Created on 2023-08-18 with reprex v2.0.2