Skip to contents

Search the Overton API for policy document citations of scholarly works and return the results as an sm_corpus.

Requires an Overton API key (set via the OVERTON_API_KEY environment variable).

Usage

sm_fetch_overton(
  query,
  api_key = Sys.getenv("OVERTON_API_KEY"),
  n_max = 100L,
  verbose = TRUE,
  call = rlang::caller_env()
)

Arguments

query

Search query string.

api_key

Overton API key. Read from OVERTON_API_KEY env var.

n_max

Maximum number of results to return (default 100).

verbose

Print progress messages?

call

Caller environment for error reporting.

Value

An sm_corpus object.

Examples

if (FALSE) { # \dontrun{
corpus <- sm_fetch_overton(query = "climate change policy", n_max = 10)
print(corpus)
} # }