API:Exturlusage

From MediaWiki.org
Jump to: navigation, search
Tools clipart.png This page is part of the MediaWiki API documentation.
Language: English
MediaWiki API

Quick overview:

v · d · e


MediaWiki version: 1.11

Get a list of pages that link to a certain URL, à la Special:Linksearch

Contents

Parameters [edit]

  • euquery: The URL to search for, without the protocol. * can be used as a wildcard. If you omit euquery (not just leave it empty), all external links will be listed, and euprotocol will be ignored
  • euprotocol: Protocol of the URL
    • The options for this parameter vary per wiki. By default, the options are http (default), https, ftp, irc, gopher, telnet, nntp, worldwind, mailto, news
  • eunamespace: Only list links from pages in these namespaces
  • eulimit: Maximum amount of pages to list (10 by default, can be no larger than 500)
  • euprop: Which properties to get
    • ids: Page ID of the linking page
    • title: Title of the linking page
    • url: URL being linked to
  • euoffset: Used for continuing a previous request

Example [edit]

Get a list of pages linking to slashdot.org

imageusage / iu [edit]

MediaWiki version: 1.11

List of pages that include a given image. Ordered by page title.

Parameters [edit]

  • iutitle: List pages using this image. The image need not exist
  • iunamespace: Only list pages in these namespaces
  • iufilterredir: How to filter redirects
    • all: List all pages regardless of their redirect flag (default)
    • redirects: Only list redirects
    • nonredirects: Don't list redirects
  • iulimit: Maximum amount of pages to list (10 by default)
  • iuredirect: If set, pages linking to iutitle through a redirect will also be listed. See the documentation for list=backlinks for more detailed information
  • iucontinue: Used to continue a previous request

Example [edit]

Find all pages that use Image:Albert Einstein Head.jpg

Error Codes [edit]

  • code: iubad_title_count
    • info: The imageusage query requires one title to start
      • This happens when you use titles instead of iutitle (this usage is deprecated) and specify multiple titles
  • code: iu_badcontinue
    • info: Invalid continue param. You should pass the original value returned by the previous query
  • code: iubad_image_title
    • info: The title for imageusage query must be an image