Home

Awesome

Wikipedia API (Generated using OpenAPI Generators)

This API provides cacheable and straightforward access to Wikimedia content and data, in machine-readable formats.

Global Rules

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:

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

ClassMethodHTTP requestDescription
CitationApigetCitationGET /data/citation/{format}/{query}Get citation data given an article identifier.
FeedApiaggregatedFeedGET /feed/featured/{yyyy}/{mm}/{dd}Aggregated featured content
FeedApifeedAnnouncementsGetGET /feed/announcementsCurrent announcements to display
FeedApionThisDayGET /feed/onthisday/{type}/{mm}/{dd}Events on this day
MathApimediaMathCheckTypePostPOST /media/math/check/{type}Check and normalize a TeX formula.
MathApimediaMathFormulaHashGetGET /media/math/formula/{hash}Get a previously-stored formula
MathApimediaMathRenderFormatHashGetGET /media/math/render/{format}/{hash}Get rendered formula in the given format.
MobileApidataCssMobileTypeGetGET /data/css/mobile/{type}Get CSS for mobile apps.
MobileApidataI18nTypeGetGET /data/i18n/{type}Get internationalization info
MobileApidataJavascriptMobileTypeGetGET /data/javascript/mobile/{type}Get JavaScript for mobileapps
MobileApigetSectionsGET /page/mobile-sections/{title}Get mobile-optimized HTML sections for a title.
MobileApigetSectionsLeadGET /page/mobile-sections-lead/{title}Get mobile-optimized HTML lead section and metadata for a title.
MobileApigetSectionsLeadWithRevisionGET /page/mobile-sections-lead/{title}/{revision}Get mobile-optimized HTML lead section and metadata for a title.
MobileApigetSectionsRemainingGET /page/mobile-sections-remaining/{title}Get non-lead mobile-optimized HTML sections for a title.
MobileApigetSectionsRemainingWithRevisionGET /page/mobile-sections-remaining/{title}/{revision}Get non-lead mobile-optimized HTML sections for a title.
MobileApigetSectionsWithRevisionGET /page/mobile-sections/{title}/{revision}Get mobile-optimized HTML sections for a title.
OfflineApipageMobileHtmlOfflineResourcesTitleGetGET /page/mobile-html-offline-resources/{title}Get styles and scripts for offline consumption of mobile-html-formatted pages
OfflineApipageMobileHtmlOfflineResourcesTitleRevisionGetGET /page/mobile-html-offline-resources/{title}/{revision}Get styles and scripts for offline consumption of mobile-html-formatted pages
PageContentApigetContentMediaListGET /page/media-list/{title}Get list of media files used on a page.
PageContentApigetContentMobileHtmlGET /page/mobile-html/{title}Get page content HTML optimized for mobile consumption.
PageContentApigetContentWithRevisionMediaListGET /page/media-list/{title}/{revision}Get list of media files used on a page.
PageContentApigetContentWithRevisionMobileHtmlGET /page/mobile-html/{title}/{revision}Get page content HTML optimized for mobile consumption.
PageContentApigetFormatRevisionGET /page/html/{title}/{revision}Get HTML for a specific title/revision & optionally timeuuid.
PageContentApigetRelatedPagesGET /page/related/{title}Get pages related to the given title
PageContentApipageDataParsoidTitleRevisionTidGetGET /page/data-parsoid/{title}/{revision}/{tid}Get data-parsoid metadata for a specific title/revision/tid.
PageContentApipageGetGET /page/List page-related API entry points.
PageContentApipageHtmlTitleGetGET /page/html/{title}Get latest HTML for a title.
PageContentApipageLintTitleGetGET /page/lint/{title}Get the linter errors for a specific title/revision.
PageContentApipageLintTitleRevisionGetGET /page/lint/{title}/{revision}Get the linter errors for a specific title/revision.
PageContentApipageMobileHtmlOfflineResourcesTitleGetGET /page/mobile-html-offline-resources/{title}Get styles and scripts for offline consumption of mobile-html-formatted pages
PageContentApipageMobileHtmlOfflineResourcesTitleRevisionGetGET /page/mobile-html-offline-resources/{title}/{revision}Get styles and scripts for offline consumption of mobile-html-formatted pages
PageContentApipagePdfTitleFormatGetGET /page/pdf/{title}/{format}Get a page as PDF
PageContentApipagePdfTitleFormatTypeGetGET /page/pdf/{title}/{format}/{type}Get a page as PDF
PageContentApipagePdfTitleGetGET /page/pdf/{title}Get a page as PDF
PageContentApipageRandomFormatGetGET /page/random/{format}Get content for a random page
PageContentApipageSegmentsTitleGetGET /page/segments/{title}Fetches a segmented page to be used in machine translation
PageContentApipageSegmentsTitleRevisionGetGET /page/segments/{title}/{revision}Fetches a segmented page to be used in machine translation
PageContentApipageSummaryTitleGetGET /page/summary/{title}Get basic metadata and simplified article introduction.
PageContentApipageTitleTitleGetGET /page/title/{title}Get revision metadata for a title.
PageContentApipageTitleTitleRevisionGetGET /page/title/{title}/{revision}Get revision metadata for a title.
ReadingListsApidataListsBatchPostPOST /data/lists/batchCreate multiple new lists for the current user.
ReadingListsApidataListsChangesSinceDateGetGET /data/lists/changes/since/{date}Get recent changes to the lists
ReadingListsApidataListsGetGET /data/lists/Get all lists of the current user.
ReadingListsApidataListsIdDeleteDELETE /data/lists/{id}Delete a list.
ReadingListsApidataListsIdEntriesBatchPostPOST /data/lists/{id}/entries/batchCreate multiple new list entries.
ReadingListsApidataListsIdEntriesEntryIdDeleteDELETE /data/lists/{id}/entries/{entry_id}Delete a list entry.
ReadingListsApidataListsIdEntriesPostPOST /data/lists/{id}/entries/Create a new list entry.
ReadingListsApidataListsIdPutPUT /data/lists/{id}Update a list.
ReadingListsApidataListsPagesProjectTitleGetGET /data/lists/pages/{project}/{title}Get lists of the current user which contain a given page.
ReadingListsApidataListsPostPOST /data/lists/Create a new list for the current user.
ReadingListsApidataListsSetupPostPOST /data/lists/setupOpt in to use reading lists.
ReadingListsApidataListsTeardownPostPOST /data/lists/teardownOpt out from using reading lists.
ReadingListsApigetListEntriesGET /data/lists/{id}/entries/Get all entries of a given list.
RecommendationApidataRecommendationArticleCreationMorelikeSeedArticleGetGET /data/recommendation/article/creation/morelike/{seed_article}Recommend missing articles
RecommendationApidataRecommendationArticleCreationTranslationFromLangGetGET /data/recommendation/article/creation/translation/{from_lang}Recommend articles for translation.
RecommendationApidataRecommendationArticleCreationTranslationFromLangSeedArticleGetGET /data/recommendation/article/creation/translation/{from_lang}/{seed_article}Recommend articles for translation.
TalkPagesApipageTalkTitleGetGET /page/talk/{title}Get structured talk page contents
TalkPagesApipageTalkTitleRevisionGetGET /page/talk/{title}/{revision}Get structured talk page contents
TransformsApidoDictGET /transform/word/from/{from}/{word}Fetch the dictionary meaning of a word
TransformsApidoDictProviderGET /transform/word/from/{from}/{word}/{provider}Fetch the dictionary meaning of a word
TransformsApidoMTPOST /transform/html/from/{from}Machine-translate content
TransformsApidoMTProviderPOST /transform/html/from/{from}/{provider}Machine-translate content
TransformsApitransformHtmlToWikitextPostPOST /transform/html/to/wikitextTransform HTML to Wikitext
TransformsApitransformHtmlToWikitextTitlePostPOST /transform/html/to/wikitext/{title}Transform HTML to Wikitext
TransformsApitransformHtmlToWikitextTitleRevisionPostPOST /transform/html/to/wikitext/{title}/{revision}Transform HTML to Wikitext
TransformsApitransformWikitextToHtmlPostPOST /transform/wikitext/to/htmlTransform Wikitext to HTML
TransformsApitransformWikitextToHtmlTitlePostPOST /transform/wikitext/to/html/{title}Transform Wikitext to HTML
TransformsApitransformWikitextToHtmlTitleRevisionPostPOST /transform/wikitext/to/html/{title}/{revision}Transform Wikitext to HTML
TransformsApitransformWikitextToLintPostPOST /transform/wikitext/to/lintCheck Wikitext for lint errors
TransformsApitransformWikitextToLintTitlePostPOST /transform/wikitext/to/lint/{title}Check Wikitext for lint errors
TransformsApitransformWikitextToLintTitleRevisionPostPOST /transform/wikitext/to/lint/{title}/{revision}Check Wikitext for lint errors
TransformsApitransformWikitextToMobileHtmlPOST /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