Title: Retrieve Data from the ORCID Public API
Version: 0.1.0
Description: Provides functions to retrieve public data from ORCID (Open Researcher and Contributor ID) records via the ORCID public API. Fetches employment history, education, works (publications, datasets, preprints), funding, peer review activities, and other public information. Returns data as structured data.table objects for easy analysis and manipulation. Replaces the discontinued 'rorcid' package with a modern, CRAN-compliant implementation.
License: MIT + file LICENSE
URL: https://github.com/lorenzoFabbri/orcidtr
BugReports: https://github.com/lorenzoFabbri/orcidtr/issues
Depends: R (≥ 4.1.0)
Imports: data.table (≥ 1.14.0), httr2 (≥ 1.0.0), jsonlite (≥ 1.8.0)
Suggests: testthat (≥ 3.0.0), withr, knitr, rmarkdown
Config/testthat/edition: 3
Encoding: UTF-8
RoxygenNote: 7.3.3
VignetteBuilder: knitr
NeedsCompilation: no
Packaged: 2026-01-10 10:29:30 UTC; lorenzo
Author: Lorenzo Fabbri [aut, cre]
Maintainer: Lorenzo Fabbri <lorenzo.fabbri92sm@gmail.com>
Repository: CRAN
Date/Publication: 2026-01-15 17:40:16 UTC

orcidtr: Retrieve Data from the ORCID Public API

Description

Provides functions to retrieve public data from ORCID (Open Researcher and Contributor ID) records via the ORCID public API. Fetches employment history, education, works (publications, datasets, preprints), funding, peer review activities, and other public information. Returns data as structured data.table objects for easy analysis and manipulation. Replaces the discontinued 'rorcid' package with a modern, CRAN-compliant implementation.

The orcidtr package provides a modern, CRAN-compliant interface to the ORCID public API. It allows you to retrieve employment history, education records, publications, funding information, and peer review activities from ORCID researcher profiles.

Main Functions

Authentication

Most public data is accessible without authentication. To use an optional API token, set the ORCID_TOKEN environment variable:

Sys.setenv(ORCID_TOKEN = "your-token-here")

Package Design

Author(s)

Maintainer: Lorenzo Fabbri lorenzo.fabbri92sm@gmail.com

References

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

See Also

Useful links:

Examples

## Not run: 
# Fetch works for an ORCID
works <- orcid_works("0000-0002-1825-0097")

# Fetch complete record
record <- orcid_fetch_record("0000-0002-1825-0097")

# Batch fetch works for multiple ORCIDs
orcids <- c("0000-0002-1825-0097", "0000-0003-1419-2405")
all_works <- orcid_fetch_many(orcids, section = "works")

## End(Not run)


Search ORCID registry

Description

Search for ORCID profiles using Apache Solr query syntax. This function provides direct access to the ORCID search API with full query capabilities.

Usage

orcid(query = NULL, rows = 10, start = 0, token = NULL, ...)

Arguments

query

Character string. Solr query string (e.g., "keyword:ecology", "family-name:Smith AND given-names:John"). If NULL, returns empty results.

rows

Integer. Number of results to return (default: 10, max: 1000).

start

Integer. Starting position for pagination (default: 0).

token

Character string or NULL. Optional API token. Most searches work without authentication.

...

Additional parameters passed to the API request.

Details

This function queries the ORCID search endpoint: https://pub.orcid.org/v3.0/expanded-search

The expanded-search endpoint returns name information along with ORCID IDs, unlike the basic search endpoint which only returns identifiers.

Query Field Examples:

Boolean Operators: Use AND, OR, NOT for complex queries: "family-name:Smith AND affiliation-org-name:Harvard"

Value

A data.table with columns:

orcid_id

ORCID identifier

given_names

Given name(s)

family_name

Family name

credit_name

Credit/published name

other_names

Alternative names (list column)

Returns empty data.table if no results found. The total number of matches is available as attr(result, "found").

