I'm trying to extract English Wikipedia articles related to a list of Arabic articles, let's say I have this article
https://ar.wikipedia.org/wiki/%D8%A7%D9%84%D9%82%D8%AF%D8%B3
and I need to extract the English version of it
https://en.wikipedia.org/wiki/Jerusalem
The problem is that I don't have the list of English names corresponding to the Arabic names list to use it with the API's, I think about extracting the language links and do some processing on the result to extract the English names but don't know if there is any easier way using the Mediawiki API's that you can suggest?
The easiest way to do this is through wikidata. There's a wikidata item for all the wikipedia pages, and wikidata has links to all the wiki pages about the particular term. So, here's an example query that would give you the English name from Arabic name:
https://www.wikidata.org/w/api.php?action=wbgetentities&sites=arwiki&titles=%D8%A7%D9%84%D9%82%D8%AF%D8%B3&languages=en
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With