Wikipedia API (Generated using OpenAPI Generators)

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 Dart package is automatically generated by the OpenAPI Generator project:

Requirements

Dart 2.12 or later

Installation & Usage

Run the following to install:

$ flutter pub add wikipedia_api

Tests

TODO

Getting Started

Please follow the installation procedure and then run the following:

import 'package:wikipedia_api/api.dart';


final api_instance = CitationApi();
final format = format_example; // String | The format to use for the resulting citation data
final query = query_example; // String | URL of an article, DOI, PMCID or PMID in the URL-encoded format. Note that on the Swagger-UI doc page you don't need to URI-encode the parameter manually, it will be done by the docs engine. 
final acceptLanguage = acceptLanguage_example; // String | For some articles the result depends on the `Accept-Language` header, so provide it if localized content is required. 

try {
    final result = api_instance.getCitation(format, query, acceptLanguage);
    print(result);
} catch (e) {
    print('Exception when calling CitationApi->getCitation: $e\n');
}

Documentation for API Endpoints

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 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.
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

Documentation For Models

Documentation For Authorization

Endpoints do not require authorization.

Library Author

Kingkor Roy Tirtho

Libraries

wikipedia_api