Learn R Programming

orcidtr (version 0.1.0)

orcid: 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, ...)

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").

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:

  • family-name:Smith

  • given-names:John

  • keyword:ecology

  • affiliation-org-name:Harvard

  • digital-object-ids:10.1371/*

  • email:*@example.org

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

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

Run this code
if (FALSE) {
# 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)
}

Run the code above in your browser using DataLab