prine/WikiApiObjectiveC

How to get URL of wiki page?

rsimenok opened this issue · 1 comments

Can i get a URL of wiki page? Not a json or xml, just URL.

prine commented

You can fetch the title attribute from the returned json file. This title you can append to your wikipedia main link (the language you are using):

If you are searching for an article about Elepehants the title returnes would be:

{
"batchcomplete": "",
"query": {
"pages": {
"9279": {
"pageid": 9279,
"ns": 0,
"title": "Elephant",
...

Which means that the direct link would be:
https://en.wikipedia.org/wiki/Elephant