Wikipedia

Get Wikipedia page

Get a Wikipedia page's identity, lead, images, protection and optional assessments and pageviews.

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

API key (`sfk_...`)

Parameters
3
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`.

includearrayoptionalquery

Extra parts: `links` (search-index lists), `assessments` (WikiProject classes and importance) and `pageviews` (the last 60 days), comma-separated. Default: none.

any of: links, assessments, pageviews (comma-separated)

Response fields
117

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.

The page when found; otherwise null.

datapageid
integernullable

Page id.

datapagelang
string

Edition code.

datapagetitle
string

Title.

datapagedisplayTitle
stringnullable

Title with display markup.

datapagenamespace
integernullable

Namespace id.

datapagecontentModel
stringnullable

Content model, e.g. `wikitext`.

datapagepageLanguage
stringnullable

Page language code.

datapagelastRevisionId
integernullable

Latest revision id.

datapagetouchedAt
stringnullable

When the page was last touched.

datapagelengthBytes
integernullable

Wikitext size in bytes.

datapageurl
stringnullable

Canonical page URL.

datapagedescription
stringnullable

Short description.

datapagedescriptionSource
stringnullable

Where the description comes from.

one of: local, central, null

datapagepageImage
stringnullable

Lead image file name.

An image URL and its natural size.

datapageimagesource
string

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

datapageimagewidth
integernullable

Width in pixels.

≥ 0

datapageimageheight
integernullable

Height in pixels.

≥ 0

An image URL and its natural size.

datapagethumbnailsource
string

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

datapagethumbnailwidth
integernullable

Width in pixels.

≥ 0

datapagethumbnailheight
integernullable

Height in pixels.

≥ 0

datapagelanguageCount
integernullable

How many editions have this page.

datapagewatchers
integernullable

Watchers, when shown.

datapagevisitingWatchers
integernullable

Recent visitors watching, when shown.

datapagetalkId
integernullable

Talk page id.

datapagesubjectId
integernullable

Subject page id on a talk page.

datapageshared
booleannullableoptional

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

datapageredirectedFrom
stringnullable

The title asked for when it redirected here.

Active protection rules.

datapageprotection[]type
string

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

datapageprotection[]level
string

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

datapageprotection[]expiresAt
stringnullable

When it expires, ISO 8601; null for infinity.

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

datapagecategoryInfosize
integernullable

Rows in the category.

≥ 0

datapagecategoryInfopages
integernullable

Pages in it.

≥ 0

datapagecategoryInfofiles
integernullable

Files in it.

≥ 0

datapagecategoryInfosubcats
integernullable

Subcategories.

≥ 0

datapagecategoryInfohidden
booleannullable

Whether the category is hidden.

Wikidata terms in the page language.

Wikidata labels in the page language.

datapagetermslabel[]
stringoptional

Wikidata aliases.

datapagetermsalias[]
stringoptional

Wikidata descriptions.

datapagetermsdescription[]
stringoptional

Coordinates recorded on the page.

datapagecoordinates[]lat
numbernullable

Latitude; null when unknown.

datapagecoordinates[]lon
numbernullable

Longitude; null when unknown.

datapagecoordinates[]primary
booleannullable

Whether this is the primary point.

datapagecoordinates[]type
stringnullable

Place type.

datapagecoordinates[]dim
numbernullable

Size hint in metres.

datapagecoordinates[]globe
stringnullable

Globe, e.g. `earth`.

datapagecoordinates[]country
stringnullable

Country code.

datapagecoordinates[]region
stringnullable

Region code.

datapagecoordinates[]name
stringnullable

Place name.

datapagewikidataId
stringnullable

Wikidata entity id.

datapagedefaultSort
stringnullable

Default sort key.

datapageisDisambiguation
booleannullable

Whether the page is a disambiguation page.

datapagevariantTitles
objectnullable

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

datapageextract
stringnullable

Plain-text lead, when requested.

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

datapagesearchIndexincomingLinks
integernullable

How many pages link here.

datapagesearchIndexpopularityScore
numbernullable

Wikimedia's pageview-derived popularity score.

datapagesearchIndexcreatedAt
stringnullable

When the page was first created.

datapagesearchIndextextBytes
integernullable

Text size in bytes.

Machine predictions and weights exactly as the index stores them.

datapagesearchIndexweightedTags[]
stringoptional

Predicted article topics.

datapagesearchIndextopics[]topic
string

Predicted topic path.

datapagesearchIndextopics[]score
number

Confidence from 0 to 1.

Predicted article countries.

datapagesearchIndexcountries[]country
string

Predicted country.

datapagesearchIndexcountries[]score
number

Confidence from 0 to 1.

WikiProject weights.

datapagesearchIndexprojects[]project
string

WikiProject name.

datapagesearchIndexprojects[]score
number

Weight from 0 to 1.

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

datapagesearchIndexotherTags[]
stringoptional

Every category, hidden ones included.

datapagesearchIndexcategories[]
stringoptional

Titles that redirect here.

datapagesearchIndexredirects[]
stringoptional

Section headings.

datapagesearchIndexheadings[]
stringoptional

Transcluded templates.

datapagesearchIndextemplates[]
stringoptional

Internal links.

datapagesearchIndexoutgoingLinks[]
stringoptional

External URLs.

datapagesearchIndexexternalLinks[]
stringoptional
datapagesearchIndexopeningText
stringnullable

Plain-text opening.

Coordinates recorded in the search index.

datapagesearchIndexcoordinates[]lat
numbernullable

Latitude; null when unknown.

datapagesearchIndexcoordinates[]lon
numbernullable

Longitude; null when unknown.

datapagesearchIndexcoordinates[]primary
booleannullable

Whether this is the primary point.

datapagesearchIndexcoordinates[]type
stringnullable

Place type.

datapagesearchIndexcoordinates[]dim
numbernullable

Size hint in metres.

datapagesearchIndexcoordinates[]globe
stringnullable

Globe, e.g. `earth`.

datapagesearchIndexcoordinates[]country
stringnullable

Country code.

datapagesearchIndexcoordinates[]region
stringnullable

Region code.

datapagesearchIndexcoordinates[]name
stringnullable

Place name.

WikiProject assessments, when `include=assessments`.

datapageassessments[]project
string

WikiProject name.

datapageassessments[]class
stringnullable

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

datapageassessments[]importance
stringnullable

Importance, e.g. `Top`.

Daily views, when `include=pageviews`.

datapageviewsLast60Days[]date
string

Day, `YYYY-MM-DD`.

datapageviewsLast60Days[]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/Albert%20Einstein" \
  -H "x-api-key: YOUR_API_KEY"

Responses

Get Wikipedia page