Wikidata:For developers/FAQ
|
Wikidata For Developers: FAQ |
On this page you find answers to frequently asked questions that come up when building applications and services with Wikidata's data.
What is an Item? A Property? A Statement? A Lexeme?
[edit]An Item is anything in the real world with a corresponding record inside Wikidata. A Property is a descriptor, a category, that is applied to a Value: a piece of data about an Item. Combining a Property with a Value yields a Statement. A Lexeme is an entity of lexicographical data, information that describes words.
These and many more important Wikidata concepts are explained more fully in the Wikidata introduction and glossary.
Why does Wikidata use numeric IDs instead of words to identify its Items?
[edit]Each of the millions of Items in Wikidata is identified by a number preceded by a Q. All the other kinds of entities are identified by similar numeric IDs. This allows Wikidata to be language-independent instead of having to rely on a single language. In addition, using IDs allows us to handle entities with the same name seamlessly.
What's the difference between a concept URI and an Item URL?
[edit]Every Item in Wikidata has a URL that humans can access in a web browser. But because there are many ways to access Wikidata's data that may not involve a web browser nor even a human, each Item also has a concept URI (note: not URL) that refers to the abstract entity in Wikidata: http://www.wikidata.org/entity/Q{XX}
For more information, see the Linked Data Interface section of the Data access page.
What's the best way for a project to access Wikidata’s data?
[edit]Choosing the right way to access the data inside Wikidata requires knowing a few things about your project. Are you querying a few pieces of data at a time, or potentially tens of thousands? Do you plan to store the data you receive? Do you want to combine it with your own?
Once you can answer a few of these questions, check out the Data access page, which enumerates all the ways in which you can interact with Wikidata's data, and which one(s) might be right for you.
Does Wikidata have an API?
[edit]Yes. In fact it has more than one.
Being a MediaWiki project, Wikidata can be accessed via the Action API, which covers all of MediaWiki's functionality.
Wikidata also has its own REST API, which offers a much more modern and Wikidata-specific set of functionality. It's still growing. You can peruse the various endpoints and some example usage in our API documentation.
More information about these and other APIs are available on the Data access page. Whichever API you choose to use, keep in mind API etiquette.
Could Wikidata's API or its data formats change without warning, breaking my code?
[edit]No. Wikidata has a stable interface policy that lays out exactly how changes happen and how they're announced. In addition, it provides some helpful advice on how your code should handle or anticipate the clearly defined changes we do make within our policy.
How can I add my own data to Wikidata?
[edit]The Wikidata community is generally open to contributions of data. Getting the process started involves opening discussion with the community to determine the best approach and so that they can offer whatever assistance is needed. For more info, check out our data donation page. As you make plans to contribute data, remember to include plans to keep data quality high.
How can I ensure that the quality of my data remains high?
[edit]Maintaining data quality begins when you create the data in the first place – for that purpose, EntitySchemas are a useful tool to make sure your data takes the form you need it to. For data already in Wikidata, you can use tools like the Constraints Violation Checker and the Mismatch Finder. For even more tools, discussion and inspiration, check out the data quality WikiProject.
I have my data. How can I visualize it?
[edit]There are many tools out there to help you transform your data from individual flat entries into interesting, understandable visual representations, such as Wikidata Visualization and the Wikidata graph builder.
You can find an exhaustive list of tools, as well as several projects that implement those tools, on the Visualize data page.
Should I just copy all of Wikidata to my local machine?
[edit]Some projects find it easier to work from a dump of Wikidata. There are two disadvantages to doing so. The data size is one: as of this writing, full Wikidata dumps were approximately 150 GiB. Not everyone has the infrastructure – storage and compute – needed to manage this amount of data. Another disadvantage is that the dump is static, cut off from future updates.
You review the other data access options in Data access to see if dumps are the best option for your usecase.
How do I efficiently query Wikidata?
[edit]You can query Wikidata using SPARQL. It is a robust and complex query language whose learning curve is somewhat steep. There's a large amount of reference material and tutorial content about SPARQL at the bottom of this entry. The Query Builder is an excellent entry point for those beginning to learn SPARQL. Wikidata's query interface has a number of example queries that will help build skills. When all else fails, the community offers a forum where one can request help writing a query.
What programming languages offer Wikidata libraries, and where can I find code samples?
[edit]There's a wide and ever-growing variety of libraries through which developers can access Wikidata. A good starting place is the list of data access libraries.
As for code samples, Wikidata's query interface offers more than a few.
What if I make a mistake?
[edit]Everybody makes mistakes. Before embarking on a project that involves both reading from and writing to Wikidata, educate yourself on some Wikidata best practices, how to use the API, bot usage and community policies.
Next, consider using EditGroups for your changes to allow for easy reversion of groups of edits. You can also track your activity in your contribution list.
If you find that, despite your best efforts, your actions have damaged some of Wikidata's data, your best bet is to speak with the community.
For content issues: Project chat
For technical issues: Report a technical problem
What's the difference between Wikidata and dbpedia?
[edit]The dbpedia project extracts structured data from Wikipedia's unstructured and semi-structured content. Wikidata, on the other hand, already contains its own structured data, which is then used in Wikipedia, other Wikimedia projects, and beyond.