API:Extlinks
From MediaWiki.org
| Extlinks | ||
|---|---|---|
| Returns all external URLs (not interwikis) from the given page(s). This module cannot be used as a Generator. |
||
| Prefix | el | |
| Required rights | none | |
| Post only? | No | |
| Generated help | Current | |
| Version added |
|
|
Gets a list of all external links on the provided pages
Parameters[edit]
ellimit: How many links to return. No more than 500 (5000 for bots) allowed. (Default: 10) 1.13+eloffset: When more results are available, use this to continue. 1.13+elprotocol: Protocol of the URL. If empty and query is set, the protocol is http. Leave both this and query empty to list all external links. 1.18+elquery: Search string without protocol. Useful for checking whether a certain page contains a certain external url. 1.18+elexpandurl: Expand protocol-relative URLs with the canonical protocol. 1.21+
Example[edit]
Get a list of external links on en:Albert Einstein's page
| Result |
|---|
<api>
<query>
<pages>
<page pageid="736" ns="0" title="Albert Einstein">
<extlinks>
<el>http://albert-einstein.org/</el>
<el>http://albert-einstein.org/history5.html</el>
<el>http://ame.epfl.ch/biblio/schlatter1.pdf</el>
...
</extlinks>
</page>
</pages>
</query>
</api>
|
Possible errors[edit]
None.