Skip to main content

Technical Guideline Series

Snowball Search for Literature Search and Analysis using OpenAlex

Authors
Affiliations

Rainer M. Krug

Aidin Niamir

Published

November 18, 2026

Doi
Abstract

In addition to the typical literature search using search terms, one can conduct a snowball search. A snowball search starts from a set of identified key-papers, and the snowball search will identify the publications cited in the key papers as well as the publications citing the key-paper. This search strategy identifies related articles using citation relationships (not keywords), building a citation network based on the key-papers. Here we will demonstrate how a snowball search can be conducted using OpenAlex and R with the openalexPro ecosystem of packages, in particular {openalexSnowball}, with code examples, and discuss some shortcomings and advantages of this approach. Furthermore, we will outline some analysis approaches and possibilities of a citation network without going into too much detail.

DOI License: CC BY 4.0

GitHub release GitHub commits since latest release

Prepared by

Reviewed by

For any inquires please contact Aidin.Niamir@senckenberg.de

Version: 1.0.0

Last updated: 18 November, 2026

Introduction

Snowball search (also known as chain sampling, chain-referral sampling, referral sampling) is in the context of literature search a search which starts with some key-papers and identifies the papers which are referenced in the key-papers (also called backward search) as well as the papers citing one or more key-papers (also called forward search).

These key-papers should cover the range of the topic which should be covered by the resulting literature corpus, while containing the most relevant papers of the topic, and form the core of the search. Consequently, the selection of the key-papers is essential and this selection determines the quality and usability of the resulting corpus for a specific question asked.

Methods

Databases suitable for Snowballing

In principle, snowballing can be done with most (if not all) literature databases. Examples are Web of Science, Scopus or PubMed which provide the possibility to search for papers from their web interface or using API services. When using their web interface, one can only search for one article at the time, so it is very cumbersome to conduct a snowball search for multiple keypapers. Using the provided APIs of these proprietary databases makes automating the search possible, but becomes easily extremely expensive and still laden with restrictions due to high licence fees.

A good alternative is OpenAlex. OpenAlex is an open scholarly data source which provides a free daily usage budget for its API (which is enough for most projects, including the snowball search shown here), and the complete database is also available as a free snapshot for download. Therefore, the snowball search can be scripted. API clients are available for many different programming languages, including R (e.g. {openalexR} and {openalexPro}) and Python (pyalex).

This technical guideline focuses on the use of OpenAlex (the data source for literature recommended by the IPBES Technical Support Unit on Knowledge and Data) through the openalexPro ecosystem of R packages:

  • {openalexPro} provides the access to the OpenAlex API. In contrast to {openalexR}, which processes all data in memory, {openalexPro} processes the retrieved data on disk and stores it as Apache Parquet files. The size of a search is therefore limited by disk space rather than by memory.
  • {openalexSnowball} builds on {openalexPro} and conducts the snowball search itself. It retrieves the key-papers, the works citing them and the works cited by them, and stores the resulting citation network as nodes (works) and edges (citations) in Parquet.

Further packages in the ecosystem which are useful in this context, but not used in this guideline, are {openalexSnapshot}, which allows to conduct the same snowball search offline against a local copy of the OpenAlex snapshot (see Offline snowball search), and {openalexConvert}, which exports the retrieved works to reference managers (CSL-JSON, BibTeX, Zotero).

Snowballing in R

Installation and loading of the packages

The packages of the openalexPro ecosystem are not on CRAN, but are available from r-universe. Installing {openalexSnowball} also installs {openalexPro}. The packages, plus the additional ones used in this technical guideline for plotting, can be installed using

install.packages(
    "openalexSnowball",
    repos = c(
        "https://openalexpro.r-universe.dev",
        "https://cloud.r-project.org"
    )
)

## Static plot
install.packages(c("ggplot2", "tidygraph", "ggraph"))

## Interactive plot
install.packages(c("networkD3", "htmlwidgets"))

and loaded using

library(openalexSnowball)

OpenAlex API key

