yaph / wikidata-dl

wikidata-dl is a command line program for downloading data from Wikidata based on SPARQL queries.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

wikidata-dl

Description

wikidata-dl is a command line program for downloading data from Wikidata based on SPARQL queries.

Installation

pip install wikidata-dl

Usage

Download result returned from the query and save it in the directory ./wikidata:

wikidata-dl /path/to/my-query.sparql

For a complete reference of the command line options run:

wikidata-dl --help

Sample Query

The following query returns IDs for all Wikidata entities that are an instance of (P31) a continent (Q5107).

SELECT ?item WHERE {
    ?item wdt:P31 wd:Q5107.
}

Try the query

About

wikidata-dl is a command line program for downloading data from Wikidata based on SPARQL queries.

License:MIT License


Languages

Language:Python 92.2%Language:Makefile 7.8%