Retrieving image license and author information in wiki commons

后端 未结 6 975
情深已故
情深已故 2021-02-19 07:04

I am trying to use the wikimedia API for wiki commons at:

http://commons.wikimedia.org/w/api.php

It seems like the commons API is very immature

6条回答
  •  囚心锁ツ
    2021-02-19 07:26

    see page: http://www.mediawiki.org/wiki/API:Meta

    You can use foreach image the tag 'meta=siteinfo' and the tag 'siprop=rightsinfo' (siprop is the prop of the siteinfo) Then you will see the rightsinfo of the picture.

    In your case of Brad Pitt it would be like:

    http://en.wikipedia.org/w/api.php?format=jsonfm&action=query&titles=File:Brad_Pitt_at_Incirlik2.jpg&prop=imageinfo&iiprop=url&meta=siteinfo&siprop=rightsinfo

提交回复
热议问题