Skip to contents

Queries the public APIs of ORCID, OpenAlex, DataCite and the OpenAIRE Graph. A source that fails or times out is reported in consulted with its error; it never stops the collection. Up to 1000 works are read from OpenAlex and OpenAIRE, and 1000 DOIs from DataCite.

Usage

nc_collect(
  orcid,
  sources = nc_sources,
  timeout = 30,
  mailto = getOption("narrativecv.mailto")
)

Arguments

orcid

An ORCID iD (bare or as a URL).

sources

Sources to query; any of "orcid", "openalex", "datacite", "openaire".

timeout

Seconds before a request is abandoned.

mailto

Optional contact e-mail sent to OpenAlex, which gives access to its faster "polite pool". Defaults to the option narrativecv.mailto.

Value

A list with evidence (evidence items, see normalize) and consulted (one entry per source with ok, count, error and retrieved_at).

Examples

# \donttest{
got <- nc_collect("0000-0002-1825-0097", sources = "orcid")
got$consulted
#> [[1]]
#> [[1]]$source
#> [1] "orcid"
#> 
#> [[1]]$ok
#> [1] TRUE
#> 
#> [[1]]$count
#> [1] 10
#> 
#> [[1]]$error
#> NULL
#> 
#> [[1]]$retrieved_at
#> [1] "2026-11-04T08:49:16Z"
#> 
#> 
# }