0

I have a database where I need keep up with changes on Wikidata changes, and while I was looking for ways to do it, I found these three:

  • RSS
  • API Call
  • Socket.IO

I would like to know if there are other ways and which one is the best or recommended by Wikidata

Luiz E.
  • 6,769
  • 10
  • 58
  • 98

1 Answers1

2

The answer depends on how up to date you need to keep your database.

As up to date as possible

If you need to keep you database as up to date with Wikidata as possible then you will probably want to use a combination of the solutions that you have found.

Socket.IO will provide you with a stream of what has changed, but will not necessarily give you all of the information that you need. (Note: there is an IRC stream that would allow you to do the same thing)

Based on the data provided by the stream you can then make calls to the Wikidata API retrieving the new data.

Of course this could result in lots of API calls, so make sure you batch them and also don't retrieve update immediately in case lots of changes occur in a row.

Daily or Weekly

As well as the 3 options you have listed above you also have the Database dumps! https://www.wikidata.org/wiki/Wikidata:Database_download

The JSON & RDF dumps are generally recommended. The JSON dump contains the data exactly as it is stored. These dumps are made weekly.

The XML dumps are not guaranteed to have the same JSON format as the JSON dumps as they use the internal serialization format. However daily XML dumps are provided.

Addshore
  • 568
  • 3
  • 16