Tracking keyword ranking and improving findability in the Android Marketplace

14 Jul 2011

A few months ago, I ported an existing iOS app to Android. The sales results have been… lacklustre. Only after months have I cracked the 50-100 downloads category. I mostly chalked this up to the horror stories such as 97% of Android downloads were for free apps or most paid apps are downloaded less than 100 times.

I recently released a small update and took the opportunity to look a bit closer at the Android Market. I searched for ‘swedish’ and couldn’t find GoSwedish in the results at all. The apps that were being displayed weren’t particularly remarkable in terms of downloads or ratings, so I realized that perhaps not having the term ‘swedish’ in the title was killing me.

I changed the title from “GoSwedish” to “Goswedish - Learn Swedish!”. (Not my proudest bit of writing, but hey, there’s only 30 characters to work with.) A few hours later, and I was showing up ranked #26.

Moving from nowhere to #26 isn’t bad, but since the search results show 24 apps per page, I’m still on the second page. I wanted to know when I made it to the first page, so I wrote a python script with the wonderful web scraping tool BeautifulSoup.

#!/usr/bin/env python

from BeautifulSoup import BeautifulSoup
import re
import urllib2

# note: 48 seems to be the maximum results per page
# if you're app isn't in the top 48, then you can adjust
# where the list starts by adding this to the url: 
# start=48

keyword = 'swedish'
app = 'ca.xinsight.goswedish'

url = "https://market.android.com/search?q=%s&so=1&c=apps&num=48" % (keyword,) 
page = urllib2.urlopen(url)
soup = BeautifulSoup(page)

# note: need to use dictionary calling style because of the '-'
ul = soup.find('ul', attrs={'class':'search-results-list'})

# get the li elements
li = ul.findAllNext('li')

c=0
for a in li:
     c = c + 1
     if a['data-docid'] == app:
             print "%s is ranked #%d for keyword: %s" % (app,c,keyword,)
             break

Running it produces a result like this:

 ca.xinsight.goswedish is ranked #26 for keyword: swedish

If you want to run this script, you should grab Beautiful Soup. The install process is simply:

curl -O http://www.crummy.com/software/BeautifulSoup/download/3.x/BeautifulSoup-3.2.0.tar.gz
tar xzvf BeautifulSoup-3.2.0.tar.gz 
cd BeautifulSoup-3.2.0
python setup.py install

And just edit the app and keyword variables for your own purposes.

I’ve also set it up to run as a cronjob, so I get an email every morning about how I’m doing in the Android Market.

References


Older: Add copy functionality to a custom UIView

Newer: When to ask for an app review


View Comments

Related Posts

Recent Posts