Skip to main content
POST
/
api
/
wikimedia_commons
/
files
/wikimedia_commons/files
curl --request POST \
  --url https://api.anysite.io/api/wikimedia_commons/files \
  --header 'Content-Type: application/json' \
  --header 'access-token: <api-key>' \
  --data '
{
  "file": "<string>",
  "timeout": 300,
  "thumb_width": 5000,
  "history": false
}
'
[
  {
    "id": 123,
    "title": "<string>",
    "@type": "@wikimedia_commons_file",
    "image": "",
    "thumbnail": "<string>",
    "description_url": "",
    "web_url": "",
    "width": 123,
    "height": 123,
    "size": 123,
    "mime": "<string>",
    "media_type": "<string>",
    "sha1": "<string>",
    "uploaded_by": "<string>",
    "uploaded_at": "<string>",
    "description": "<string>",
    "object_name": "<string>",
    "author": "<string>",
    "credit": "<string>",
    "license": "<string>",
    "license_short_name": "<string>",
    "license_url": "<string>",
    "usage_terms": "<string>",
    "is_copyrighted": true,
    "attribution_required": true,
    "restrictions": "<string>",
    "date": "<string>",
    "categories": [],
    "assessments": [],
    "latitude": 123,
    "longitude": 123,
    "gps_map_datum": "<string>",
    "revisions": []
  }
]

Authorizations

access-token
string
header
required

API token from the dashboard

Headers

access-token
string
required

Body

application/json
file
string
required

File name, numeric page id, or a Wikimedia Commons file URL

Minimum string length: 1
Examples:

"File:Felis catus-cat on snow.jpg"

"9437797"

"https://commons.wikimedia.org/wiki/File:Felis_catus-cat_on_snow.jpg"

timeout
integer
default:300

Max scrapping execution timeout (in seconds)

Required range: 20 <= x <= 1500
thumb_width
integer | null

Width in pixels of an additional scaled thumbnail URL

Required range: 1 <= x <= 10000
history
boolean
default:false

Include the file's upload revision history

Response

Successful Response

id
integer
required
title
string
required
@type
string
default:@wikimedia_commons_file
image
string
default:""
thumbnail
string | null
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
description
string | null
object_name
string | null
author
string | null
credit
string | null
license
string | null
license_short_name
string | null
license_url
string | null
usage_terms
string | null
is_copyrighted
boolean | null
attribution_required
boolean | null
restrictions
string | null
date
string | null
categories
string[]
assessments
string[]
latitude
number | null
longitude
number | null
gps_map_datum
string | null
revisions
WikimediaCommonsFileRevision · object[]