References

ORCID API Search Documentation: https://info.orcid.org/documentation/api-tutorials/api-tutorial-searching-the-orcid-registry/

See Also

orcid_search for a more user-friendly interface, orcid_doi for DOI-specific searches

Examples

## Not run: 
# Search by keyword
results <- orcid("keyword:ecology", rows = 20)
print(results)
attr(results, "found")  # Total number of matches

# Search by name
results <- orcid("family-name:Fabbri AND given-names:Lorenzo")

# Search by affiliation
results <- orcid("affiliation-org-name:Stanford")

# Search by DOI
results <- orcid("digital-object-ids:10.1371/*")

# Pagination
page1 <- orcid("keyword:genomics", rows = 10, start = 0)
page2 <- orcid("keyword:genomics", rows = 10, start = 10)

## End(Not run)


Retrieve activities summary from ORCID

Description

Fetches a comprehensive summary of all activities for an ORCID identifier in a single API call. This is more efficient than calling individual endpoints when you need multiple activity types.

Usage

orcid_activities(orcid_id, token = NULL)

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.

Details

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

This endpoint provides summary information for all activity types in a single request, which is more efficient than making multiple individual requests. However, the summaries contain less detail than the full individual records.

Value

A named list with data.table elements for each activity section:

distinctions

Distinctions/awards summary

educations

Education history summary

employments

Employment history summary

invited_positions

Invited positions summary

memberships

Professional memberships summary

qualifications

Qualifications/licenses summary

services

Service activities summary

fundings

Funding records summary

peer_reviews

Peer review activities summary

research_resources

Research resources summary

works

Works/publications summary

Empty data.tables are returned for sections with no data.

References

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

See Also

orcid_fetch_record, orcid_person

Examples

## Not run: 
# Fetch all activities
activities <- orcid_activities("0000-0002-1825-0097")
names(activities)

# Access specific sections
activities$works
activities$employments
activities$fundings

## End(Not run)


Retrieve address information from ORCID

Description

Fetches address/country information associated with an ORCID record.

Usage

orcid_address(orcid_id, token = NULL)

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.

Details

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

Value

A data.table with the following columns:

orcid

ORCID identifier

put_code

Unique identifier for this address

country

Country code

Returns an empty data.table with the same structure if no address information is found.

References

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

See Also

orcid_person

Examples

## Not run: 
# Fetch address information
address <- orcid_address("0000-0002-1825-0097")
print(address)

## End(Not run)


Retrieve biography from ORCID

Description

Fetches just the biography/about text for an ORCID record. This is a simplified alternative to orcid_person when you only need the biography text.

Usage

orcid_bio(orcid_id, token = NULL)

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.

Details

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

Value

A data.table with the following columns:

orcid

ORCID identifier

biography

Biography text

visibility

Visibility setting (public, limited, private)

Returns a data.table with NA biography if not available.

References

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

See Also

orcid_person

Examples

## Not run: 
# Fetch biography only
bio <- orcid_bio("0000-0002-1825-0097")
print(bio$biography)

## End(Not run)


Retrieve distinctions from ORCID

Description

Fetches distinction records (awards, honors, recognitions) for an ORCID identifier. Returns structured data similar to employments and educations.

Usage

orcid_distinctions(orcid_id, token = NULL)

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.

Details

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

Value

A data.table with the following columns:

orcid

ORCID identifier

put_code

Unique identifier for this distinction record

organization

Name of the awarding organization

department

Department name (if available)

role

Award or distinction title

start_date

Award/distinction date (ISO format)

end_date

End date (ISO format, if applicable)

city

City of organization

region

State/region of organization

country

Country of organization

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

References

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

See Also

orcid_employments, orcid_educations, orcid_activities

Examples

## Not run: 
# Fetch distinctions
distinctions <- orcid_distinctions("0000-0002-1825-0097")
print(distinctions)

## End(Not run)


