This API provides cacheable and straightforward access to Wikimedia content and data, in machine-readable formats. ### Global Rules - Limit your clients to no more than 200 requests/s to this API. Each API endpoint's documentation may detail more specific usage limits. - Set a unique User-Agent
or Api-User-Agent
header that allows us to contact you quickly. Email addresses or URLs of contact pages work well. By using this API, you agree to Wikimedia's Terms of Use and Privacy Policy. Unless otherwise specified in the endpoint documentation below, content accessed via this API is licensed under the CC-BY-SA 3.0 and GFDL licenses, and you irrevocably agree to release modifications or additions made through this API under these licenses. See https://www.mediawiki.org/wiki/REST_API for background and details. ### Endpoint documentation Please consult each endpoint's documentation for details on: - Licensing information for the specific type of content and data served via the endpoint. - Stability markers to inform you about development status and change policy, according to our API version policy. - Endpoint specific usage limits.
This API client was generated by the swagger-codegen project. By using the swagger-spec from a remote server, you can easily generate an API client.
- API version: 1.0.0
- Package version: 1.0.0
- Build package: io.swagger.codegen.v3.generators.go.GoClientCodegen For more information, please visit http://mediawiki.org/wiki/REST_API
Put the package under your project folder and add the following in import:
import "./swagger"
All URIs are relative to /api/rest_v1
Class | Method | HTTP request | Description |
---|---|---|---|
CitationApi | GetCitation | Get /data/citation/{format}/{query} | Get citation data given an article identifier. |
FeedApi | AggregatedFeed | Get /feed/featured/{yyyy}/{mm}/{dd} | Aggregated featured content |
FeedApi | FeedAnnouncementsGet | Get /feed/announcements | Current announcements to display |
FeedApi | OnThisDay | Get /feed/onthisday/{type}/{mm}/{dd} | Events on this day |
MathApi | MediaMathCheckTypePost | Post /media/math/check/{type} | Check and normalize a TeX formula. |
MathApi | MediaMathFormulaHashGet | Get /media/math/formula/{hash} | Get a previously-stored formula |
MathApi | MediaMathRenderFormatHashGet | Get /media/math/render/{format}/{hash} | Get rendered formula in the given format. |
MobileApi | DataCssMobileTypeGet | Get /data/css/mobile/{type} | Get CSS for mobile apps. |
MobileApi | DataI18nTypeGet | Get /data/i18n/{type} | Get internationalization info |
MobileApi | DataJavascriptMobileTypeGet | Get /data/javascript/mobile/{type} | Get JavaScript for mobileapps |
MobileApi | GetSections | Get /page/mobile-sections/{title} | Get mobile-optimized HTML sections for a title. |
MobileApi | GetSectionsLead | Get /page/mobile-sections-lead/{title} | Get mobile-optimized HTML lead section and metadata for a title. |
MobileApi | GetSectionsLeadWithRevision | Get /page/mobile-sections-lead/{title}/{revision} | Get mobile-optimized HTML lead section and metadata for a title. |
MobileApi | GetSectionsRemaining | Get /page/mobile-sections-remaining/{title} | Get non-lead mobile-optimized HTML sections for a title. |
MobileApi | GetSectionsRemainingWithRevision | Get /page/mobile-sections-remaining/{title}/{revision} | Get non-lead mobile-optimized HTML sections for a title. |
MobileApi | GetSectionsWithRevision | Get /page/mobile-sections/{title}/{revision} | Get mobile-optimized HTML sections for a title. |
OfflineApi | PageMobileHtmlOfflineResourcesTitleGet | Get /page/mobile-html-offline-resources/{title} | Get styles and scripts for offline consumption of mobile-html-formatted pages |
OfflineApi | PageMobileHtmlOfflineResourcesTitleRevisionGet | Get /page/mobile-html-offline-resources/{title}/{revision} | Get styles and scripts for offline consumption of mobile-html-formatted pages |
PageContentApi | GetContentMediaList | Get /page/media-list/{title} | Get list of media files used on a page. |
PageContentApi | GetContentMobileHtml | Get /page/mobile-html/{title} | Get page content HTML optimized for mobile consumption. |
PageContentApi | GetContentWithRevisionMediaList | Get /page/media-list/{title}/{revision} | Get list of media files used on a page. |
PageContentApi | GetContentWithRevisionMobileHtml | Get /page/mobile-html/{title}/{revision} | Get page content HTML optimized for mobile consumption. |
PageContentApi | GetFormatRevision | Get /page/html/{title}/{revision} | Get HTML for a specific title/revision & optionally timeuuid. |
PageContentApi | GetRelatedPages | Get /page/related/{title} | Get pages related to the given title |
PageContentApi | PageDataParsoidTitleRevisionTidGet | Get /page/data-parsoid/{title}/{revision}/{tid} | Get data-parsoid metadata for a specific title/revision/tid. |
PageContentApi | PageGet | Get /page/ | List page-related API entry points. |
PageContentApi | PageHtmlTitleGet | Get /page/html/{title} | Get latest HTML for a title. |
PageContentApi | PageHtmlTitlePost | Post /page/html/{title} | Save a new revision using HTML. |
PageContentApi | PageLintTitleGet | Get /page/lint/{title} | Get the linter errors for a specific title/revision. |
PageContentApi | PageLintTitleRevisionGet | Get /page/lint/{title}/{revision} | Get the linter errors for a specific title/revision. |
PageContentApi | PageMobileHtmlOfflineResourcesTitleGet | Get /page/mobile-html-offline-resources/{title} | Get styles and scripts for offline consumption of mobile-html-formatted pages |
PageContentApi | PageMobileHtmlOfflineResourcesTitleRevisionGet | Get /page/mobile-html-offline-resources/{title}/{revision} | Get styles and scripts for offline consumption of mobile-html-formatted pages |
PageContentApi | PagePdfTitleFormatGet | Get /page/pdf/{title}/{format} | Get a page as PDF |
PageContentApi | PagePdfTitleFormatTypeGet | Get /page/pdf/{title}/{format}/{type} | Get a page as PDF |
PageContentApi | PagePdfTitleGet | Get /page/pdf/{title} | Get a page as PDF |
PageContentApi | PageRandomFormatGet | Get /page/random/{format} | Get content for a random page |
PageContentApi | PageSegmentsTitleGet | Get /page/segments/{title} | Fetches a segmented page to be used in machine translation |
PageContentApi | PageSegmentsTitleRevisionGet | Get /page/segments/{title}/{revision} | Fetches a segmented page to be used in machine translation |
PageContentApi | PageSummaryTitleGet | Get /page/summary/{title} | Get basic metadata and simplified article introduction. |
PageContentApi | PageTitleTitleGet | Get /page/title/{title} | Get revision metadata for a title. |
PageContentApi | PageTitleTitleRevisionGet | Get /page/title/{title}/{revision} | Get revision metadata for a title. |
PageContentApi | PageWikitextTitlePost | Post /page/wikitext/{title} | Save a new revision of a page using Wikitext. |
ReadingListsApi | DataListsBatchPost | Post /data/lists/batch | Create multiple new lists for the current user. |
ReadingListsApi | DataListsChangesSinceDateGet | Get /data/lists/changes/since/{date} | Get recent changes to the lists |
ReadingListsApi | DataListsGet | Get /data/lists/ | Get all lists of the current user. |
ReadingListsApi | DataListsIdDelete | Delete /data/lists/{id} | Delete a list. |
ReadingListsApi | DataListsIdEntriesBatchPost | Post /data/lists/{id}/entries/batch | Create multiple new list entries. |
ReadingListsApi | DataListsIdEntriesEntryIdDelete | Delete /data/lists/{id}/entries/{entry_id} | Delete a list entry. |
ReadingListsApi | DataListsIdEntriesPost | Post /data/lists/{id}/entries/ | Create a new list entry. |
ReadingListsApi | DataListsIdPut | Put /data/lists/{id} | Update a list. |
ReadingListsApi | DataListsPagesProjectTitleGet | Get /data/lists/pages/{project}/{title} | Get lists of the current user which contain a given page. |
ReadingListsApi | DataListsPost | Post /data/lists/ | Create a new list for the current user. |
ReadingListsApi | DataListsSetupPost | Post /data/lists/setup | Opt in to use reading lists. |
ReadingListsApi | DataListsTeardownPost | Post /data/lists/teardown | Opt out from using reading lists. |
ReadingListsApi | GetListEntries | Get /data/lists/{id}/entries/ | Get all entries of a given list. |
RecommendationApi | DataRecommendationArticleCreationMorelikeSeedArticleGet | Get /data/recommendation/article/creation/morelike/{seed_article} | Recommend missing articles |
RecommendationApi | DataRecommendationArticleCreationTranslationFromLangGet | Get /data/recommendation/article/creation/translation/{from_lang} | Recommend articles for translation. |
RecommendationApi | DataRecommendationArticleCreationTranslationFromLangSeedArticleGet | Get /data/recommendation/article/creation/translation/{from_lang}/{seed_article} | Recommend articles for translation. |
TalkPagesApi | PageTalkTitleGet | Get /page/talk/{title} | Get structured talk page contents |
TalkPagesApi | PageTalkTitleRevisionGet | Get /page/talk/{title}/{revision} | Get structured talk page contents |
TransformsApi | DoDict | Get /transform/word/from/{from}/{word} | Fetch the dictionary meaning of a word |
TransformsApi | DoDictProvider | Get /transform/word/from/{from}/{word}/{provider} | Fetch the dictionary meaning of a word |
TransformsApi | DoMT | Post /transform/html/from/{from} | Machine-translate content |
TransformsApi | DoMTProvider | Post /transform/html/from/{from}/{provider} | Machine-translate content |
TransformsApi | TransformHtmlToWikitextPost | Post /transform/html/to/wikitext | Transform HTML to Wikitext |
TransformsApi | TransformHtmlToWikitextTitlePost | Post /transform/html/to/wikitext/{title} | Transform HTML to Wikitext |
TransformsApi | TransformHtmlToWikitextTitleRevisionPost | Post /transform/html/to/wikitext/{title}/{revision} | Transform HTML to Wikitext |
TransformsApi | TransformWikitextToHtmlPost | Post /transform/wikitext/to/html | Transform Wikitext to HTML |
TransformsApi | TransformWikitextToHtmlTitlePost | Post /transform/wikitext/to/html/{title} | Transform Wikitext to HTML |
TransformsApi | TransformWikitextToHtmlTitleRevisionPost | Post /transform/wikitext/to/html/{title}/{revision} | Transform Wikitext to HTML |
TransformsApi | TransformWikitextToLintPost | Post /transform/wikitext/to/lint | Check Wikitext for lint errors |
TransformsApi | TransformWikitextToLintTitlePost | Post /transform/wikitext/to/lint/{title} | Check Wikitext for lint errors |
TransformsApi | TransformWikitextToLintTitleRevisionPost | Post /transform/wikitext/to/lint/{title}/{revision} | Check Wikitext for lint errors |
TransformsApi | TransformWikitextToMobileHtml | Post /transform/wikitext/to/mobile-html/{title} | Transform Wikitext to Mobile HTML |
- Action
- Announcement
- AnnouncementsResponse
- Batch
- CheckTypeBody
- CxDict
- CxDictTranslations
- CxMt
- DataParsoid
- EntriesBatchBody
- Feed
- FromFromBody
- FromProviderBody
- HtmlTitleBody
- HtmlTitleBody1
- Image
- ImageDescription
- InlineResponse200
- InlineResponse2001
- InlineResponse2002
- InlineResponse2003
- InlineResponse2004
- InlineResponse2005
- InlineResponse2005Batch
- InlineResponse2006
- LintTitleBody
- ListCreateBatch
- ListEntryRead
- ListEntryWrite
- ListId
- ListRead
- ListWrite
- Listing
- ListingLinks
- ListingLinksNext
- MediaItem
- MediaItemCaption
- MediaItemOriginal
- MediaList
- MobilehtmlTitleBody
- MorelikeResultInner
- Mostread
- MostreadArticle
- NewsItem
- OnthisdayInner
- OnthisdayResponse
- Originalimage
- Problem
- RecommendationResult
- RecommendationResultItems
- Related
- Result
- Revision
- RevisionIdentifier
- RevisionInfo
- Revisions
- Summary
- SummaryCoordinates
- Thumbnail
- TitleRevisionBody
- TitleRevisionBody1
- TitleRevisionBody2
- TitlesSet
- ToHtmlBody
- ToLintBody
- ToLintBody1
- ToWikitextBody
- WikitextTitleBody
- WikitextTitleBody1
Endpoints do not require authorization.