It seems like iTunes search API returns different results than the ones returned when searching on an iPhone device (also results are in different order).
Assuming I want the results to be identical to an iPhone device, how do I do that with the official search API?
Also, is there a way to filter out non-iPhone apps from the search results?
You can use the following API URL to make app store search requests. After acquiring Chomp last year, it was reported that Apple was revamping their internal App Store search algorithms. That may have something to do with the differences you see using the iTunes search API and whatever API the App Store uses. Apple may have developed a separate API specifically for Apps and for use in the App Store that excludes other products like music, in order to improve performance.
So, you could do the following in order to get only software for iPhone, iPod touch, and Universal apps with a search term of 'Gameloft'.
http://itunes.apple.com/search?term=Gameloft&country=us&entity=software&limit=100
To include iPad apps in the search, use:
http://itunes.apple.com/search?term=Gameloft&country=us&entity=software,iPadSoftware&limit=100
Check out Apple's documentation for more options.
You can try out a working example I put together of the iTunes search API here. Example Search Tool