Search ORCID by DOI

Description

Search for ORCID profiles associated with specific DOIs. This is a convenience wrapper around orcid for DOI-based searches.

Usage

orcid_doi(dois, fuzzy = FALSE, rows = 10, token = NULL)

Arguments

dois

Character vector. One or more DOIs to search for.

fuzzy

Logical. Use fuzzy matching for DOI search (default: FALSE). Fuzzy matching allows partial DOI matches.

rows

Integer. Number of results per DOI (default: 10).

token

Character string or NULL. Optional API token.

Details

This function searches the digital-object-ids field in the ORCID registry. When fuzzy = TRUE, wildcard matching is used to find partial DOI matches.

Value

A named list where each element corresponds to a DOI and contains a data.table of search results. If only one DOI is provided, returns the data.table directly. Empty data.tables are returned for DOIs with no matches.

See Also

orcid, orcid_search

Examples

## Not run: 
# Search by single DOI
results <- orcid_doi("10.1371/journal.pone.0025995")
print(results)

# Search by multiple DOIs
dois <- c("10.1038/nature12373", "10.1126/science.1260419")
results <- orcid_doi(dois)
names(results)

# Fuzzy search (partial DOI)
results <- orcid_doi("10.1371/*", fuzzy = TRUE, rows = 20)

## End(Not run)


Retrieve education history from ORCID

Description

Fetches education records for a given ORCID identifier from the ORCID public API. Returns a structured data.table with education history including institutions, degrees, departments, and dates.

Usage

orcid_educations(orcid_id, token = NULL)

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}/educations

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

Value

A data.table with the following columns:

orcid

ORCID identifier

put_code

Unique identifier for this education record

organization

Name of the educational institution

department

Department name (if available)

role

Degree or program name

start_date

Education start date (ISO format)

end_date

Education end date (ISO format)

city

City of institution

region

State/region of institution

country

Country of institution

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

References

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

See Also

orcid_employments, orcid_works, orcid_fetch_record

Examples

## Not run: 
# Fetch education history for a public ORCID
edu <- orcid_educations("0000-0002-1825-0097")
print(edu)

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

## End(Not run)


Retrieve email information from ORCID

Description

Fetches email addresses associated with an ORCID record. Note that email addresses are typically private and require authentication to access.

Usage

orcid_email(orcid_id, token = NULL)

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. API token for authenticated requests. If NULL (default), checks the ORCID_TOKEN environment variable. Email addresses usually require authentication.

Details

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

Email addresses are typically private and will only be returned if you have appropriate authentication permissions.

Value

A data.table with the following columns:

orcid

ORCID identifier

email

Email address

primary

Logical indicating if this is the primary email

verified

Logical indicating if the email is verified

visibility

Visibility setting

Returns an empty data.table with the same structure if no emails are found or accessible.

References

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

See Also

orcid_person

Examples

## Not run: 
# Fetch email (requires authentication)
Sys.setenv(ORCID_TOKEN = "your-token-here")
email <- orcid_email("0000-0002-1825-0097")
print(email)

## End(Not run)


Retrieve employment history from ORCID

Description

Fetches employment records for a given ORCID identifier from the ORCID public API. Returns a structured data.table with employment history including organization names, roles, departments, and dates.

Usage

orcid_employments(orcid_id, token = NULL)

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}/employments

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

Value

A data.table with the following columns:

orcid

ORCID identifier

put_code

Unique identifier for this employment record

organization

Name of the employing organization

department

Department name (if available)

role

Job title or role

start_date

Employment start date (ISO format)

end_date

Employment end date (ISO format, NA if current)

city

City of organization

region

State/region of organization

country

Country of organization

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

References

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

See Also

orcid_educations, orcid_works, orcid_fetch_record

Examples

## Not run: 
# Fetch employment history for a public ORCID
emp <- orcid_employments("0000-0002-1825-0097")
print(emp)

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

## End(Not run)


