Earlier quoted context omitted.
Do you know someone there? Would love to chat.
They're just querying the app store search API: http://itunes.apple.com/search?entity=software&term=$APP... This is the same search API that Apple uses for the App Store, and returns the same order and results as Kickfolio. The first result is usually correct, but you could always double check with the developer. Example: http://itunes.apple.com/search?entity=software&term=Shar...
Nice work! Daniel is pretty much spot on. We run the search term through a regex to see if the user has entered an iTunes URL first (as we accept either search terms or URLs), then we pass the search term to the search API listed above. There is a little magic in sorting the results and a little magic in combining results from the different international stores. We started with that though and it gets great results. There are a couple of (fairly old) Rails gems for it too.