Wikidata:Property proposal/API formatter URL
API formatter URL
editOriginally proposed at Wikidata:Property proposal/Generic
Description | URI template from which "$1" can automatically be replaced with the effective property value on items; for API access and other machine-readable data |
---|---|
Data type | String |
Domain | Wikibase property (Q29934218) |
Example 1 | X place ID (P12431)→https://api.twitter.com/1.1/geo/id/$1.json |
Example 2 | Bulbapedia article ID (P4845)→https://bulbapedia.bulbagarden.net/w/api.php?action=parse&format=xml&page=$1 |
Example 3 | Bulbapedia article ID (P4845)→https://bulbapedia.bulbagarden.net/w/api.php?action=parse&format=json&page=$1 |
Example 4 | Minecraft UUID (P8727)→https://sessionserver.mojang.com/session/minecraft/profile/$1 |
Example 5 | OpenCritic ID (P2864)→https://opencritic-api.p.rapidapi.com/game/$1 |
Example 6 | SteamGridDB ID (P12561)→https://www.steamgriddb.com/api/v2/games/id/$1 |
Example 7 | MusicBrainz release group ID (P436)→https://musicbrainz.org/ws/2/release-group/$1?inc=aliases+annotation+tags+ratings+genres |
Example 8 | MusicBrainz release group ID (P436)→https://musicbrainz.org/ws/2/release-group/$1?inc=aliases+annotation+tags+ratings+genres&fmt=json |
Example 9 | App Store app ID (P3861)→https://itunes.apple.com/lookup?id=$1 |
Example 10 | Humble Store ID (P4477)→https://www.humblebundle.com/store/api/lookup?products%5B%5D=$1 |
Motivation
editformatter URL (P1630) already serves the purpose of providing human-readable pages for the identifier, but there's currently no property for a machine-readable endpoint for data relating to the identifier. Storing this information in Wikidata will make it much easier for people to create tools that extract data from external sources - especially when documentation doesn't exist at all for some APIs.
This is not the same as API endpoint URL (P6269), which is only for the base URL of the endpoint.
--Lewis Hulbert (talk) 08:07, 2 April 2024 (UTC)
Discussion
edit- Support This is useful for the same reasons as third-party formatter URL (P3303). Looks like around 30 properties already have an API URL as formatter URL (P1630):
SELECT ?item ?formatterURL {?item wdt:P1630 ?formatterURL. FILTER(regex(STR(?formatterURL), "api|json")).}
. Those would need to be moved to the new property. —Dexxor (talk) 07:44, 3 April 2024 (UTC) - Notified participants of WikiProject Websites — wd-Ryan (Talk/Edits) 19:47, 3 April 2024 (UTC)
- Support — Arlo Barnes (talk) 07:15, 4 April 2024 (UTC)
- @Lewis Hulbert, Dexxor, Wd-Ryan, Arlo Barnes: Done: API formatter URL (P12605). Regards Kirilloparma (talk) 15:05, 9 April 2024 (UTC)