The Wikidata example queries that were here are now at wikidata:User:MartinPoulter/queries.

MediaWiki API examples

edit

API documentation

Preview (XML extract and thumbnail) of a Wikipedia article

edit
edit
edit

List files in a Commons category (but not subcategories)

edit

List subcategories of a Commons category

edit
edit

NB: Use the direct links for this query and the next: there is a problem with the API Sandbox (which has been reported)

edit
edit

Uses of an image in articles on English Wikipedia

edit

Templates used in a Wikipedia article

edit

All files in a Commons category (including subcats)

edit

Returns max of 500 results per batch

All files in a Commons category (search as generator)

edit

All contributors to a given file

edit

All categories that a Commons file is in (hidden categories marked as such)

edit