14

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?

Search API URL

iPhone search URL

Kara
  • 6,115
  • 16
  • 50
  • 57
user1538106
  • 141
  • 1
  • 4

2 Answers2

14

The search stack developed for the store is a different algorithm than the search stack for developer tools.

That said, understand some of the following features of the developer tool (Search API) that are helpful:

  • "sort=popular" is the default order that results are returned. "sort=recent" is the alternative.

  • "entity=software" will return apps that are available on iPhone, iPod touch and Universal apps (that work on iPad) but if you want all iOS apps you should use "entity=software,iPadSoftware"

  • Focus your search term on the attribute you are trying to target. If you know your search term is a song title (and not an album name or artist name) then use "attribute=songTerm"

Jeremy Mack
  • 4,987
  • 2
  • 25
  • 22
Ted Hosmann
  • 2,195
  • 17
  • 18
  • Do you happen to know anything about why it's running a different algorithm, or can you characterize the nature or purpose of the differences? It seems strange that they would have two different search algorithms without a clear aim. – mqp Feb 11 '13 at 07:53
  • @mquander Complete guess but perhaps they personalize the results? – Supericy Feb 11 '13 at 22:38
  • 1
    @mquander After acquiring Chomp last year, it was reported that Apple was working on improving their App Store search algorithms which may be why they would have developed a separate API for the App store (maybe better performance by excluding other products like music and include new algorithms specific for App searching) and the original iTunes API still exists since it is stable and proven and encompasses all iTunes content. This is just my theory. – Jake Sankey Feb 11 '13 at 22:53
  • @JakeSankey Seems quite plausible. – mqp Feb 12 '13 at 17:49
  • @JakeSankey this is very true. The API not always returns an accurate set of results. For instance, for the app Codea, it gives me a list, where the app is on position 40 or something. The reason for this is that I could not find a way to limit the searching first to whole words only, and second, to a limited number of fields, maybe only the title, and the app genres – Preslav Rachev Mar 08 '13 at 08:56
  • @ted-hosmann I could not find a difference between sort=popular and sort=recent. Does it apply to non-apps only or something? – Preslav Rachev Mar 08 '13 at 08:58
  • @user1107412 I think you might be correct about ex-apps only searches. I see that the iTunes store has a "Popularity" score next to each song in an album, I expect this is probably part of the sort results. Apps don't appear to expose a popularity score - so the sort feature probably does not apply. – Ted Hosmann Mar 08 '13 at 22:22
2

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.

http://itunes.apple.com/search?term=SEARCHTERM&country=us&entity=software&limit=100

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

Jake Sankey
  • 4,977
  • 12
  • 39
  • 53