News for hackers. Stuff that matters.
Re:Google Play doesn't have an API. So I built one. by kanzure on Tuesday October 09, 2012 @09:08PM (#4634625)
I see, it's based off of:

http://github.com/chadrem/market_bot

Edit: I would like to point out that Google Play actually does have an API. It uses protocol buffers, if you check the Google Play apk.

http://github.com/kanzure/android-market-api-py

Re:Google Play doesn't have an API. So I built one. by jonursenbach on Tuesday October 09, 2012 @09:15PM (#4634648)
It's not official though, and the results you get back from it are incredibly varied.
Re:Google Play doesn't have an API. So I built one. by kanzure on Tuesday October 09, 2012 @09:16PM (#4634656)
> and the results you get back from it are incredibly varied.

Can you show me? I haven't noticed.

Re:Google Play doesn't have an API. So I built one. by jonursenbach on Wednesday October 10, 2012 @11:40AM (#4636801)
I don't have any examples anymore, because I deleted all the code I had written using the protocol buffer API when I decided to start writing MarketBot.

Searching for something as simple as "foursquare" would never return the Foursquare app back and the results I was getting were never the same between requests.

Re:Google Play doesn't have an API. So I built one. by charliesome on Tuesday October 09, 2012 @07:27PM (#4634407)
https://github.com/pastfuture/MarketBot/blob/master/App/Andr...

    \PastFuture\MarketBot\App\Android\AmazonAppstoreApp
Welcome to Modern PHP.
Re:Google Play doesn't have an API. So I built one. by krob on Wednesday October 10, 2012 @12:28AM (#4635056)
I did something like this, but using xpath queries, only problem is when they decide to change these, you will have "fun" times retesting all the dom locations to fix your scraper when the time does come when it breaks.
Re:Google Play doesn't have an API. So I built one. by kanzure on Wednesday October 10, 2012 @02:36AM (#4635315)
> I did something like this, but using xpath queries, only problem is when they decide to change these

That's a strong reason for going with a library that is used by multiple users (more people to distribute the workload over). But more realistically, you can just use the existing API endpoints because there are client apps in the wild that rely on those APIs working the same way-- at least until Google sunsets Google Play.

Re:Google Play doesn't have an API. So I built one. by krob on Wednesday October 10, 2012 @03:02AM (#4635365)
there was an API which i found a while back, but it didn't work at all, all the unit tests it had failed, so my guess was that google changed their api once again and the project was worthless. The solution i came up with was the only reliable one i could build. It was only like 6 lines of code.
Re:Google Play doesn't have an API. So I built one. by est on Tuesday October 09, 2012 @09:11PM (#4634634)
Oh god parsing HTML pages.

Why don't Google Play provide JSON API like iTunes do?

http://itunes.apple.com/lookup?id=343200656

and alternatively

http://itunes.apple.com/lookup?bundleId=com.clickgamer.Angry...

The second link can be used in client app to self-checking for new version updates.

Re:Google Play doesn't have an API. So I built one. by Evbn on Wednesday October 10, 2012 @12:50AM (#4635101)
There are tons of Android Market website clones. How do they get their data?
Re:Google Play doesn't have an API. So I built one. by est on Wednesday October 10, 2012 @01:21AM (#4635174)
apps are likely to be published on G Play first, then to 3rd party markets.

If an app is exclusively published on 3rd pary market, then it's likely distributed directly through apk , there's no way to identify them using a centralized way.

Re:Google Play doesn't have an API. So I built one. by kanzure on Wednesday October 10, 2012 @02:34AM (#4635312)
> then it's likely distributed directly through apk , there's no way to identify them using a centralized way.

You can identify them via md5 hash of the apk, the "versionName" attribute and the "versionCode" attribute.

Re:Google Play doesn't have an API. So I built one. by waitwhatwhoa on Tuesday October 09, 2012 @07:07PM (#4634352)
Do you run into any query limits with aggressive scraping? A colleague wrote an android market scraper a year or two back and she was repeatedly stymied by limits on the number of queries she could make to the store before getting cut off.
Re:Google Play doesn't have an API. So I built one. by jonursenbach on Tuesday October 09, 2012 @07:13PM (#4634368)
We don't do any aggressive scraping at the moment, so I can't really answer to that. The way our backend stuff works is that when we want to add an app to the site (http://gdgt.com/best/apps), we query for the search results, and then grab the app we're looking for.
Re:Google Play doesn't have an API. So I built one. by TazeTSchnitzel on Tuesday October 09, 2012 @07:32PM (#4634420)
If you want to add iTunes, here's an article on how to get the iTunes Store HTML from PHP:

http://hactheplanet.com/blog/5

Re:Google Play doesn't have an API. So I built one. by jonursenbach on Tuesday October 09, 2012 @07:34PM (#4634428)
Yeah we're currently using their JSON API, it just hasn't been migrated over to this library yet.
Re:Google Play doesn't have an API. So I built one. by gailees on Tuesday October 09, 2012 @10:59PM (#4634860)
Like a BOSS.

How about the Apple Store?

Re:Google Play doesn't have an API. So I built one. by SwaroopH on Wednesday October 10, 2012 @12:49AM (#4635098)
Look above [1], they already have a JSON output for apps.

[1] http://news.ycombinator.com/item?id=4634634

Re:Google Play doesn't have an API. So I built one. by aphidbyteinc on Wednesday October 10, 2012 @12:39AM (#4635076)
Nice.
Re:Google Play doesn't have an API. So I built one. by jeffehobbs on Tuesday October 09, 2012 @09:41PM (#4634706)
Bon fortuna!