Wikipedia

Get several Wikipedia pages

Get up to 20 Wikipedia pages in one call, with the lookup status of each requested title.

GET/v1/wikipedia/pages
x-api-keystringheader

API key (`sfk_...`)

Parameters
2
titlesarrayrequiredquery

Page titles separated by `|` (titles may contain commas), 1 to 20, e.g. `Albert Einstein|Barack Obama`. Duplicates are dropped.

langstringoptionalquery

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

Response fields
119

Endpoint-specific response payload.

datalang
string

Edition code.

One entry per requested title, in the order asked.

datapages[]requestedTitle
string

The title as the caller gave it.

datapages[]lookupStatus
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

The page when found; otherwise null.

datapages[]pageid
integernullable

Page id.

datapages[]pagelang
string

Edition code.

datapages[]pagetitle
string

Title.

datapages[]pagedisplayTitle
stringnullable

Title with display markup.

datapages[]pagenamespace
integernullable

Namespace id.

datapages[]pagecontentModel
stringnullable

Content model, e.g. `wikitext`.

datapages[]pagepageLanguage
stringnullable

Page language code.

datapages[]pagelastRevisionId
integernullable

Latest revision id.

datapages[]pagetouchedAt
stringnullable

When the page was last touched.

datapages[]pagelengthBytes
integernullable

Wikitext size in bytes.

datapages[]pageurl
stringnullable

Canonical page URL.

datapages[]pagedescription
stringnullable

Short description.

datapages[]pagedescriptionSource
stringnullable

Where the description comes from.

one of: local, central, null

datapages[]pagepageImage
stringnullable

Lead image file name.

An image URL and its natural size.

datapages[]pageimagesource
string

Image URL. The file host may add its own tracking parameters.

datapages[]pageimagewidth
integernullable

Width in pixels.

≥ 0

datapages[]pageimageheight
integernullable

Height in pixels.

≥ 0

An image URL and its natural size.

datapages[]pagethumbnailsource
string

Image URL. The file host may add its own tracking parameters.

datapages[]pagethumbnailwidth
integernullable

Width in pixels.

≥ 0

datapages[]pagethumbnailheight
integernullable

Height in pixels.

≥ 0

datapages[]pagelanguageCount
integernullable

How many editions have this page.

datapages[]pagewatchers
integernullable

Watchers, when shown.

datapages[]pagevisitingWatchers
integernullable

Recent visitors watching, when shown.

datapages[]pagetalkId
integernullable

Talk page id.

datapages[]pagesubjectId
integernullable

Subject page id on a talk page.

datapages[]pageshared
booleannullableoptional

Whether the file page is hosted on the shared media repository.

datapages[]pageredirectedFrom
stringnullable

The title asked for when it redirected here.

Active protection rules.

datapages[]pageprotection[]type
string

Operation protected, e.g. `edit` or `move`.

datapages[]pageprotection[]level
string

Right needed, e.g. `autoconfirmed` or `sysop`.

datapages[]pageprotection[]expiresAt
stringnullable

When it expires, ISO 8601; null for infinity.

Counts on a category page; null on every other page.

datapages[]pagecategoryInfosize
integernullable

Rows in the category.

≥ 0

datapages[]pagecategoryInfopages
integernullable

Pages in it.

≥ 0

datapages[]pagecategoryInfofiles
integernullable

Files in it.

≥ 0

datapages[]pagecategoryInfosubcats
integernullable

Subcategories.

≥ 0

datapages[]pagecategoryInfohidden
booleannullable

Whether the category is hidden.

Wikidata terms in the page language.

Wikidata labels in the page language.

datapages[]pagetermslabel[]
stringoptional

Wikidata aliases.

datapages[]pagetermsalias[]
stringoptional

Wikidata descriptions.

datapages[]pagetermsdescription[]
stringoptional

Coordinates recorded on the page.

datapages[]pagecoordinates[]lat
numbernullable

Latitude; null when unknown.

datapages[]pagecoordinates[]lon
numbernullable

Longitude; null when unknown.

datapages[]pagecoordinates[]primary
booleannullable

Whether this is the primary point.

datapages[]pagecoordinates[]type
stringnullable

Place type.

