All Projects → maxlath → wikidata-properties-dumper

maxlath / wikidata-properties-dumper

Licence: other
a script to get a JSON file listing wikidata properties ids and their label in a given language

Programming Languages

coffeescript
4710 projects

wikidata-properties-dumper

UPDATE: this repository was hosting experimentations at getting a list of all Wikidata properties as JSON before Wikidata SPARQL endpoint was up. Now that it's there, we can do better!


There are now more than 2400 property ids on wikidata (less active ones though), but no handy standard json version of those, so I made one by hand, per language. You can find en, de, fr, es and it versions already in the ./output folder.

It looks like this:

{
    "P6": "head of government",
    "P7": "brother",
    "P9": "sister",
    "P10": "video",
    "P14": "highway marker",
    "P15": "road map",
    "P16": "highway system",
    "P17": "country",
    "P18": "image",
    ...

Properties dumps

How To dump Properties for other languages

Options 1

  • create a new query in Quarry, copying this one but replacing fr with the 2-letters language code of your choice
  • copy this repo:
git clone https://github.com/maxlath/wikidata-properties-dumper.git
  • add the query id and the json output id to the ./queries.json file
  • then run npm start

and you're done! JSON files are waiting for you in the properties folder!

Options 2: lazy but slower

  • just ask me to add the desired language to the existing dumps :)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].