Skip to main content

Download data from Wikidata based on input SPARQL query.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wikidata_dl-2026.3.6.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wikidata_dl-2026.3.6-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file wikidata_dl-2026.3.6.tar.gz.

File metadata

  • Download URL: wikidata_dl-2026.3.6.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.5 cpython/3.12.3 HTTPX/0.28.1

File hashes

Hashes for wikidata_dl-2026.3.6.tar.gz
Algorithm Hash digest
SHA256 988eb80d84311bf82805e5d7e37d8ee8cc90a280987128fd198dfb81722c9d83
MD5 1ee2b12f75318199ddb4acafe20ef073
BLAKE2b-256 b6f0a4a0700671e0e031fdb66623e2db4cbdb1ef504cff5bb751b4ce86cf2646

See more details on using hashes here.

File details

Details for the file wikidata_dl-2026.3.6-py3-none-any.whl.

File metadata

  • Download URL: wikidata_dl-2026.3.6-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.5 cpython/3.12.3 HTTPX/0.28.1

File hashes

Hashes for wikidata_dl-2026.3.6-py3-none-any.whl
Algorithm Hash digest
SHA256 da51dafd55fd43bac51a0490838c8e281ba3345c360490dda002b1c5aaf08d84
MD5 d7a1acd6c5f8473b6757977dc5eb9777
BLAKE2b-256 2f88fd0d5c865fd053267bd95325c5dd81caaeb8f2683a0a8c1878bdd8c1b194

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page