OpenAlex can be used without an API key, but much stricter limits apply in this case. It is therefore strongly recommended to obtain a free API key from OpenAlex and to make it available to {openalexPro}. Assuming the key is xxxxxxx, this can be done in one of the following ways, which are evaluated in this order:

  1. by setting the option using openalexPro::opt_api_key("xxxxxxx") in the R session,
  2. by setting the environment variable openalexPro.api_key to the key, for example in the .Renviron file, or
  3. by storing the key in the keyring of the operating system using keyring::key_set("API_openalex"), which asks for the key and stores it encrypted. This is the safest option.

Afterwards, the key and the remaining budget can be checked using

openalexPro::pro_validate_credentials()
Testing:
    api_key: XXXXXXXXXXXXXXXXXXXXXX
[1] TRUE
openalexPro::pro_rate_limit_status()
OpenAlex Rate Limit Status:
  Daily budget:      $1
  Daily used:        $0
  Daily remaining:   $1
  Prepaid balance:   $0
  Prepaid remaining: $0
  Resets at:         2026-11-19T00:00:00.000Z
  Resets in:         26705 seconds

Snowballing

Let’s assume, we have a list of DOIs of the key papers, which have been identified by experts with knowledge of the field and topic.

dois <- c(
    "10.1016/j.marpol.2023.105710",
    "10.1007/s13280-014-0582-z",
    "10.1016/j.cosust.2022.101160",
    "10.1146/annurev-environ-102014-021340"
)

The snowball search is done by the function pro_snowball(). The key papers can be provided either as DOIs (argument doi) or as OpenAlex ids (argument identifier), so there is no need to convert the DOIs to OpenAlex ids first. The results are written to the directory given in the argument output. If no output is given, a temporary directory is used, which is deleted at the end of the R session, so a persistent directory should be specified.

It is always a good idea to wrap the snowball search (and other long running calculations) in a construct which only does the snowball search if it has not been conducted before, as especially with many key papers the snowball search can take some time. In addition, resume = TRUE makes pro_snowball() continue an interrupted search (e.g. due to a lost internet connection or an exhausted daily API budget) instead of starting it again.

snowball_dir <- file.path("data", "snowball")

## `edges/` is written last, so its existence marks a completed search
if (!dir.exists(file.path(snowball_dir, "edges"))) {
    pro_snowball(
        doi = dois,
        output = snowball_dir,
        resume = TRUE,
        verbose = FALSE
    )
}

