Wikipedia has an API. This is just fetching the HTML and parsing it with beautifulsoup, which seems like a terrible idea when an API is available.
It is actually sensible to stick to the interface that the majority of users are using, because that interface is the least likely to break. Spontaneous API key hoop-jumping is a form of breakage.
As general advice it's only ok, because a) the details of served HTML can change a great deal and b) some APIs might have this problem, some are unlikely to. Wikipedia is an extreme example of the latter.
I'm not that informed, but intuitively, I'd doubt that.