An API to compare a Wikidata item with an EntitySchema. The API is available at http://entityshape.toolforge.org/api.
The API requires the following parameters to be provided with requests:
- language: e.g. en the language to return property names in
- entity: e.g. Q42 the Wikidata entity to check
- entityschema: e.g. E14 the EntitySchema to check against
The API returns a JSON object containing the following:
- error: details of any error which may have occurred
- schema: the EntitySchema checked against
- name: the display name of the EntitySchema
- validity: the validity of the schema (currently unused)
- properties: a json object describing the validity of each property in the entity
- statements: a json object describing the validity of each statement in the entity
This repository also contains the source code for the user script at https://www.wikidata.org/wiki/User:Teester/EntityShape.js, which allows use of this API on Wikidata entity pages.
The UI can be translated into multiple languages which will use the user's language to decide what language to display or fall back to english if the language is not available.
At the moment, there are 2 languages available - en and ga.
Visit https://www.wikidata.org/wiki/User_talk:Teester/EntityShape.js for details on how to contribute translations to the project.