tw_get_wikipedia_sections_api_url: Facilitates the creation of MediaWiki API base URLs to...

View source: R/tw_get_wikipedia_page_sections.R

tw_get_wikipedia_sections_api_urlR Documentation

Facilitates the creation of MediaWiki API base URLs to retrieve sections of a page

Description

Mostly used internally

Usage

tw_get_wikipedia_sections_api_url(
  url = NULL,
  title = NULL,
  language = tidywikidatar::tw_get_language()
)

Arguments

url

Full url to a Wikipedia page. If given, title and language can be left empty.

title

Title of a Wikipedia page or final parts of its url. If given, url can be left empty, but language must be provided.

language

Defaults to language set with tw_set_language(); if not set, "en". Use "all_available" to keep all languages. For available language values, see the dedicated Wikimedia page.

Value

A character vector of base urls to be used with the MediaWiki API

Examples

tw_get_wikipedia_sections_api_url(title = "Margaret Mead", language = "en")

tidywikidatar documentation built on Feb. 10, 2026, 1:07 a.m.