Help:API:askargs

The "askargs" API module allows you to do ask queries via action "askargs" against Semantic MediaWiki using the MediaWiki API and get results back serialized in one of the supported formats. It was introduced with.

The module supports three parameters in un-serialized form, so with as little syntax as possible specific to the  parser function:
 * 1) " ": The query conditions, i.e. the requirements for a subject (page or subobject) to be included
 * 2) " ": The query printouts, i.e, the properties to show per subject (page or subobject)
 * 3) " ": The query parameters, i.e. all non-condition and non-printout arguments

Starting with this module supports the " " parameterCiteRef::gh:smw:3052 allowing to choose between the dictionary structure  (version "2", which is the default to ensure backwards compatibility for any consumer that uses the API) and the list structure  (version "3") for the JSON serialization of the resulting data queried with the API.


 * Limit and offset

As in regular inline (ask) queries, both "limit" and "offset" are specified in the parameter list, e.g. to get the first 10 results:.

The API result contains a "query-continue-offset" key, which can be used to fetch additional results:. If there is no "query-continue-offset" key in the result, the end of the result set was reached.

Examples

 * Use "dictionary" structure for JSON serialization

API call includes the three parameters as explained earlier on this page:
 * → run example
 * → run example
 * → run example
 * → run example


 * Use "list" structure for JSON serialization
 * → run example


 * Further examples