If empty, $params can be set to NULL, and $settings can be set to an empty array.

Some functions take also a mandatory parameter, which is different for every function and comes before the two optional ones.

All functions return an object that is descendant of the type API_Query. You can set to it options and parameters in addition to those passed to the function that returned it.

If Apibot believes the wiki does not support queries of the type you requested (eg. if they were introduced in a MediaWiki version later than the wiki one), it will throw a PHP exception while creating the Query object. The exception will be of the type ApibotException_InternalError. The object returned will be malformed and unusable. To be prepared for such an opportunity, best enclose the Bridge Query function call in a try... catch construction.

Pageset

query_titles()

Information about the title(s) specified (eg. page properties).(Use more specific functions, unless you really know what you are doing.)

query_pageids()

Syntax

query_pageids ( $pageids, $params = NULL, $settings = array() )

Mandatory parameters:

$pageids

A page pageid, or an array of page pageids to query about

Resulting Query object returns

Information about the pageid(s) specified (eg. page properties).(Use more specific functions, unless you really know what you are doing.)

query_revids()

Syntax

query_revids ( $revids, $params = NULL, $settings = array() )

Mandatory parameters:

$revids

A revid, or an array of revids of the page(s) to query about

Resulting Query object returns

Information about the page(s) with the revid(s) specified (eg. page properties).(Use more specific functions, unless you really know what you are doing.)

Page properties

Generic

These functions return a bare API_Query_Property descendant object. You have to specify further the titles, pageids or revids it should return. Typically you do this by assigning an array or bar-separated string to one of the object properties titles, pageids or revids.

query_property_categories()

Syntax

query_property_categories ( $params = NULL, $settings = array() )

Resulting Query object returns

The categories this page belongs to.

query_property_categoryinfo()

Syntax

query_property_categoryinfo ( $params = NULL, $settings = array() )

Resulting Query object returns

Info about this category (if the page is a category page).

query_property_duplicatefiles()

Syntax

query_property_duplicatefiles ( $params = NULL, $settings = array() )

Resulting Query object returns

What files are duplicates of this one (if the page is a file page).

query_property_extlinks()

Syntax

query_property_extlinks ( $params = NULL, $settings = array() )

Resulting Query object returns

What external links this page / pages / pageids / revids contain.

query_property_imageinfo()

Syntax

query_property_imageinfo ( $params = NULL, $settings = array() )

Resulting Query object returns

Info about this image (if the page is an image file page).

query_property_images()

Syntax

query_property_images ( $params = NULL, $settings = array() )

Resulting Query object returns

The images used in this page.

query_property_info()

Syntax

query_property_info ( $params = NULL, $settings = array() )

Resulting Query object returns

Various bits of info about this page.

query_property_langlinks()

Syntax

query_property_langlinks ( $params = NULL, $settings = array() )

Resulting Query object returns

The langlinks (interwikis) this page has (in a multi-wiki installation).

query_property_links()

Syntax

query_property_links ( $params = NULL, $settings = array() )

Resulting Query object returns

The links used in this page.

query_property_pageprops()

Syntax

query_property_pageprops ( $params = NULL, $settings = array() )

Resulting Query object returns

Various page properties, specified in the page text.

query_property_revisions()

Syntax

query_property_revisions ( $params = NULL, $settings = array() )

Resulting Query object returns

The page revisions.

query_property_templates()

Syntax

query_property_templates ( $params = NULL, $settings = array() )

Resulting Query object returns

The templates used in this page.

By page title

All of these functions take one mandatory argument - the title of the page to query about.

query_generator_querypage()

Wiki pages (possibly with their page properties) that are listed by a given "special page" pages list, as specified by the params.

query_generator_random()

Syntax

query_generator_random ( $params = NULL, $settings = array() )

Resulting Query object returns

Wiki pages (possibly with their page properties) listed at random, as specified by the params.

query_generator_recentchanges()

Syntax

query_generator_recentchanges ( $params = NULL, $settings = array() )

Resulting Query object returns

Wiki pages (possibly with their page properties) that are changed recently, as specified by the params.(Will work only on recent enough versions of MediaWiki.)

query_generator_search()

Syntax

query_generator_search ( $params = NULL, $settings = array() )

Resulting Query object returns

Wiki pages (possibly with their page properties) that contain given string in their text or title, as specified by the params.

query_generator_watchlist()

Syntax

query_generator_watchlist ( $params = NULL, $settings = array() )

Resulting Query object returns

Wiki pages (possibly with their page properties) that are included in the current account's watchlist, as specified by the params.

query_generator_watchlistraw()

Syntax

query_generator_watchlistraw ( $params = NULL, $settings = array() )

Resulting Query object returns

Wiki pages (possibly with their page properties) that are included in a given user's watchlist, as specified by the params.

Page property-based generators

query_generator_categories()

Syntax

query_generator_categories ( $params = NULL, $settings = array() )

Resulting Query object returns

Wiki pages (possibly with their page properties) of categories that given page(s) is/are in, as specified by the params.(Set the pages later by assigning an array or bar-separated string of values to $query->titles, $query->pageids or $query->revids.)

query_generator_duplicatefiles()

Wiki pages (possibly with their page properties) of files that are duplicates of the given (file) page, as specified by the params.(Set the pages later by assigning an array or bar-separated string of values to $query->titles, $query->pageids or $query->revids.)

query_generator_images()

Syntax

query_generator_images ( $params = NULL, $settings = array() )

Resulting Query object returns

Wiki pages (possibly with their page properties) of images that are used in the given page(s), as specified by the params.(Set the pages later by assigning an array or bar-separated string of values to $query->titles, $query->pageids or $query->revids.)

query_generator_links()

Syntax

query_generator_links ( $params = NULL, $settings = array() )

Resulting Query object returns

Wiki pages (possibly with their page properties) that are linked in the given page(s), as specified by the params.(Set the pages later by assigning an array or bar-separated string of values to $query->titles, $query->pageids or $query->revids.)

query_generator_templates()

Syntax

query_generator_templates ( $params = NULL, $settings = array() )

Resulting Query object returns

Wiki pages (possibly with their page properties) of templates that are included in the given page(s), as specified by the params.(Set the pages later by assigning an array or bar-separated string of values to $query->titles, $query->pageids or $query->revids.)

query_meta_siteinfo_namespacealiases()

Aliases for the namespaces on this wiki.(The namespaces themselves are listed through an API_Query_Meta_Siteinfo_Namespaces object, that can be obtained by the query_meta_siteinfo_namespaces() function.)