Approach 1: Using the API on a Wikimedia Wiki Farm
To get all the interwiki prefixes the wiki knows about, use the MediaWiki API metamode and request any project for siprop=interwikimap :
https:
You will get a large array of such objects:
{ "prefix": "aa", "local": "", "language": "Qaf\u00e1r af", "url": "https://aa.wikipedia.org/wiki/$1", "protorel": "" }
protorel tells you whether the URL is relative or not (i.e. starting with // ). For the WikiMedia wiki, they start with https . $1 in the url, like your imaginary, placeholder for the title.
To get only wikis in the same wikifarm (e.g. Wikimedia wikis ), add sifilteriw=local to your query:
https://sv.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=interwikimap&sifilteriw=local
To get names in your language, use siinlanguagecode like this (all Wikimedia wikis, with their Swedish names, are extracted from Arabic Wikipedia, but could be any endpoint in a wiki farm):
https://ar.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=interwikimap&sifilteriw=local&siinlanguagecode=sv
From here you need to filter, for example. Wikipedia yourself.
Approach 2: Using Wikistats in wmflabs
A list already filtered by project type is available at http://wikistats.wmflabs.org (csv), where you can filter Wikipedia, Wikiversity, etc. The csv file is updated daily, but the tool is experimental and may not be forever.
In any of the approaches Wikipedia Wikimedia Incubator does not appear.