For AI agents: the complete documentation index is available at https://types-mediawiki-response.pages.dev/zh/llms.txt, the full documentation bundle is available at https://types-mediawiki-response.pages.dev/zh/llms-full.txt, and this page is available as Markdown at https://types-mediawiki-response.pages.dev/zh/api/core/ApiPage.md.
  • 中文
  • Interface: ApiPage

    Defined in: core/query/index.ts:404

    A query.pages entry carrying the union of all covered prop= fields. prop= modules widen this via declaration merging (see ./info); every field is optional because pages may be missing/invalid and because a response only contains the props that were requested.

    For a view scoped to the props you actually requested, use QueryPage.

    Extends

    Properties

    actions?

    optional actions?: unknown[] | Record<string, boolean | ApiActionPermission[]>

    Defined in: core/query/info.ts:142

    Per-action permission test results, keyed by action name. Set by intestactions=: intestactionsdetail=boolean yields a boolean per action, while full/quick yields the array of blocking messages (empty when the action is allowed). A PHP map, so an empty result serializes as [].

    Inherited from

    ApiPageInfo.actions


    anoncontributors?

    optional anoncontributors?: number

    Defined in: core/query/contributors.ts:29

    Number of anonymous (IP) contributors to the page (prop=contributors).

    Inherited from

    ApiPageContributors.anoncontributors


    associatedpage?

    optional associatedpage?: string

    Defined in: core/query/info.ts:218

    Related page: the talk page for a subject, or vice versa. inprop=associatedpage; subject/talk namespaces only — not emitted on special or Media: pages.

    Inherited from

    ApiPageInfo.associatedpage


    badfile?

    optional badfile?: boolean

    Defined in: core/query/imageinfo.ts:263

    Whether the file is on the "bad images" list ($wgBadImageList). iiprop=badfile — a real boolean, and a page-level sibling of ApiPage.imageinfo, not a member of the imageinfo entry.

    Inherited from

    ApiPageImageInfo.badfile


    canonicalurl?

    optional canonicalurl?: string

    Defined in: core/query/info.ts:233

    Canonical URL. inprop=url.

    Inherited from

    ApiPageInfo.canonicalurl


    categories?

    optional categories?: ApiCategory[]

    Defined in: core/query/categories.ts:33

    Categories the page belongs to (prop=categories).


    categoryinfo?

    optional categoryinfo?: ApiCategoryInfo

    Defined in: core/query/categoryinfo.ts:29

    Category membership counts (prop=categoryinfo).


    categorysnippet?

    optional categorysnippet?: string

    Defined in: core/query/search.ts:56

    Snippet of the matching category. srprop=categorysnippet.

    Inherited from

    ApiSearchResult.categorysnippet


    contentmodel?

    optional contentmodel?: ContentModel

    Defined in: core/query/info.ts:67

    Content model of the page's current revision.

    Inherited from

    ApiPageInfo.contentmodel


    contributors?

    optional contributors?: ApiContributor[]

    Defined in: core/query/contributors.ts:26

    Distinct logged-in contributors to the page (prop=contributors).

    Inherited from

    ApiPageContributors.contributors


    deletedrevisions?

    optional deletedrevisions?: ApiRevision[]

    Defined in: core/query/deletedrevisions.ts:20

    Deleted revisions of the page (prop=deletedrevisions).


    description?

    optional description?: string

    Defined in: extensions/description.ts:22

    Short description of the page, in the wiki's content language (prop=description).


    descriptionsource?

    optional descriptionsource?: DescriptionSource

    Defined in: extensions/description.ts:25

    Which source supplied the description: local or an upstream repo.


    displaytitle?

    optional displaytitle?: string

    Defined in: core/query/info.ts:236

    HTML title used for display. inprop=displaytitle.

    Inherited from

    ApiPageInfo.displaytitle


    duplicatefiles?

    optional duplicatefiles?: ApiDuplicateFile[]

    Defined in: core/query/duplicatefiles.ts:32

    Files whose content matches this one (prop=duplicatefiles).


    editintro?

    optional editintro?: Record<string, string>

    Defined in: core/query/info.ts:205

    Notices the edit form should show, keyed by message name (e.g. newarticletext) with HTML values. Drawn from the whole edit-form intro message set — newarticletext, talkpagetext, per-namespace editnotices, Editintro pages, … — not only MediaWiki:Editintro* pages. inprop=editintro; only for a single title per query.

    Since

    MediaWiki 1.41

    Inherited from

    ApiPageInfo.editintro


    editurl?

    optional editurl?: string

    Defined in: core/query/info.ts:230

    Edit-page URL. inprop=url.

    Inherited from

    ApiPageInfo.editurl


    extensiondata?

    optional extensiondata?: unknown

    Defined in: core/query/search.ts:74

    Search-backend extension data, keyed by augmentor name. srprop=extensiondata.

    Inherited from

    ApiSearchResult.extensiondata


    optional extlinks?: ApiExternalLink[]

    Defined in: core/query/extlinks.ts:17

    External links on this page (prop=extlinks).


    extract?

    optional extract?: string

    Defined in: extensions/extracts.ts:25

    Page excerpt, limited to the intro with exintro (prop=extracts).


    fileusage?

    optional fileusage?: ApiFileUsage[]

    Defined in: core/query/fileusage.ts:29

    Local pages using this file (prop=fileusage).


    flagged?

    optional flagged?: ApiPageFlagged

    Defined in: extensions/flaggedrevs.ts:210

    Review and stabilization state of the page (prop=flagged).


    fullurl?

    optional fullurl?: string

    Defined in: core/query/info.ts:227

    Fully-resolved canonical article URL. inprop=url.

    Inherited from

    ApiPageInfo.fullurl


    globalusage?

    optional globalusage?: ApiGlobalUsage[]

    Defined in: extensions/globalusage.ts:43

    Wikis using this image, one entry per using page (prop=globalusage).


    imageinfo?

    optional imageinfo?: ApiImageInfo[]

    Defined in: core/query/imageinfo.ts:266

    Image/file info entries (prop=imageinfo); usually one for the current file.

    Inherited from

    ApiPageImageInfo.imageinfo


    imagerepository?

    optional imagerepository?: string & object | "local" | "shared"

    Defined in: core/query/imageinfo.ts:256

    Where the file is hosted: the repository name, local for this wiki; '' when the file does not exist. Framework field for file pages.

    Inherited from

    ApiPageImageInfo.imagerepository


    images?

    optional images?: ApiUsedImage[]

    Defined in: core/query/images.ts:21

    Files embedded by this page (prop=images).


    index?

    optional index?: number

    Defined in: core/query/index.ts:411

    1-based rank of the page in the generator's ordering; injected by the query framework for generator=search and generator=prefixsearch, absent otherwise. A page reached through a redirect takes the smaller of the two ranks.


    invalid?

    optional invalid?: true

    Defined in: core/query/index.ts:384

    true when the supplied title is not a valid title.

    Inherited from

    ApiPageIdentity.invalid


    invalidreason?

    optional invalidreason?: string | ApiMessage

    Defined in: core/query/index.ts:390

    Why the title is invalid: a plain string under the default (bc) errorformat, an ApiMessage under a modern one.

    Inherited from

    ApiPageIdentity.invalidreason


    isfilematch?

    optional isfilematch?: boolean

    Defined in: core/query/search.ts:71

    Whether the hit matched a file. srprop=isfilematch; a real boolean.

    Inherited from

    ApiSearchResult.isfilematch


    optional iwlinks?: ApiInterwikiLink[]

    Defined in: core/query/iwlinks.ts:23

    Interwiki links on the page (prop=iwlinks).


    known?

    optional known?: true

    Defined in: core/query/index.ts:381

    true when the page does not exist but its content is known (e.g. a defined but unsaved interface message). Emitted by the framework itself, without requesting prop=info.

    Inherited from

    ApiPageIdentity.known


    optional langlinks?: ApiLangLink[]

    Defined in: core/query/langlinks.ts:35

    Interlanguage links from this page (prop=langlinks).


    lastrevid?

    optional lastrevid?: number

    Defined in: core/query/info.ts:82

    Revision id of the latest revision. Existing pages only.

    Inherited from

    ApiPageInfo.lastrevid


    length?

    optional length?: number

    Defined in: core/query/info.ts:85

    Length of the page content in bytes. Existing pages only.

    Inherited from

    ApiPageInfo.length


    linkclasses?

    optional linkclasses?: string[]

    Defined in: core/query/info.ts:250

    CSS classes to apply to links to this page (core marks redirects mw-redirect; extensions may add more). inprop=linkclasses; emitted for every requested page, [] when there is no class for it.

    Inherited from

    ApiPageInfo.linkclasses


    optional links?: ApiPageLink[]

    Defined in: core/query/links.ts:23

    Pages linked-to by this page (prop=links).


    linkshere?

    optional linkshere?: ApiLinksHere[]

    Defined in: core/query/linkshere.ts:28

    Pages linking to this page (prop=linkshere).


    missing?

    optional missing?: true

    Defined in: core/query/index.ts:374

    true when the page does not exist.

    Inherited from

    ApiPageIdentity.missing


    mmcontent?

    optional mmcontent?: ApiMmContent

    Defined in: extensions/massmessage.ts:120

    Parsed delivery list content (only on MassMessageListContent pages).


    new?

    optional new?: true

    Defined in: core/query/info.ts:94

    true when the page is in the new-pages list (no other page links to it and it has a single revision). A Flag — absent for established pages.

    Inherited from

    ApiPageInfo.new


    notificationtimestamp?

    optional notificationtimestamp?: string

    Defined in: core/query/info.ts:158

    When the requesting user last saw the page. An empty string when never visited (or when notifications are off), otherwise a timestamp. inprop=notificationtimestamp.

    Inherited from

    ApiPageInfo.notificationtimestamp


    ns?

    optional ns?: number

    Defined in: core/query/index.ts:368

    Namespace index.

    Inherited from

    ApiPageIdentity.ns


    original?

    optional original?: ApiThumbnail

    Defined in: extensions/pageimages.ts:40

    Representative image at its own dimensions (piprop=original).


    pageid?

    optional pageid?: number

    Defined in: core/query/index.ts:365

    Page id. Absent when the id is unknown: a missing page requested by page id keeps its pageid alongside missing, while title-supplied missing/invalid pages and special pages carry no pageid.

    Inherited from

    ApiPageIdentity.pageid


    pageimage?

    optional pageimage?: string

    Defined in: extensions/pageimages.ts:34

    Name of the page's representative image (piprop=name).


    pagelanguage?

    optional pagelanguage?: string

    Defined in: core/query/info.ts:70

    Page language code, e.g. en.

    Inherited from

    ApiPageInfo.pagelanguage


    pagelanguagedir?

    optional pagelanguagedir?: "ltr" | "rtl"

    Defined in: core/query/info.ts:76

    Writing direction of the page language.

    Inherited from

    ApiPageInfo.pagelanguagedir


    pagelanguagehtmlcode?

    optional pagelanguagehtmlcode?: string

    Defined in: core/query/info.ts:73

    HTML lang attribute value for the page language.

    Inherited from

    ApiPageInfo.pagelanguagehtmlcode


    pageprops?

    optional pageprops?: ApiPageProps

    Defined in: core/query/pageprops.ts:19

    Page properties (prop=pageprops), keyed by property name.


    pageviews?

    optional pageviews?: ApiViewCounts

    Defined in: extensions/pageviews.ts:54

    prop=pageviews (pvipdays, default 60): per-day view counts for this page.


    preload?

    optional preload?: string

    Defined in: core/query/info.ts:176

    Text pre-filled into the edit box for a missing page, from the EditFormPreloadText hook. '' when the page exists. inprop=preload.

    Deprecated

    since MediaWiki 1.41 in favour of preloadcontent, which also reports the content model and format.

    Inherited from

    ApiPageInfo.preload


    preloadcontent?

    optional preloadcontent?: ApiPreloadedContent

    Defined in: core/query/info.ts:186

    Content the edit form would preload: for a page that does not exist yet, or for an existing page when a new section would be added (preloadnewsection=1). inprop=preloadcontent; only for a single title/revision per query.

    Since

    MediaWiki 1.41

    Inherited from

    ApiPageInfo.preloadcontent


    preloadisdefault?

    optional preloadisdefault?: boolean

    Defined in: core/query/info.ts:194

    Whether preloadcontent is identical to the page's default content, in which case saving it would be a no-op. inprop=preloadcontent.

    Since

    MediaWiki 1.41

    Inherited from

    ApiPageInfo.preloadisdefault


    protection?

    optional protection?: ApiPageProtection[]

    Defined in: core/query/info.ts:208

    Protection entries; empty array when unrestricted. inprop=protection.

    Inherited from

    ApiPageInfo.protection


    readable?

    optional readable?: boolean

    Defined in: core/query/info.ts:166

    Whether the current user may read the page. A real boolean (false included). inprop=readable.

    Deprecated

    since MediaWiki 1.32; use intestactions=read instead.

    Inherited from

    ApiPageInfo.readable


    redirect?

    optional redirect?: true

    Defined in: core/query/info.ts:88

    true when the page is a redirect. A Flag (appears only when true).

    Inherited from

    ApiPageInfo.redirect


    redirects?

    optional redirects?: ApiRedirect[]

    Defined in: core/query/redirects.ts:30

    Redirects pointing at this page (prop=redirects).


    redirectsnippet?

    optional redirectsnippet?: string

    Defined in: core/query/search.ts:68

    HTML snippet of the redirect target title. srprop=redirectsnippet.

    Inherited from

    ApiSearchResult.redirectsnippet


    redirecttitle?

    optional redirecttitle?: string

    Defined in: core/query/search.ts:65

    Title of the redirect target, if this hit redirects. srprop=redirecttitle.

    Inherited from

    ApiSearchResult.redirecttitle


    restrictiontypes?

    optional restrictiontypes?: string[]

    Defined in: core/query/info.ts:211

    Restriction types that apply, e.g. edit, move, create. inprop=protection.

    Inherited from

    ApiPageInfo.restrictiontypes


    revisions?

    optional revisions?: ApiRevision[]

    Defined in: core/query/revisions.ts:213

    Revisions of the page (prop=revisions), newest first unless rvdir=newer.


    sectionsnippet?

    optional sectionsnippet?: string

    Defined in: core/query/search.ts:62

    HTML snippet of the section heading. srprop=sectionsnippet.

    Inherited from

    ApiSearchResult.sectionsnippet


    sectiontitle?

    optional sectiontitle?: string

    Defined in: core/query/search.ts:59

    Title of the section the match is in. srprop=sectiontitle.

    Inherited from

    ApiSearchResult.sectiontitle


    size?

    optional size?: number

    Defined in: core/query/search.ts:41

    Page size in bytes. srprop=size.

    Inherited from

    ApiSearchResult.size


    snippet?

    optional snippet?: string

    Defined in: core/query/search.ts:50

    HTML snippet of the match, with highlights. srprop=snippet.

    Inherited from

    ApiSearchResult.snippet


    special?

    optional special?: true

    Defined in: core/query/index.ts:393

    true for pages in a special namespace.

    Inherited from

    ApiPageIdentity.special


    subjectid?

    optional subjectid?: number

    Defined in: core/query/info.ts:224

    Page id of the associated subject page. inprop=subjectid (talk pages only).

    Inherited from

    ApiPageInfo.subjectid


    talkid?

    optional talkid?: number

    Defined in: core/query/info.ts:221

    Page id of the associated talk page. inprop=talkid (subject pages only).

    Inherited from

    ApiPageInfo.talkid


    templates?

    optional templates?: ApiTemplate[]

    Defined in: core/query/templates.ts:21

    Pages transcluded by this page (prop=templates).


    terms?

    optional terms?: ApiPageTerms

    Defined in: extensions/wikibase.ts:108

    prop=pageterms: terms of the entity linked to this page.


    thumbnail?

    optional thumbnail?: ApiThumbnail

    Defined in: extensions/pageimages.ts:37

    Representative image, scaled to pithumbsize (piprop=thumbnail).


    timestamp?

    optional timestamp?: string

    Defined in: core/query/search.ts:47

    Last-edit timestamp. srprop=timestamp.

    Inherited from

    ApiSearchResult.timestamp


    title?

    optional title?: string

    Defined in: core/query/index.ts:371

    Full, normalized page title.

    Inherited from

    ApiPageIdentity.title


    titlesnippet?

    optional titlesnippet?: string

    Defined in: core/query/search.ts:53

    HTML snippet of the title. srprop=titlesnippet.

    Inherited from

    ApiSearchResult.titlesnippet


    touched?

    optional touched?: string

    Defined in: core/query/info.ts:79

    When the page was last touched (cache/link invalidation), not last edited. Existing pages only.

    Inherited from

    ApiPageInfo.touched


    transcludedin?

    optional transcludedin?: ApiTranscludedIn[]

    Defined in: core/query/transcludedin.ts:28

    Pages transcluding this page (prop=transcludedin).


    transcodestatus?

    optional transcodestatus?: unknown[] | Record<string, ApiTranscodeState>

    Defined in: extensions/timedmediahandler.ts:170

    Per-transcode job states, keyed by transcode key; [] — an empty array, not an empty object — when the file has no transcodes at all.


    varianttitles?

    optional varianttitles?: Record<string, string>

    Defined in: core/query/info.ts:243

    Display titles per language variant, keyed by variant code (e.g. zh-hans). Also populated on wikis without language variants, where the single key is the content language itself. inprop=varianttitles.

    Inherited from

    ApiPageInfo.varianttitles


    videoinfo?

    optional videoinfo?: ApiVideoInfo[]

    Defined in: extensions/timedmediahandler.ts:164

    File info extended with video sources and subtitle tracks.


    visitingwatchers?

    optional visitingwatchers?: number

    Defined in: core/query/info.ts:116

    Number of watchers who have visited the page since their notification timestamp. Same withholding rule as watchers. inprop=visitingwatchers.

    Inherited from

    ApiPageInfo.visitingwatchers


    watched?

    optional watched?: boolean

    Defined in: core/query/info.ts:101

    Whether the requesting user watches the page. A real boolean (false is returned), unlike most watch markers. inprop=watched; requires being logged in with the viewmywatchlist right.

    Inherited from

    ApiPageInfo.watched


    watchers?

    optional watchers?: number

    Defined in: core/query/info.ts:109

    Number of users watching the page. For callers without the unwatchedpages right the count is withheld entirely while it stays below $wgUnwatchedPageThreshold; 0 is only reported to callers with that right. inprop=watchers.

    Inherited from

    ApiPageInfo.watchers


    watchlistexpiry?

    optional watchlistexpiry?: string

    Defined in: core/query/info.ts:123

    When the requesting user's watch of this page expires. Requires inprop=watched; present only when the page is watched with an expiry (action=watch&expiry=).

    Inherited from

    ApiPageInfo.watchlistexpiry


    watchlistlabels?

    optional watchlistlabels?: ApiWatchlistLabel[]

    Defined in: core/query/info.ts:133

    Watchlist labels attached to this page by the requesting user. inprop=watchlistlabels; requires being logged in with the viewmywatchlist right (like watched) and $wgEnableWatchlistLabels, and is [] when the page has none.

    Since

    MediaWiki 1.46

    Inherited from

    ApiPageInfo.watchlistlabels


    wbentityusage?

    optional wbentityusage?: ApiEntityUsageMap

    Defined in: extensions/wikibase.ts:111

    prop=wbentityusage: entities used by this page, keyed by entity id.


    wordcount?

    optional wordcount?: number

    Defined in: core/query/search.ts:44

    Word count. srprop=wordcount.

    Inherited from

    ApiSearchResult.wordcount


    wouldautocreate?

    optional wouldautocreate?: unknown[] | Record<string, boolean>

    Defined in: core/query/info.ts:151

    Whether a temporary account would be auto-created for each tested action. intestactionsautocreate=1 alongside intestactions=. A PHP map, so an empty result serializes as [].

    Since

    MediaWiki 1.41

    Inherited from

    ApiPageInfo.wouldautocreate