Skip to main content
POST
/
api
/
wikimedia_commons
/
files
/
list
/wikimedia_commons/files/list
curl --request POST \
  --url https://api.anysite.io/api/wikimedia_commons/files/list \
  --header 'Content-Type: application/json' \
  --header 'access-token: <api-key>' \
  --data '
{
  "count": 2,
  "timeout": 300,
  "user": "Fir0002",
  "sort": "timestamp",
  "mime": "image/jpeg",
  "min_size": 1,
  "max_size": 1
}
'
[
  {
    "title": "<string>",
    "@type": "@wikimedia_commons_list_item",
    "image": "",
    "description_url": "",
    "web_url": "",
    "width": 123,
    "height": 123,
    "size": 123,
    "mime": "<string>",
    "media_type": "<string>",
    "sha1": "<string>",
    "uploaded_by": "<string>",
    "uploaded_at": "<string>"
  }
]

Authorizations

access-token
string
header
required

API token from the dashboard

Headers

access-token
string
required

Body

application/json
count
integer
required

Number of files to return

Required range: x >= 1
timeout
integer
default:300

Max scrapping execution timeout (in seconds)

Required range: 20 <= x <= 1500
user
string | null

Return only files uploaded by this user

Example:

"Fir0002"

sort
enum<string>
default:timestamp

Result ordering

Available options:
name,
timestamp
mime
string | null

Filter by MIME type

Example:

"image/jpeg"

min_size
integer | null

Minimum file size in bytes

Required range: x >= 0
max_size
integer | null

Maximum file size in bytes

Required range: x >= 0

Response

Successful Response

title
string
required
@type
string
default:@wikimedia_commons_list_item
image
string
default:""
description_url
string
default:""
web_url
string
default:""
width
integer | null
height
integer | null
size
integer | null
mime
string | null
media_type
string | null
sha1
string | null
uploaded_by
string | null
uploaded_at
string | null