Feature summary
Provide labels for each statement's property & value, as a string (not just QID), inside the JSONs returned for a each item or property get request.
Currently, to enable the REST API to list all of the statement's property & value as strings (not QIDs/PIDs) for a single WD-item, users must get request the original item json, then for loop over the statements and make a new get request for each property ID and for each (wikibase-item) statement to populate the VALUE of the tuples (ITEM, PROPERTY, VALUE).
Use case(s)
Avoiding the need for batch get requests "just to" populate the statements as human readable strings.
Use case: provide a full list of information as a string statement about a single WD-item in one REST API get request.
Use Case: Produce a list of wikidata statements as string text to inject into an LLM.
This currently requires
- downloading the item json
- for loop over each statement
- download the property json
- store the property label
- download the value (QID) jsons
- store the value labels.
if the RESTAPI included the labels in the JSON for the statements, then the user could bypass steps 2 - 6 in the instruction list above (only needing to download one JSON).
Benefits
The benefit of this feature would be to reduce the need for the user to make 300+ get requests to populate the statement's property & value content labels for a single WD-item (with 300+ statements).
The process currently takes approximately 33 seconds for 268 statements. If the REST API populated the labels alongside the QIDs in the statements, then the process would take 0.12 seconds or 260x faster for this use case.
