Wikipedia

List Wikipedia page media

List the images and other media used on a Wikipedia page.

GET/v1/wikipedia/pages/{title}/media
1credit
x-api-keystringheader

API key (`sfk_...`)

Parameters
4
titlestringrequiredpath

Page title on the chosen edition, e.g. `Albert Einstein`, `C++` or `Talk:Barack Obama`. URL-encode it in the path.

langstringoptionalquery

Wikimedia edition code, e.g. `en`, `de`, `ja`, `simple` or `zh-min-nan`. Default: `en`.

limitintegeroptionalquery

Rows per page, 1 to 500. Default: 50.

≥ 1 · ≤ 500

cursorstringoptionalquery

Cursor from `page.nextCursor` of the previous response. It only works with the same filters.

min 1 chars · max 2048 chars

Response fields
27

Endpoint-specific response payload.

datalookupStatus
string

Whether the entity, page or data set exists. A missing entity is `not_found`; an existing entity with no rows is `found` with `empty: true`.

one of: found, not_found

datalang
string

Edition code.

datatitle
string

Title.

datarevision
stringnullable

Revision the media list belongs to.

Media items used on the page.

dataitems[]title
string

File title.

dataitems[]leadImage
booleannullable

Whether it is the lead image.

dataitems[]sectionId
integernullable

Section it appears in.

dataitems[]type
stringnullable

`image`, `audio`, `video` or similar.

dataitems[]showInGallery
booleannullable

Whether it is shown in the gallery.

dataitems[]audioType
stringnullable

Audio kind, when audio.

dataitems[]galleryId
stringnullable

Gallery id, when grouped.

Responsive image sources.

dataitems[]srcset[]src
string

Absolute image URL. The file host may add its own tracking parameters.

dataitems[]srcset[]scale
stringnullable

Pixel-density descriptor, e.g. `2x`.

A media caption.

dataitems[]captionhtml
stringnullable

Caption as HTML.

dataitems[]captiontext
stringnullable

Caption as plain text.

Pagination state. `nextCursor` is null on the last page.

datapagehasMore
boolean

Whether another page is available.

datapagenextCursor
stringnullable

Cursor to pass in the next request when more pages exist; null on the last page.

dataempty
boolean

Whether the answer is a valid empty result rather than missing.

Metadata describing the request and billing outcome.

metarequestId
string

Unique request identifier for tracing this API call.

min 1 chars

metacreditsCharged
integer

Credits charged for this request.

≥ 0

metaversion
string

Public API version that served the response.

one of: v1

Code example

curl "https://api.socialfetch.dev/v1/wikipedia/pages/Albert%20Einstein/media" \
  -H "x-api-key: YOUR_API_KEY"

Responses

List Wikipedia page media