Questions tagged [wikimedia-commons]

Wikimedia Commons is an online repository of free-use images, sound and other media files. It is a project of the Wikimedia Foundation. It's built on MediaWiki, so it can also be accessed through the MediaWiki API.

Wikimedia Commons is an online media file repository of free-use images, sound and video clips. It acts as a common repository for the various projects of the Wikimedia Foundation.

It's built on , so it can also be accessed through the . Unlike media files uploaded to other projects, files uploaded to Wikimedia Commons can be embedded on pages of all Wikimedia projects without the need to separately upload them there.

Unlike traditional media repositories, Wikimedia Commons is free. Everyone is allowed to copy, use and modify any files freely as long as they follow the terms specified by the author; this often means crediting the source and author(s) appropriately and releasing copies/improvements under the same freedom to others. The license conditions of each individual media file can be found on their description page. The Wikimedia Commons database itself and the texts in it are licensed under the Creative Commons Attribution/Share-Alike License.

51 questions
1
vote
1 answer

How to get a list of image file names from Wikimedia Commons with just a Wikidata ID

So the linked answer said how to get one image from Wikidata property P18: https://stackoverflow.com/a/34402875/1448813 But how do I get a list of images from wikimedia commons? We have the property P935 which gives us the gallery category name (or…
Janjko
  • 71
  • 6
1
vote
1 answer

Wikipedia image API search - get only images with Creative Commons license

We search Wikipedia images by API call: https://commons.wikimedia.org/w/api.php?action=query&list=search&srsearch=%22Einstein%22&srnamespace=6 (in this example by search query "Einstein") Thanks to Retrieving image license and author information in…
ahe_borriglione
  • 467
  • 4
  • 11
1
vote
1 answer

Wikimedia Commons API: search for Commons categories near a location

After reading Wikimedia Commons API search images by (latitude, longitude), I know that we can find pages around a specified location using the MediaWiki API with the GeoData extension. However, I am looking to obtain Commons categories around a…
0
votes
1 answer

How to query Wikidata in order to get all the species of flowers?

I’m trying to write a query that retrieves all the species of flowers in Wikidata. As far as I understood, flowers are represented by class Q506: https://www.wikidata.org/wiki/Q506. Therefore I tried to retrieve all the instances of this class. I…
V310RG
  • 11
  • 2
0
votes
1 answer

API call to get Wikimedia Commons user's uploads with categories and wikitext

How do I modify the example at https://commons.wikimedia.org/wiki/Commons:API/MediaWiki#Get_files_uploaded_by_a_particular_user to also list the categories each page is in, the wikitext of the page, and perhaps even some of the Structured Data?
Dan Jacobson
  • 490
  • 3
  • 14
0
votes
1 answer

Getting ALL picture file names from wikimedia commons search

So I'm trying to get all the picture files names for a wikimedia image search, but I'm only getting 10 results. As an example, I tried running: import json from io import StringIO import pandas as pd import numpy as np import cv2 import…
0
votes
1 answer

Retrieve Wikimedia Commons Category of a Wikipedia page using the Wikimedia API

I am trying to use the Wikimedia Api to get the corresponding Wikimedia Commons category to a specific Wikipedia page. I assume that it is possible as most Wikipedia pages include an "in other projects" - section in the sidebar which has a link that…
0
votes
1 answer

Mediawiki API: Query picture from Wikimedia Commons with parameter "pageid"

The query below using the file name of the picture works flawlessly: https://www.mediawiki.org/w/api.php?action=query&prop=globalusage&gulimit=20&titles=File:Ferrari%20Roma%20in%20Basel.png If I want to use the Commons Page ID of this picture (found…
René K
  • 337
  • 5
  • 14
0
votes
1 answer

Sitelinks for files on commons.wikimedia: is it possible to query them with SPARQL or API?

I know how to query sitelinks for wikidata items with SPARQL (see below), is there some similar way to get sitelinks for files on commons.wikimedia? For example, if we open this image info page, at the bottom of the page we have two lists "File…
0
votes
1 answer

Testing image uploads in Wikimedia Commons

I want to use pywikibot to upload a batch of images into Wikimedia Commons. However, when you add images in Commons, you can't easily delete them if you made a mistake. Is there a way to locally install Wikimedia Commons for validation and testing…
kolam
  • 731
  • 4
  • 17
0
votes
0 answers

Wikimedia image captions

What is the best way to obtain captions and descriptions for most/all images at Wikimedia commons (I do not need the images themselves). I know there is API, but I would prefer to obtain the information in bulk. For example, when I look at…
Jirka
  • 4,184
  • 30
  • 40
0
votes
1 answer

Get the Wikibase identifier of files resulting from a Wikimedia Commons search

I want to fetch the Wikibase identifier (an integer with a M prefix) of all files resulting from a Wikimedia Commons search. Example: Searching for aburasoba azabujuban, the query should return (potentially among other results) M80618155, because it…
0
votes
1 answer

Get all images in a specific category in wikimedia

I am looking for an efficient way to get the all images in a specific category in wikimedia commons. Example : https://commons.wikimedia.org/wiki/Commons:Quality_images The following image is in the category …
user2650277
  • 6,289
  • 17
  • 63
  • 132
0
votes
1 answer

R plot from Wikipedia: Numbers are falsely interpreted as factors

I have been trying to run the script of this Wikipedia chart showing US unemployment. The data is from http://download.bls.gov/pub/time.series/ln/ln.data.1.AllData & http://download.bls.gov/pub/time.series/ln/ln.series cat("Loading table --…
0
votes
3 answers

Get deeplinks of Wikimedia Commons pictures

I would like to get the fulltext URL from Wikimedia Commons pictures. As example I would like to get https://upload.wikimedia.org/wikipedia/commons/6/69/Trittin%2C_J%C3%BCrgen-0126.jpg from File:Trittin, Jürgen-0126.jpg. Here is the html…