Retrieve external identifiers from ORCID

Description

Fetches external identifier mappings for an ORCID record, such as Scopus Author ID, ResearcherID, Loop profile, and other researcher identification systems.

Usage

orcid_external_identifiers(orcid_id, token = NULL)

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.

Details

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

Value

A data.table with the following columns:

orcid

ORCID identifier

put_code

Unique identifier for this external ID

external_id_type

Type of external identifier (e.g., "Scopus Author ID")

external_id_value

The identifier value

external_id_url

URL to the external profile (if available)

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

References

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

See Also

orcid_person

Examples

## Not run: 
# Fetch external identifiers
ext_ids <- orcid_external_identifiers("0000-0002-1825-0097")
print(ext_ids)

## End(Not run)


Retrieve records for multiple ORCID identifiers

Description

Fetches data for multiple ORCID identifiers. This is a convenience function that loops over a vector of ORCID iDs and fetches the specified section(s) for each. Results are combined into a single data.table.

Usage

orcid_fetch_many(
  orcid_ids,
  section = "works",
  token = NULL,
  stop_on_error = FALSE
)

Arguments

orcid_ids

Character vector. Valid ORCID identifiers in the format XXXX-XXXX-XXXX-XXXX. Can also handle URLs like https://orcid.org/XXXX-XXXX-XXXX-XXXX.

section

Character string. Section to fetch. One of: "employments", "educations", "distinctions", "invited-positions", "memberships", "qualifications", "services", "research-resources", "works", "funding", or "peer-reviews".

token

Character string or NULL. Optional API token for authenticated requests. If NULL (default), checks the ORCID_TOKEN environment variable.

stop_on_error

Logical. If TRUE, stops on the first error. If FALSE (default), continues processing and returns results for successful requests, issuing warnings for failures.

Details

This function makes one API request per ORCID identifier. Be mindful of rate limits when fetching data for many ORCIDs.

The function validates each ORCID identifier and normalizes formats before making requests.

For rate limit compliance, consider adding delays between large batches or using authenticated requests which typically have higher rate limits.

Value

A data.table combining results from all successful requests. The orcid column identifies which ORCID each row belongs to.

References

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

See Also

orcid_fetch_record, orcid_works, orcid_employments

Examples

## Not run: 
# Fetch works for multiple ORCIDs
orcids <- c("0000-0002-1825-0097", "0000-0003-1419-2405")
works <- orcid_fetch_many(orcids, section = "works")
print(works)

# Fetch employments for multiple ORCIDs
employments <- orcid_fetch_many(orcids, section = "employments")

# Stop on first error
works <- orcid_fetch_many(orcids, section = "works", stop_on_error = TRUE)

## End(Not run)


Retrieve complete ORCID record

Description

Fetches all public data for a given ORCID identifier, including employments, education, works, funding, and peer reviews. Returns a named list of data.table objects.

Usage

orcid_fetch_record(
  orcid_id,
  token = NULL,
  sections = c("employments", "educations", "works", "funding", "peer-reviews")
)

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.

sections

Character vector. Sections to fetch. Default is the most commonly used sections: c("employments", "educations", "works", "funding", "peer-reviews"). Available sections are:

  • Affiliations: "employments", "educations", "distinctions", "invited-positions", "memberships", "qualifications", "services", "research-resources"

  • Activities: "works", "funding", "peer-reviews"

  • Biographical: "person", "bio", "keywords", "researcher-urls", "external-identifiers", "other-names", "address", "email"

You can specify a subset to fetch only specific sections.

Details

This is a convenience function that calls individual API functions for each section. Each section requires a separate API request.

To minimize API calls, specify only the sections you need using the sections parameter.

Value

A named list with the following possible elements (each a data.table):

employments

Employment history

educations

Education history

distinctions

Distinctions and honors

invited_positions

Invited positions

memberships

Professional memberships

qualifications

Qualifications

services

Service activities

research_resources

