Learn R Programming

orcidtr (version 0.1.0)

orcid_works: Retrieve works (publications) from ORCID

Description

Fetches work records (publications, datasets, preprints, etc.) for a given ORCID identifier from the ORCID public API. Returns a structured data.table with work details including titles, types, DOIs, and publication dates.

Usage

orcid_works(orcid_id, token = NULL)

Value

A data.table with the following columns:

orcid

ORCID identifier

put_code

Unique identifier for this work record

title

Title of the work

type

Type of work. Common values include: "journal-article", "conference-paper", "conference-poster", "book", "book-chapter", "dissertation", "data-set", "preprint", "report", "working-paper", "other". Use this field to distinguish between different publication types.

publication_date

Publication date (ISO format)

journal

Journal or venue name (if available)

doi

Digital Object Identifier (if available)

url

URL to the work (if available)

Returns an empty data.table with the same structure if no works are found.

Arguments

orcid_id

Character string. A valid ORCID identifier in the format XXXX-XXXX-XXXX-XXXX. Can also handle URLs like https://orcid.org/XXXX-XXXX-XXXX-XXXX.

token

Character string or NULL. Optional API token for authenticated requests. If NULL (default), checks the ORCID_TOKEN environment variable. Most public data is accessible without authentication.

Details

This function queries the ORCID public API endpoint: https://pub.orcid.org/v3.0/{orcid-id}/works

Works can include journal articles, books, datasets, conference papers, preprints, posters, and other scholarly outputs. The type field indicates the specific category of each work.

The function respects ORCID API rate limits and includes appropriate User-Agent headers identifying the orcidtr package.

References

ORCID API Documentation: https://info.orcid.org/documentation/api-tutorials/

See Also

orcid_employments, orcid_funding, orcid_fetch_record

Examples

Run this code
if (FALSE) {
# Fetch works for a public ORCID
works <- orcid_works("0000-0002-1825-0097")
print(works)

# Filter by type to distinguish between different publication types
journal_articles <- works[type == "journal-article"]
conference_posters <- works[type == "conference-poster"]
datasets <- works[type == "data-set"]
preprints <- works[type == "preprint"]

# With authentication
Sys.setenv(ORCID_TOKEN = "your-token-here")
works <- orcid_works("0000-0002-1825-0097")
}

Run the code above in your browser using DataLab