API:Extlinks
Jump to navigation
Jump to search
| 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 |
|---|
{
"continue": {
"eloffset": 10,
"continue": "||"
},
"query": {
"pages": {
"736": {
"pageid": 736,
"ns": 0,
"title": "Albert Einstein",
"extlinks": [
{
"*": "//archive.org/search.php?query=((subject:%22Einstein,%20Albert%22%20OR%20subject:%22Albert%20Einstein%22%20OR%20creator:%22Einstein,%20Albert%22%20OR%20creator:%22Albert%20Einstein%22%20OR%20creator:%22Einstein,%20A.%22%20OR%20title:%22Albert%20Einstein%22%20OR%20description:%22Einstein,%20Albert%22%20OR%20description:%22Albert%20Einstein%22)%20OR%20(%221879-1955%22%20AND%20Einstein))%20AND%20(-mediatype:software)"
},
{
"*": "//arxiv.org/abs/1311.2763"
},
{
"*": "//arxiv.org/abs/1602.03837"
},
{
"*": "//doi.org/10.1002%2Fandp.19013090306"
},
{
"*": "//doi.org/10.1002%2Fandp.19053220607"
},
{
"*": "//doi.org/10.1002%2Fandp.19053220806"
},
{
"*": "//doi.org/10.1002%2Fandp.19053221004"
},
{
"*": "//doi.org/10.1002%2Fandp.19053231314"
},
{
"*": "//doi.org/10.1007%2FBF01510300"
},
{
"*": "//doi.org/10.1016%2F0277-5395(90)90094-e"
}
]
}
}
}
}
|
Possible errors[edit]
None.