# Get language links for a known page on English Wikipedia
get_page_langlinks("Charles Harpur")
# Many of these functions return a list of data frames. Tidyr can be useful.
# Get 20 related pages for German City
cities <- tibble::tribble(
~city,
"Berlin",
"Darmstadt",
) %>%
dplyr::mutate(related = get_page_related(city))
cities
# Unest to get one row per related page:
tidyr::unnest(cities, "related")
# The functions are vectorised over title and language
# Find all articles about Joanna Baillie, and retrieve summary data for
# the first two.
baillie <- get_page_langlinks("Joanna Baillie") %>%
dplyr::slice(1:2) %>%
dplyr::mutate(get_page_summary(title = title, language = code))
baillie
Run the code above in your browser using DataLab