Dan Wolfe/ March 2, 2018

Basic Information: wiki

The wik command is a merge of the common wikipedia API. This was done mostly as a proof of concept as the wikipedia api can be accessed publicly. We include it here still as a way of demonstrating our API.

NOTE: This API call uses version 1 of the wiki api call, not version 2 for backwards compatibility.

Max and Min Defaults:

Some parameters have a minimum and/or maximum value. Setting values outside this scope will not effect the request, as the system will replace the value with the needed minimum or maximum value.

For example: if a value for cache is not set or below the minimum the system will replace the value to the minimum time. If an option has a maxium value and the passed value is greater, the system will replace that value with it’s maximum.

  • cache Min: 60/min 3600/sec
  • limits 100 combined command requests per day for free accounts
  • shared_limit Not Applicable

GET Request:

Request Description
APIKEY Your API Key which can be found on your profile, if you need to change the KEY, edit the API SALT to something random.
wiki The API Command
cache Cache Time in minutes. (Response cachetime is in seconds)
opt Comma separated options for this command.
GET URL Example: https://hostmozart.com/api.php?APIKEY=YOURAPIKEY&cache=900&cmd=wiki&opt=survivalism

Server Reponse:

Key Value Meaning
TIMESTAMP 2018-03-05 18:05:41 Mysqli Timestamp Format of the first cached request.
valid OK Returns with OK if API Key is valid
Limit 1/100 Returns with the number of today’s API requests over this user’s 24 hour limit
cache true Returns true if this command and options have been cached, or is cached.
cachetime 18000 If present, the ammount of time in seconds this request will be cached.
cmd whois The actual command that was used for this request
success true Returns true if the command is available
options_count 1 Returns the number of options that were passed with the GET request
opt_0 … survivalism If applicable, returns opt_NUMBER of each option that was passed to the GET request, and the value of the option that was sent.
required_options 1 Returns the number of options that must be passed for this command.
options_test true If options_count does not match required_options returns false.
response_code success If all requirements are met, and api data is available returns success, returns failure on errors.
batch_complete true Returns true if external merged request was successful
query ARRAY
pages ARRAY
pageid 188426 The mediawiki page id of the response requested
ns 0 namespace of the wikipedia page in number format
exists (empty) If this key appears in the response the page exists publicly on the mediawiki, otherwise it maybe a requested page (redlink) or redirect.
title Survivalism The actual title of the mediawiki page
revisions ARRAY
contentformat text/x-wiki Format of the current page (Text versus media etc)
contentmodel wikitext style of the content format
content [media wiki page content] The content of the page itself in media wiki format