Skip to contents

Queries the Elsevier Scopus Search API for peer-reviewed works matching a keyword in a specified field using Scopus Query Language (SQL). A Scopus API key is required; institutional access is typically needed for full metadata retrieval.

Usage

pc_search_scopus(
  query,
  field = c("abstract", "affiliation", "funder"),
  max_results = 500L,
  api_key = NULL,
  auto_fetch = TRUE,
  email = NULL,
  start_year = NULL,
  end_year = NULL,
  doc_type = NULL,
  award_pattern = NULL,
  ...
)

Arguments

query

Character. Keyword or phrase to search. The value is embedded in a Scopus Query Language expression, e.g. ABS("climate change").

field

Character. One of "abstract", "affiliation", "funder".

max_results

Integer. Maximum number of records to return. Scopus pages in batches of 25; pagination via start offset is handled automatically. The Scopus Search API caps accessible results at 5,000 regardless of total result count. Default 500.

api_key

Character. Scopus API key. Falls back to the value set with pc_configure(), then the SCOPUS_API_KEY environment variable.

auto_fetch

Logical. If TRUE (default), automatically calls pc_fetch_abstracts() after searching to backfill authors, abstract, affiliations, and grant_numbers via OpenAlex for any records where those fields are empty. Most useful when the Scopus COMPLETE view is not available (e.g. off-campus access). Set to FALSE to skip the backfill.

email

Character. Email for the OpenAlex polite pool used by pc_fetch_abstracts() when auto_fetch = TRUE. Falls back to the value set with pc_configure(), then the PUBCLASSIFY_EMAIL environment variable.

start_year

Integer. Earliest publication year to include (inclusive). Appended to the query as PUBYEAR AFT <start_year - 1>. NULL (default) applies no lower year bound.

end_year

Integer. Latest publication year to include (inclusive). Appended to the query as PUBYEAR BEF <end_year + 1>. NULL (default) applies no upper year bound.

doc_type

Character vector. One or more document types to restrict results. Accepted values: "article", "review", "conference_paper", "book", "book_chapter", "letter", "editorial", "short_survey". Multiple values are combined with OR. NULL (default) returns all document types.

award_pattern

Character vector. One or more optional regular expressions matched case-insensitively against grant_numbers to append an award_match logical column. A record is flagged if any grant number matches any pattern. Award IDs are often more reliable than funder name strings for identifying specific funding programmes. For example, "^4600" flags California DWR contracts; c("^4600", "^W912") flags both DWR and U.S. Army Corps contracts. NULL (default) skips flagging. See pc_flag_awards().

...

Reserved for future use.

Value

A tibble::tibble() with the standard pubclassify schema. See pc_search() for column details.

COMPLETE view and institutional access

This function requests the Scopus Search API COMPLETE view, which returns author names (dc:creator + author array), an abstract snippet (dc:description), and funding metadata (fund-sponsor, fund-no). The COMPLETE view requires an institutional Scopus subscription; requests from non-subscriber API keys will receive only the STANDARD view fields (title, DOI, journal, date, affiliation) and an HTTP 401/403 error.

Note that dc:description is a short snippet, not the full abstract, and funding metadata may be sparse. Use pc_fetch_abstracts() to backfill full abstracts and funding data via OpenAlex after searching.

Examples

if (FALSE) { # \dontrun{
pc_search_scopus("California Natural Resources Agency", field = "funder")
pc_search_scopus("University of California", field = "affiliation")
} # }