Skip to content

Instantly share code, notes, and snippets.

@oliviergimenez
Created November 13, 2025 09:23
Show Gist options
  • Select an option

  • Save oliviergimenez/e5958da4278b5e3f9c711df3c6bf17c5 to your computer and use it in GitHub Desktop.

Select an option

Save oliviergimenez/e5958da4278b5e3f9c711df3c6bf17c5 to your computer and use it in GitHub Desktop.
Get some info from WoS through its API and the R package rwosstarter
# https://frbcesab.github.io/rwosstarter/
remotes::install_github("frbcesab/rwosstarter")
library(rwosstarter)
# Use the function rwosstarter::wos_search() to get the total number of references that match the Web of Science query.
?rwosstarter::wos_search()
## Search in TOPIC an exact expression ----
query <- "TS=\"salmo salar\""
wos_search(query)
## Search in TOPIC an exact expression and another term ----
query <- "TS=(\"salmo salar\" AND conservation)"
wos_search(query)
## Search for a specific year ----
query <- "TS=(\"salmo salar\" AND conservation) AND PY=2021"
wos_search(query)
## Search for a time span ----
query <- "TS=(\"salmo salar\" AND conservation) AND PY=2010-2021"
wos_search(query)
## Search for an author ----
query <- "AU=(\"Casajus N\")"
wos_search(query)
# Use the function rwosstarter::wos_get_records() to download reference data.
?rwosstarter::wos_get_records()
## Write query to retrieve references of one author ----
query <- "AU=(\"Casajus Nicolas\")"
## Check the number of records ----
wos_search(query)
## Download metadata of records ----
refs <- wos_get_records(query)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment