Feel free to use it if you like, it's practically free, and open source if you'd like to host it yourself: https://github.com/Alex-Programs/nuenki-dictionary
Looking at your code, you're processing the actual word in a Finnish-specific way. If you'd like to generalise it, you can also just see if the definitions contains `x of y`, where y is a link, and automatically dereference to `y`.
MrGuts•1h ago