Research resources

works

Works/publications

funding

Funding records

peer_reviews

Peer review activities

person

Complete person data

bio

Biography

keywords

Keywords

researcher_urls

Researcher URLs

external_identifiers

External identifiers

other_names

Other names

address

Address information

email

Email addresses

Empty data.tables are returned for sections with no data.

References

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

See Also

orcid_fetch_many, orcid_employments, orcid_works

Examples

## Not run: 
# Fetch complete record for a public ORCID
record <- orcid_fetch_record("0000-0002-1825-0097")
names(record)
record$works
record$employments

# Fetch only works and funding
record <- orcid_fetch_record(
  "0000-0002-1825-0097",
  sections = c("works", "funding")
)

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

## End(Not run)


Retrieve funding records from ORCID

Description

Fetches funding records for a given ORCID identifier from the ORCID public API. Returns a structured data.table with funding details including grant titles, funding organizations, amounts, and dates.

Usage

orcid_funding(orcid_id, token = NULL)

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}/fundings

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

Value

A data.table with the following columns:

orcid

ORCID identifier

put_code

Unique identifier for this funding record

title

Title of the funded project

type

Type of funding (e.g., grant, contract, award)

organization

Name of the funding organization

start_date

Funding start date (ISO format)

end_date

Funding end date (ISO format)

amount

Funding amount (if available)

currency

Currency code (e.g., USD, EUR)

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

References

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

See Also

orcid_works, orcid_employments, orcid_fetch_record

Examples

## Not run: 
# Fetch funding records for a public ORCID
funding <- orcid_funding("0000-0002-1825-0097")
print(funding)

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

## End(Not run)


Retrieve invited positions from ORCID

Description

Fetches invited position records for an ORCID identifier, such as visiting professorships, guest lectureships, etc.

Usage

orcid_invited_positions(orcid_id, token = NULL)

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.

Details

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

Value

A data.table with the following columns:

orcid

ORCID identifier

put_code

Unique identifier for this invited position record

organization

Name of the hosting organization

department

Department name (if available)

role

Position title

start_date

Position start date (ISO format)

end_date

Position end date (ISO format)

city

City of organization

region

State/region of organization

country

Country of organization

Returns an empty data.table with the same structure if no invited position records are found.

References

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

See Also

orcid_employments, orcid_activities

Examples

## Not run: 
# Fetch invited positions
positions <- orcid_invited_positions("0000-0002-1825-0097")
print(positions)

## End(Not run)


Retrieve keywords from ORCID

Description

Fetches research keywords associated with an ORCID record. Keywords help identify research areas and interests.

Usage

orcid_keywords(orcid_id, token = NULL)

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.

Details

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

Value

A data.table with the following columns:

orcid

ORCID identifier

put_code

Unique identifier for this keyword

keyword

Keyword text

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

References

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

See Also

orcid_person

Examples

## Not run: 
# Fetch keywords
keywords <- orcid_keywords("0000-0002-1825-0097")
print(keywords)

## End(Not run)


Retrieve memberships from ORCID

Description

Fetches professional membership records for an ORCID identifier, such as memberships in professional societies, organizations, etc.

Usage

orcid_memberships(orcid_id, token = NULL)

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.

Details

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

Value

A data.table with the following columns:

orcid

ORCID identifier

put_code

Unique identifier for this membership record

organization

Name of the organization

department

Department name (if available)

role

Membership role or title

start_date

Membership start date (ISO format)

end_date

Membership end date (ISO format)

city

City of organization

region

State/region of organization

country

Country of organization

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

References

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

See Also

orcid_employments, orcid_activities

Examples

## Not run: 
# Fetch memberships
memberships <- orcid_memberships("0000-0002-1825-0097")
print(memberships)

## End(Not run)


Retrieve other names from ORCID

Description

Fetches alternative names (also known as, published as, etc.) associated with an ORCID record.

Usage

