The canonical domain is www.wikimedia.org, wikimedia.org is generally only a redirect.
However for some reason the RESTBase API on that domain has "wikimedia.org" as the RESTBase Varnish override happens before the Apache can normalise the URL.
https://wikimedia.org/ -> https://www.wikimedia.org/ -> 200 OK
https://wikimedia.org/api/ -> https://www.wikimedia.org/api/ -> 200 OK
https://wikimedia.org/api/rest_v1/?doc - 200 OK
https://www.wikimedia.org/api/rest_v1/?doc -> 404 Not Found
It would make a lot more sense if at the very least this redirected. But more logical would be for it to be the other way around.