Title: API sandbox - freem URL Source: https://freemwiki.com/wiki/Special:ApiSandbox Markdown Content: Tools Actions General Appearance Text * This page always uses small font size This page always uses small font size Width The content is as wide as possible for your browser window. Use this page to experiment with the **MediaWiki web service API**. Refer to [the API documentation](https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page) for further details of API usage. Example: [search for page titles matching a certain keyword](https://www.mediawiki.org/wiki/Special:MyLanguage/API:Tutorial#A_simple_query). Select an action to see more examples. Note that, although this is a sandbox, actions you carry out on this page may modify the wiki. main **Status:** The MediaWiki API is a mature and stable interface that is actively supported and improved. While we try to avoid it, we may occasionally need to make breaking changes; subscribe to [the mediawiki-api-announce mailing list](https://lists.wikimedia.org/hyperkitty/list/mediawiki-api-announce@lists.wikimedia.org/) for notice of updates. **Erroneous requests:** When erroneous requests are sent to the API, an HTTP header will be sent with the key "MediaWiki-API-Error" and then both the value of the header and the error code sent back will be set to the same value. For more information see [API: Errors and warnings](https://www.mediawiki.org/wiki/Special:MyLanguage/API:Errors_and_warnings "mw:Special:MyLanguage/API:Errors and warnings"). **Testing:** For ease of testing API requests, see [Special:ApiSandbox](https://freemwiki.com/wiki/Special:ApiSandbox "Special:ApiSandbox"). Which action to perform. The format of the output. Maximum lag can be used when MediaWiki is installed on a database replicated cluster. To save actions causing any more site replication lag, this parameter can make the client wait until the replication lag is less than the specified value. In case of excessive lag, error code maxlag is returned with a message like Waiting for $host: $lag seconds lagged. See [Manual: Maxlag parameter](https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Maxlag_parameter "mw:Special:MyLanguage/Manual:Maxlag parameter") for more information. Set the `s-maxage` HTTP cache control header to this many seconds. Errors are never cached. The value must be no less than 0. Set the `max-age` HTTP cache control header to this many seconds. Errors are never cached. The value must be no less than 0. Verify that the user is logged in (including possibly as a temporary user) if set to user, _not_ logged in if set to anon, or has the bot user right if bot. Verify the current user is the named user. Any value given here will be included in the response. May be used to distinguish requests. Include the hostname that served the request in the results. Include the current timestamp in the result. Include the languages used for uselang and errorlang in the result. When accessing the API using a cross-domain AJAX request (CORS), set this to the originating domain. This must be included in any pre-flight request, and therefore must be part of the request URI (not the POST body). For authenticated requests, this must match one of the origins in the `Origin` header exactly, so it has to be set to something like [https://en.wikipedia.org](https://en.wikipedia.org/) or [https://meta.wikimedia.org](https://meta.wikimedia.org/). If this parameter does not match the `Origin` header, a 403 response will be returned. If this parameter matches the `Origin` header and the origin is allowed, the `Access-Control-Allow-Origin` and `Access-Control-Allow-Credentials` headers will be set. For non-authenticated requests, specify the value *. This will cause the `Access-Control-Allow-Origin` header to be set, but `Access-Control-Allow-Credentials` will be `false` and all user-specific data will be restricted. Language to use for message translations. [action=query&meta=siteinfo&siprop=languages](https://freemwiki.com/wiki/Special:ApiHelp/query%2Bsiteinfo "Special:ApiHelp/query+siteinfo") returns a list of language codes. You can specify user to use the current user's language preference or content to use this wiki's content language. Variant of the language. Only works if the base language supports variant conversion. Format to use for warning and error text output Language to use for warnings and errors. [action=query&meta=siteinfo&siprop=languages](https://freemwiki.com/wiki/Special:ApiHelp/query%2Bsiteinfo "Special:ApiHelp/query+siteinfo") returns a list of language codes. Specify content to use this wiki's content language or uselang to use the same value as the uselang parameter. If given, error texts will use locally-customized messages from the MediaWiki namespace.