MediaWiki API

The MediaWiki API allows you to fetch the latest revisions of a specified Wikipedia page.

Base URL

"https://openapi-idk8.onrender.com"

Endpoints

  1. GET `/mediawiki?title={page_title}`: Fetches the latest revisions of a specified Wikipedia page.

Sample Request

GET `https://openapi-idk8.onrender.com/mediawiki?title=Albert%20Einstein`

Sample Response

{
  "apiName": "MediaWiki",
  "description": "Fetches the latest revisions of a specified Wikipedia page.",
  "author": "OpenAPI",
  "data": {
    "batchcomplete": "",
    "warnings": {},
    "query": {
      "pages": {
        "736": {
          "pageid": 736,
          "ns": 0,
          "title": "Albert Einstein",
          "revisions": [
            {
              "contentformat": "text/x-wiki",
              "contentmodel": "wikitext",
              "*": "{{Short description|German-born physicist (1879–1955)}}\n{{Redirect|Einstein||Einstein (disambiguation)|and|Albert Einstein (disambiguation)}}\n{{pp|small=yes}}\n{{pp-move}}\n{{Good article}}\n{{Use American English|date=November 2022}}\n{{Use dmy dates|date=November 2022}}\n{{Infobox scientist\n| name              = Albert Einstein\n| image             = Einstein 1921 by F Schmutzer - restoration.jpg\n| caption           = Einstein in 1921\n| birth_date        = {{Birth date|df=yes|1879|3|14}}\n| birth_place       = [[Ulm]], Kingdom of Württemberg, German Empire\u003C!-- DO NOT LINK, see [[MOS:GEOLINK]] --\u003E\n| death_date        = {{Death date and age|df=yes|1955|4|18|1879|3|14}}\n| death_place       = [[Princeton, New Jersey]], U.S.\n| children          = {{flatlist|\n* [[Lieserl Einstein|Lieserl]]\n* [[Hans Albert Einstein|Hans Albert]]\n* [[Einstein family#Eduard \"Tete\" Einstein (Albert's second son)|Eduard \"Tete\"]]}}\n| spouse            = {{plainlist|\n* {{marriage|[[Mileva Marić]]|1903|1919|end=divorced}}\n* {{marriage|[[Elsa Löwenthal]]|1919|1936|end=died\u003C!--\u003Cref name=\"66xNO\" /\u003E{{sfnp|Pais|1982|p=301}} -
...

Attributes

  • apiName: The name of the API (MediaWiki).
  • description: Brief description of the API's functionality.
  • author: Author or creator of the API (OpenAPI).
  • data: The fetched data containing the latest revisions of the specified Wikipedia page.

Sample Wikipedia Page

Here is an example of the data fetched from a Wikipedia page:

  • Title: Albert Einstein
  • Page ID: 736
  • Namespace: 0
  • Revisions: Latest revisions of the page content.