datapages[]pagecoordinates[]dim
numbernullable

Size hint in metres.

datapages[]pagecoordinates[]globe
stringnullable

Globe, e.g. `earth`.

datapages[]pagecoordinates[]country
stringnullable

Country code.

datapages[]pagecoordinates[]region
stringnullable

Region code.

datapages[]pagecoordinates[]name
stringnullable

Place name.

datapages[]pagewikidataId
stringnullable

Wikidata entity id.

datapages[]pagedefaultSort
stringnullable

Default sort key.

datapages[]pageisDisambiguation
booleannullable

Whether the page is a disambiguation page.

datapages[]pagevariantTitles
objectnullable

Title in each language variant (zh, sr, kk).

datapages[]pageextract
stringnullable

Plain-text lead, when requested.

Search-index document, when `include=links`.

datapages[]pagesearchIndexincomingLinks
integernullable

How many pages link here.

datapages[]pagesearchIndexpopularityScore
numbernullable

Wikimedia's pageview-derived popularity score.

datapages[]pagesearchIndexcreatedAt
stringnullable

When the page was first created.

datapages[]pagesearchIndextextBytes
integernullable

Text size in bytes.

Machine predictions and weights exactly as the index stores them.

datapages[]pagesearchIndexweightedTags[]
stringoptional

Predicted article topics.

datapages[]pagesearchIndextopics[]topic
string

Predicted topic path.

datapages[]pagesearchIndextopics[]score
number

Confidence from 0 to 1.

Predicted article countries.

datapages[]pagesearchIndexcountries[]country
string

Predicted country.

datapages[]pagesearchIndexcountries[]score
number

Confidence from 0 to 1.

WikiProject weights.

datapages[]pagesearchIndexprojects[]project
string

WikiProject name.

datapages[]pagesearchIndexprojects[]score
number

Weight from 0 to 1.

Weighted tags that are neither a topic, a country nor a project.

datapages[]pagesearchIndexotherTags[]
stringoptional

Every category, hidden ones included.

datapages[]pagesearchIndexcategories[]
stringoptional

Titles that redirect here.

datapages[]pagesearchIndexredirects[]
stringoptional

Section headings.

datapages[]pagesearchIndexheadings[]
stringoptional

Transcluded templates.

datapages[]pagesearchIndextemplates[]
stringoptional

Internal links.

datapages[]pagesearchIndexoutgoingLinks[]
stringoptional

External URLs.

datapages[]pagesearchIndexexternalLinks[]
stringoptional
datapages[]pagesearchIndexopeningText
stringnullable

Plain-text opening.

Coordinates recorded in the search index.

datapages[]pagesearchIndexcoordinates[]lat
numbernullable

Latitude; null when unknown.

datapages[]pagesearchIndexcoordinates[]lon
numbernullable

Longitude; null when unknown.

datapages[]pagesearchIndexcoordinates[]primary
booleannullable

Whether this is the primary point.

datapages[]pagesearchIndexcoordinates[]type
stringnullable

Place type.

datapages[]pagesearchIndexcoordinates[]dim
numbernullable

Size hint in metres.

datapages[]pagesearchIndexcoordinates[]globe
stringnullable

Globe, e.g. `earth`.

datapages[]pagesearchIndexcoordinates[]country
stringnullable

Country code.

datapages[]pagesearchIndexcoordinates[]region
stringnullable

Region code.

datapages[]pagesearchIndexcoordinates[]name
stringnullable

Place name.

WikiProject assessments, when `include=assessments`.

datapages[]pageassessments[]project
string

WikiProject name.

datapages[]pageassessments[]class
stringnullable

Quality class, e.g. `FA`, `GA`, `C`.

datapages[]pageassessments[]importance
stringnullable

Importance, e.g. `Top`.

Daily views, when `include=pageviews`.

datapages[]pageviewsLast60Days[]date
string

Day, `YYYY-MM-DD`.

datapages[]pageviewsLast60Days[]views
integernullable

Views that day; null on a day not yet counted.

≥ 0

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?titles=Albert%20Einstein|Barack%20Obama" \
  -H "x-api-key: YOUR_API_KEY"

Responses

Get several Wikipedia pages