Learn R Programming

wikiTools (version 1.2.14)

reqWDQS: Get responses from Wikidata Query Service

Description

Retrieve responses from Wikidata Query Service (WDQS)

Usage

reqWDQS(sparql_query, format = "json", method = "GET")

Value

The response in the format selected. Please check httr::stop_for_status(response)

Arguments

sparql_query

A string with the query in SPARQL language (SELECT query).

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 'json'.

method

The method used in the httr request, GET or POST, mandatory. Default 'GET'. Use 'POST' method for long SELECT clauses.

Author

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