Reputation: 8029
I have some links to wikipedia articles, for example: https://en.wikipedia.org/wiki/Steve_jobs when you visit that link, you will see right under the article's title: (Redirected from Steve jobs)
If you follow that link you will eventually reach a page with the same URL except that Steve_jobs has a capital J for jobs. So it would look like this: https://en.wikipedia.org/wiki/Steve_Jobs
Is there a way I can retrieve the latter link using the first one?
Upvotes: 1
Views: 130
Reputation: 664185
Just use the query api. With http://en.wikipedia.org/w/api.php?action=query&titles=Steve+jobs|steve+jobs|steve+Jobs|Steve+Jobs&redirects you will get your titles normalized and redirected. See the api documentation for further options, especially the formats.
Upvotes: 0
Reputation: 244757
You can find out where does a certain title redirect to by API query like:
http://en.wikipedia.org/w/api.php?action=query&titles=Steve%20jobs&redirects
If you want the result in XML, add &format=xml
to the URL, or &format=json
for JSON.
Upvotes: 2