orcid_other_names(orcid_id, token = NULL)

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.

Details

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

Value

A data.table with the following columns:

orcid

ORCID identifier

put_code

Unique identifier for this name

other_name

Alternative name

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

References

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

See Also

orcid_person

Examples

## Not run: 
# Fetch other names
other_names <- orcid_other_names("0000-0002-1825-0097")
print(other_names)

## End(Not run)


Retrieve peer review activities from ORCID

Description

Fetches peer review records for a given ORCID identifier from the ORCID public API. Returns a structured data.table with peer review activities including reviewer roles, review types, and organizations.

Usage

orcid_peer_reviews(orcid_id, token = NULL)

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}/peer-reviews

Peer review activities can include journal article reviews, conference paper reviews, grant reviews, and other forms of scholarly evaluation.

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

Value

A data.table with the following columns:

orcid

ORCID identifier

put_code

Unique identifier for this peer review record

reviewer_role

Role of the reviewer (e.g., reviewer, editor)

review_type

Type of review (e.g., review, evaluation)

review_completion_date

Date the review was completed (ISO format)

organization

Name of the convening organization (e.g., journal, conference)

Returns an empty data.table with the same structure if no peer review records are found.

References

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

See Also

orcid_works, orcid_funding, orcid_fetch_record

Examples

## Not run: 
# Fetch peer review records for a public ORCID
reviews <- orcid_peer_reviews("0000-0002-1825-0097")
print(reviews)

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

## End(Not run)


Retrieve complete person data from ORCID

Description

Fetches comprehensive personal information including name, biography, keywords, researcher URLs, and other public profile data from an ORCID record.

Usage

orcid_person(orcid_id, token = NULL)

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}/person

This endpoint provides the most comprehensive biographical information in a single request, including name, biography, keywords, URLs, addresses, emails, and external identifiers.

Value

A data.table with the following columns:

orcid

ORCID identifier

given_names

Given (first) name

family_name

Family (last) name

credit_name

Published/credit name (if provided)

biography

Biography text

keywords

Comma-separated research keywords

researcher_urls

Comma-separated professional URLs

country

Country of residence

Returns a data.table with NA values for missing fields.

References

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

See Also

orcid_bio, orcid_keywords, orcid_researcher_urls

Examples

## Not run: 
# Fetch complete person data
person <- orcid_person("0000-0002-1825-0097")
print(person)

# Access specific fields
person$biography
person$keywords

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

## End(Not run)


Check ORCID API status

Description

Checks the health and availability of the ORCID public API. Useful for diagnostics and ensuring the API is accessible before making requests.

Usage

orcid_ping()

Details

This function queries the ORCID API status endpoint: https://pub.orcid.org/v3.0/status

Value

Character string with API status message (typically "OK" if healthy)

Examples

## Not run: 
# Check API status
status <- orcid_ping()
print(status)

## End(Not run)


Retrieve qualifications from ORCID

Description

Fetches professional qualification records for an ORCID identifier, such as licenses, certifications, etc.

Usage

orcid_qualifications(orcid_id, token = NULL)

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.

Details

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

Value

A data.table with the following columns:

orcid

ORCID identifier

put_code

Unique identifier for this qualification record

organization

Name of the issuing organization

department

Department name (if available)

role

Qualification title

start_date

Qualification date (ISO format)

end_date

Expiration date (ISO format, if applicable)

city

City of organization

region

State/region of organization

country

Country of organization

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

References

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

See Also

orcid_educations, orcid_activities

Examples

## Not run: 
# Fetch qualifications
qualifications <- orcid_qualifications("0000-0002-1825-0097")
print(qualifications)

## End(Not run)


Retrieve research resources from ORCID

Description

Fetches research resource records for an ORCID identifier, such as facilities, equipment, databases, collections, etc.

Usage

orcid_research_resources(orcid_id, token = NULL)

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.

Details

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

Note: Research resources have a different structure than other affiliations, with a focus on the resource itself rather than organizational affiliations.

