You can't just simply append /wiki/ because it might not be the article path for the wiki you're on. The default is usually {$wgScriptPath}/$1, not /wiki/$1. You can find the article path by getting api.php?action=query&meta=siteinfo&siprop=general - you'll need to replace the $1 with the article's name and prepend the server hostname.
On 9 January 2017 at 15:43, Erik Bernhardson ebernhardson@wikimedia.org wrote:
Unfortunately URL isn't one of the currently returned field in the search API. Currently you can simply append the returned title to the /wiki/ prefix of the same domain to generate a URL. The basic API is:
https://en.wikipedia.org/w/api.php?action=query&list= search&srsearch=symfony
I'll add a ticket later to make an optional parameter to return the fully qualified URL. Being explicit couldn't be bad.
On Jan 9, 2017 6:18 AM, "Akinwale Habib" akinwalehabib@hotmail.com wrote:
Hello team,
Hope this meets you well?
Please I am finding it impossible to generate a query to search MediaWiki API using a title and get in return url's of all matching pages.
Kindly help.
Thank you.
Mediawiki-api mailing list Mediawiki-api@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Mediawiki-api mailing list Mediawiki-api@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-api