Search without the 'wg':
https://github.com/wikimedia/mediawiki/blob/master/includes/api/ApiOpenSear…
It apparently only affects the default limit, which as you say is
overridden for the search box code. I don't know why, just noting.
--
Bartosz Dziewoński