Value

A data.table with the following columns:

orcid

ORCID identifier

put_code

Unique identifier for this resource record

title

Resource title/name

hosts

Hosting organizations (comma-separated)

start_date

Resource start date (ISO format)

end_date

Resource end date (ISO format)

Returns an empty data.table with the same structure if no research resource records are found.

References

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

See Also

orcid_works, orcid_activities

Examples

## Not run: 
# Fetch research resources
resources <- orcid_research_resources("0000-0002-1825-0097")
print(resources)

## End(Not run)


Retrieve researcher URLs from ORCID

Description

Fetches professional and personal URLs associated with an ORCID record, such as personal websites, institutional profiles, social media, etc.

Usage

orcid_researcher_urls(orcid_id, token = NULL)

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.

Details

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

Value

A data.table with the following columns:

orcid

ORCID identifier

put_code

Unique identifier for this URL

url_name

Name/label for the URL

url_value

The actual URL

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

References

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

See Also

orcid_person, orcid_external_identifiers

Examples

## Not run: 
# Fetch researcher URLs
urls <- orcid_researcher_urls("0000-0002-1825-0097")
print(urls)

## End(Not run)


Description

Search for ORCID profiles using named parameters instead of Solr query syntax. This function provides a more intuitive interface than orcid.

Usage

orcid_search(
  given_name = NULL,
  family_name = NULL,
  affiliation_org = NULL,
  email = NULL,
  keywords = NULL,
  digital_object_ids = NULL,
  other_name = NULL,
  credit_name = NULL,
  rows = 10,
  start = 0,
  token = NULL,
  ...
)

Arguments

given_name

Character string. Given (first) name to search for.

family_name

Character string. Family (last) name to search for.

affiliation_org

Character string. Organization name.

email

Character string. Email address (supports wildcards like *@example.org).

keywords

Character vector. One or more keywords to search for.

digital_object_ids

Character string. DOI or DOI pattern.

other_name

Character string. Alternative name.

credit_name

Character string. Credit/published name.

rows

Integer. Number of results to return (default: 10).

start

Integer. Starting position for pagination (default: 0).

token

Character string or NULL. Optional API token.

...

Additional parameters passed to orcid.

Details

This function constructs a Solr query from the provided parameters and calls orcid internally. Multiple parameters are combined with AND logic. Uses the expanded-search endpoint to return name information.

Value

A data.table of search results (same structure as orcid). The total number of matches is available as attr(result, "found").

See Also

orcid for more flexible query syntax

Examples

## Not run: 
# Search by name
results <- orcid_search(
  family_name = "Fabbri",
  given_name = "Lorenzo"
)

# Search by affiliation
results <- orcid_search(affiliation_org = "Stanford University")

# Search by keywords
results <- orcid_search(keywords = c("machine learning", "genomics"))

# Combine multiple criteria
results <- orcid_search(
  family_name = "Smith",
  affiliation_org = "Harvard",
  rows = 20
)

## End(Not run)


Retrieve services from ORCID

Description

Fetches service activity records for an ORCID identifier, such as committee memberships, editorial board positions, peer review activities, etc.

Usage

orcid_services(orcid_id, token = NULL)

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.

Details

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

Value

A data.table with the following columns:

orcid

ORCID identifier

put_code

Unique identifier for this service record

organization

Name of the organization

department

Department name (if available)

role

Service role or title

start_date

Service start date (ISO format)

end_date

Service end date (ISO format)

city

City of organization

region

State/region of organization

country

Country of organization

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

References

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

See Also

orcid_peer_reviews, orcid_activities

Examples

## Not run: 
# Fetch services
services <- orcid_services("0000-0002-1825-0097")
print(services)

## End(Not run)


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)

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.

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.

References

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

See Also

orcid_employments, orcid_funding, orcid_fetch_record

Examples

## Not run: 
# 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")

## End(Not run)