I'm not sure if it's intentional, but it looks like the web ui defaults to
including the file namespace in search, where the api does not. Getting the
results for files from api can be done by specifying the namespace you want:

https://commons.wikimedia.org/w/api.php?action=query&list=search&srsearch=dave%20vanian&utf8=&srnamespace=6

On Wed, Dec 6, 2017 at 10:54 AM, Gheorghe Postelnicu <
[email protected]> wrote:

> Hello,
>
> First, many thanks for maintaining this API!
>
> I am writing as I am having trouble using the full text search API on
> Commons. Namely, I would like to get the following list back via the API:
>
> https://commons.wikimedia.org/w/index.php?title=Special:
> Search&profile=images&search=dave+vanian&fulltext=1
>
> however the full text search doesn't produce the same results when using
> the API:
>
> https://commons.wikimedia.org/w/api.php?action=query&list=
> search&srsearch=dave%20vanian&utf8=
>
> A suggestion to nudge me in the right direction would be greatly
> appreciated.
>
> Many thanks in advance for the help.
>
> Best regards,
> Gheorghe
>
> _______________________________________________
> Discovery mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/discovery
>
>
_______________________________________________
Discovery mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/discovery

Reply via email to