w_query: Response from Wikidata Query Service

View source: R/wiki_utils.R

w_queryR Documentation

Response from Wikidata Query Service

Description

Retrieve responses from Wikidata Query Service (WDQS). Uses ratelimitr if param limitRequester = TRUE.

Usage

w_query(sparql_query, format = "csv", method = "GET", limitRequester = FALSE)

Arguments

sparql_query

A string with the query in SPARQL language.

format

A string with the query response format. Mandatory. See https://www.mediawiki.org/wiki/Wikidata_Query_Service/User_Manual#SPARQL_endpoint. Only 'json', 'xml' or 'csv' formats are allowed, default 'csv'.

method

The method used in the httr request, GET or POST, mandatory. Default 'GET'.

limitRequester

If True, uses ratelimitr to limit the requests.

Value

The response in selected format or NULL on errors.

Author(s)

Angel Zazo, Department of Computer Science and Automatics, University of Salamanca


wikiTools documentation built on April 3, 2025, 9:38 p.m.