עזרה של MediaWiki API
זהו דף תיעוד של API שנוצר באופן אוטומטי.
תיעוד ודוגמאות: https://www.mediawiki.org/wiki/API
action=query
- יחידה זו דורשת הרשאות קריאה.
Fetch data from and about MediaWiki.
All data modifications will first have to use query to acquire a token to prevent abuse from malicious sites.
- prop
Which properties to get for the queried pages.
- ערכים (מופרדים באמצעות "|"): categories, categoryinfo, contributors, deletedrevisions, duplicatefiles, extlinks, fileusage, imageinfo, images, info, iwlinks, langlinks, links, linkshere, pageprops, redirects, revisions, stashimageinfo, templates, transcludedin
- list
אילו רשימות לקבל.
- ערכים (מופרדים באמצעות "|"): allcategories, alldeletedrevisions, allfileusages, allimages, alllinks, allpages, allredirects, alltransclusions, allusers, backlinks, blocks, categorymembers, deletedrevs, embeddedin, exturlusage, filearchive, imageusage, iwbacklinks, langbacklinks, logevents, pagepropnames, pageswithprop, prefixsearch, protectedtitles, querypage, random, recentchanges, search, tags, usercontribs, users, watchlist, watchlistraw
- meta
Which metadata to get.
- ערכים (מופרדים באמצעות "|"): allmessages, filerepoinfo, siteinfo, tokens, userinfo
- indexpageids
Include an additional pageids section listing all returned page IDs.
- export
Export the current revisions of all given or generated pages.
- exportnowrap
Return the export XML without wrapping it in an XML result (same format as Special:Export). Can only be used with export.
- iwurl
Whether to get the full URL if the title is an interwiki link.
- continue
When present, formats query-continue as key-value pairs that should simply be merged into the original request. This parameter must be set to an empty string in the initial query.
This parameter is recommended for all new development, and will be made default in the next API version.
- rawcontinue
Currently ignored. In the future, continue will become the default and this will be needed to receive the raw query-continue data.
- titles
רשימת כותרות.
- הפרדה בין ערכים נעשית באמצעות | מספר הערכים המרבי הוא 50 (עבור בוטים – 500).
- pageids
רשימת מזהי דף לעובד עליהם.
- הפרדה בין ערכים נעשית באמצעות | מספר הערכים המרבי הוא 50 (עבור בוטים – 500).
- revids
רשימת מזהי גרסה לעבוד עליהם.
- הפרדה בין ערכים נעשית באמצעות | מספר הערכים המרבי הוא 50 (עבור בוטים – 500).
- generator
קבלת רשימת דפים לעבוד עליהם על־ידי הרצת יחידת שאילתה שצוינה.
לתשומת לבך: לשמות בפרמטר generator צריכה להיות התחילית "g", ר' דוגמאות.
- ערך אחד: allcategories, alldeletedrevisions, allfileusages, allimages, alllinks, allpages, allredirects, alltransclusions, backlinks, categories, categorymembers, deletedrevisions, duplicatefiles, embeddedin, exturlusage, fileusage, images, imageusage, iwbacklinks, langbacklinks, links, linkshere, pageswithprop, prefixsearch, protectedtitles, querypage, random, recentchanges, redirects, revisions, search, templates, transcludedin, watchlist, watchlistraw
- redirects
פתרון אוטומטי של הפניות ב־titles, ב־pageids, וב־revids, ודפים שמחזיר generator.
- converttitles
המרת כותרות לסוגי כתב אחרים אם זה נחוץ. זה עובד רק אם שפת הכותרת של הוויקי תומכת בהמרת סוגי כתב. השפות שתמכות בהמרת סוגי כתב הן gan, iu, kk, ku, shi, sr, tg, uz, zh.
- Fetch site info and revisions of Main Page.
- api.php?action=query&prop=revisions&meta=siteinfo&titles=Main%20Page&rvprop=user|comment&continue=
- Fetch revisions of pages beginning with API/.
- api.php?action=query&generator=allpages&gapprefix=API/&prop=revisions&continue=