Wikidata:Property proposal/API formatter URL

From Wikidata
Jump to navigation Jump to search

‎API formatter URL[edit]

Originally proposed at Wikidata:Property proposal/Generic

DescriptionURI template from which "$1" can automatically be replaced with the effective property value on items; for API access and other machine-readable data
Data typeString
DomainWikibase property (Q29934218)
Example 1X place ID (P12431)https://api.twitter.com/1.1/geo/id/$1.jsonfile format (P2701)JSON (Q2063)
Example 2Bulbapedia article ID (P4845)https://bulbapedia.bulbagarden.net/w/api.php?action=parse&format=xml&page=$1file format (P2701)Extensible Markup Language (Q2115)
Example 3Bulbapedia article ID (P4845)https://bulbapedia.bulbagarden.net/w/api.php?action=parse&format=json&page=$1file format (P2701)JSON (Q2063)
Example 4Minecraft UUID (P8727)https://sessionserver.mojang.com/session/minecraft/profile/$1file format (P2701)JSON (Q2063)
Example 5OpenCritic ID (P2864)https://opencritic-api.p.rapidapi.com/game/$1file format (P2701)JSON (Q2063)has characteristic (P1552)requires authentication
Example 6SteamGridDB ID (P12561)https://www.steamgriddb.com/api/v2/games/id/$1file format (P2701)JSON (Q2063)has characteristic (P1552)requires authentication
Example 7MusicBrainz release group ID (P436)https://musicbrainz.org/ws/2/release-group/$1?inc=aliases+annotation+tags+ratings+genresfile format (P2701)Extensible Markup Language (Q2115)
Example 8MusicBrainz release group ID (P436)https://musicbrainz.org/ws/2/release-group/$1?inc=aliases+annotation+tags+ratings+genres&fmt=jsonfile format (P2701)JSON (Q2063)
Example 9App Store app ID (P3861)https://itunes.apple.com/lookup?id=$1file format (P2701)JSON (Q2063)
Example 10Humble Store ID (P4477)https://www.humblebundle.com/store/api/lookup?products%5B%5D=$1file format (P2701)JSON (Q2063)

Motivation[edit]

formatter 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)[reply]

Discussion[edit]