API:Get the contents of a page/de

There are three main methods for retrieving page content via the API:


 * 1) Get the contents of a page using the  API (as wikitext).
 * 2) Get the contents of a page using the  API (as HTML or wikitext).
 * 3) Get plain text or limited HTML extracts of a page using the API of the TextExtracts extension.

Methode 1: Verwenden Sie die Revisions-API
The API can be used to retrieve the content of a page as wikitext. This can be done by specifying the title of the page in the  parameter and setting the   parameter to. For more options, see.

Beispiel
GET request to obtain the wikitext content of the page Pet door.

Methode 2: Verwenden Sie die Parse-API
The API can be used to retrieve page content in either HTML format (parsed) or Wikitext format (unparsed). This can be done by specifying a page with the  parameter or a revision with the   parameter. To retrieve HTML, set  to. To retrieve Wikitext, set  to.

Beispiel 1
GET request to get parsed HTML content of a page: Pet door

Antwort
\n\n\n\n\n "   } }

Beispiel 2
GET request to get the original wikitext content of a page: Pet door

Methode 3: Verwenden Sie die TextExtracts-API
The extension provides an API which allows you to retrieve plain-text or limited HTML extracts of page content. See for additional documentation.

Beispiel
Get request to extract 10 sentences from the page Pet door.

Zusätzliche Anmerkungen
The content extracted directly from Wikipedia can be inserted into any MediaWiki wiki through. The content extracted comes in the form of limited wikitext, omitting leading templates, links to files or pages.