1. Make a Wikipedia search API request for the .idk domain, using the name as the article name.
2. Retrieve the rendered page contents if found.
3. Find the first Wikipedia infobox table on the page.
4. Extract the first "URL" or "Website" entry in that infobox.
5. Return the entry's value, if it's a link.
All this runs in a nickel.rs server on 127.0.0.1:80, which routes the requests as permanent redirects to the destination. Using dnsmasq,[1] if it's an .idk domain, it routes the request through the above Wikipedia resolver.
1: https://github.com/aaronjanse/dns-over-wikipedia/tree/master...