The same snowball search can also be done using the OpenAlex ids of the key papers instead of their DOIs, by using the argument identifier. This is useful when the key papers have no DOI, or when they have been identified in OpenAlex itself (the OpenAlex id is part of the URL of a work on OpenAlex, e.g. W2020319093 in https://openalex.org/W2020319093). The OpenAlex ids of the four key papers used here are:

pro_snowball(
    identifier = c("W2020319093", "W2204133637", "W4220786370", "W4379647013"),
    output = file.path("data", "snowball_ids"),
    resume = TRUE,
    verbose = FALSE
)

When there are many key papers, they should all be passed to a single call of pro_snowball() rather than calling it in a loop for each key paper, as this is much faster. See ?pro_snowball for further arguments, e.g. workers to retrieve the data in parallel.

Plotting the network

There are many different packages in R to plot networks ({igraph}, {ggraph} together with {tidygraph} and others).

As we will plot two networks in this guideline, we first define two functions, one for a static and one for an interactive plot, which take the result of read_snowball() as input. Both plots only use a few columns of the nodes.

Static Network Graph

For the static plot, I will only show how to plot the network using {ggraph} and {tidygraph} and not go into details how the plot can be tweaked.

library(ggplot2)
library(tidygraph)

Attaching package: 'tidygraph'
The following object is masked from 'package:stats':

    filter
library(ggraph)

plot_snowball_static <- function(snowball, title = "Cited by count") {
    graph <- tidygraph::tbl_graph(
        nodes = snowball$nodes[, c("id", "is_keypaper", "cited_by_count")],
        edges = snowball$edges[, c("from", "to")],
        node_key = "id",
        directed = TRUE
    )
    ggraph::ggraph(graph, layout = "stress") +
        ggraph::geom_edge_link(
            aes(alpha = after_stat(index)),
            show.legend = FALSE
        ) +
        ggraph::geom_node_point(
            aes(fill = is_keypaper, size = cited_by_count),
            shape = 21,
            color = "white"
        ) +
        ggraph::geom_node_label(
            aes(filter = is_keypaper, label = id),
            nudge_y = 0.2,
            size = 3
        ) +
        scale_size(range = c(3, 10), guide = "none") +
        scale_fill_manual(values = c("#a3ad62", "#d46780"), na.value = "grey") +
        ggraph::theme_graph() +
        theme(
            plot.background = element_rect(fill = "transparent", colour = NA),
            panel.background = element_rect(fill = "transparent", colour = NA)
        ) +
        guides(fill = "none") +
        ggtitle(title)
}

which can now be used to plot the network and to save the plot as pdf and png (saving as svg using the package {svglite} is shown, but commented out, as the resulting files are very large):

fn <- file.path("figures", "cited_by_count")
## only (re-)create the plot if one of the files is missing
if (!all(file.exists(paste0(fn, c(".pdf", ".png"))))) {
    p_cb <- plot_snowball_static(snowball)
    ggsave(
        paste0(fn, ".pdf"),
        plot = p_cb,
        device = cairo_pdf,
        width = 20,
        height = 15
    )
    ggsave(
        paste0(fn, ".png"),
        plot = p_cb,
        width = 20,
        height = 15,
        bg = "white",
        dpi = 300
    )
    ## The plot can also be saved as svg (needs the package svglite). This is
    ## not done here, as every node and edge becomes an element of the svg and
    ## the files get very large (45 MB for the core and 413 MB for the
    ## supplemented network).
    # ggsave(
    #     paste0(fn, ".svg"),
    #     plot = p_cb,
    #     device = svglite::svglite,
    #     width = 20,
    #     height = 15,
    #     bg = "white"
    # )
}

Download: PDF | PNG

There are many options on how these plots can be tweaked, but this is beyond the scope of this technical guideline to go into details. Please see the documentation of {ggraph} and {tidygraph} the two packages for more information.

Interactive Network Graph

Snowball citation networks can also be plotted as an interactive graph. I use here {networkD3} to do this and to save the html widget. Clicking on a node opens the work via its DOI.

library(networkD3)

plot_snowball_interactive <- function(snowball, file) {
    ## networkD3 identifies the nodes by their position (starting at 0)
    nodes <- data.frame(
        name = snowball$nodes$display_name,
        doi = snowball$nodes$doi,
        group = ifelse(snowball$nodes$is_keypaper, "key_paper", "other"),
        ## citations per year since publication
        nodesize = snowball$nodes$cited_by_count /
            (as.integer(format(Sys.Date(), "%Y")) +
                1 -
                snowball$nodes$publication_year) *
            0.5
    )
    edges <- data.frame(
        source = match(snowball$edges$from, snowball$nodes$id) - 1,
        target = match(snowball$edges$to, snowball$nodes$id) - 1,
        width = 1
    )

    nwg <- networkD3::forceNetwork(
        Links = edges,
        Nodes = nodes,
        Source = "source",
        Target = "target",
        NodeID = "name",
        Nodesize = "nodesize",
        Group = "group",
        Value = "width",
        opacity = 0.9,
        zoom = TRUE,
        colourScale = networkD3::JS(
            'd3.scaleOrdinal().domain(["key_paper", "other"]).range(["#FF6900", "#694489"]);'
        ),
        fontSize = 20,
        legend = TRUE,
        clickAction = "window.open(d.doi)"
    )
    nwg$x$nodes$doi <- nodes$doi

    htmlwidgets::saveWidget(
        nwg,
        file = normalizePath(file, mustWork = FALSE),
        selfcontained = TRUE
    )
    ## remove the folder with the html dependencies, as they are included in the file
    unlink(sub("\\.html$", "_files", file), recursive = TRUE)
    nwg
}

As they are dynamic, they need some time to settle in a stable state. The time it needs depends on the number of edges as well as your computer, but should be done in less than a minute (and they are fun to watch).

plot_snowball_interactive(
    snowball,
    file = file.path("figures", "cited_by_count_interactive.html")
)

Open in new window

These interactive graphs have even more options for tweaking than the static plots, see {networkD3} for more information.

The extended citation network

As mentioned above, the core citation network does not include any links between the newly identified works, as these are included only through citing or being cited by the key papers. These citations are already contained in the results of the snowball search as edges of the type extended, so the citation network can be supplemented by simply reading the edges of the types core and extended:

snowball_supplemented <- read_snowball(
    snowball = snowball_dir,
    edge_type = c("core", "extended"),
    return_data = TRUE,
    shorten_ids = TRUE
)

This increases the number of edges from 3100 to 28507. Now we can plot the supplemented citation network:

fn <- file.path("figures", "supplemented_cited_by_count")
## only (re-)create the plot if one of the files is missing
if (!all(file.exists(paste0(fn, c(".pdf", ".png"))))) {
    p_cb <- plot_snowball_static(snowball_supplemented)
    ggsave(
        paste0(fn, ".pdf"),
        plot = p_cb,
        device = cairo_pdf,
        width = 20,
        height = 15
    )
    ggsave(
        paste0(fn, ".png"),
        plot = p_cb,
        width = 20,
        height = 15,
        bg = "white",
        dpi = 300
    )
    ## The plot can also be saved as svg (needs the package svglite). This is
    ## not done here, as every node and edge becomes an element of the svg and
    ## the files get very large (45 MB for the core and 413 MB for the
    ## supplemented network).
    # ggsave(
    #     paste0(fn, ".svg"),
    #     plot = p_cb,
    #     device = svglite::svglite,
    #     width = 20,
    #     height = 15,
    #     bg = "white"
    # )
}

Download: PDF | PNG

and as an interactive plot

plot_snowball_interactive(
    snowball_supplemented,
    file = file.path("figures", "cited_by_count_interactive_supplemented.html")
)

Open in new window

As one can easily see, the number of citations (edges) is much higher, and the network is much more connected. A visual inspection is therefore not possible anymore, and one needs to use other methods to analyse the network.

The edges of the type outside, i.e. the citations from and to works outside the snowball search, are usually not needed for the citation network, but they can be used to identify works which are frequently cited by the works in the snowball search but are not part of it themselves. These could be candidates for additional key papers.

Reuse

Citation

BibTeX citation:
@report{krug2026,
  author = {Krug, Rainer M. and Niamir, Aidin},
  title = {Technical {Guideline} {Series}},
  date = {2026-11-18},
  doi = {10.5281/zenodo.10257156},
  langid = {en},
  abstract = {In addition to the typical literature search using search
    terms, one can conduct a snowball search. A snowball search starts
    from a set of identified key-papers, and the snowball search will
    identify the publications **cited** in the key papers as well as the
    publications **citing** the key-paper. This search strategy
    identifies related articles using citation relationships (not
    keywords), building a citation network based on the key-papers. Here
    we will demonstrate how a snowball search can be conducted using
    {[}OpenAlex{]}(https://OpenAlex.org) and R with the
    {[}openalexPro{]}(https://github.com/openalexPro) ecosystem of
    packages, in particular
    {[}`\{openalexSnowball\}`{]}(https://github.com/openalexPro/openalexSnowball),
    with code examples, and discuss some shortcomings and advantages of
    this approach. Furthermore, we will outline some analysis approaches
    and possibilities of a citation network without going into too much
    detail.}
}
For attribution, please cite this work as:
Krug, Rainer M., and Aidin Niamir. 2026. “Technical Guideline Series.” In IPBES Technical Guidelines on Snowball Search for Literature Search and Analysis Using OpenAlex. https://doi.org/10.5281/zenodo.10257156.