Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
132 lines (97 sloc) 4.95 KB

Market Bot - Build Status Coverage Status

Market Bot is a high performance Ruby scraper for Google's (Google Play) Android Market with a simple to use API. Currently it can: scrape apps, app leaderboards, movies, and tv shows. It can also search for apps. It is built on top of Nokogiri and Typhoeus.

This project is currently seeking developers to help maintain it. Please send pull requests or contact me if you are able to help out. The best ways to get started are to fix bugs, improve documentation, and merge useful changes from public forks. By working together we can make the best scraper for the Google Play Store!


  • Nokogiri
  • Typhoeus


gem install market_bot

Getting Started Example

require 'rubygems'
require 'market_bot'

# Download all the data for the Facebook app.
app ='com.facebook.katana')

# Here we will print out the title of the app.
puts app.title

# Here we will print out the rating of the app.
puts app.rating

# And the price...
puts app.price

# market_bot has many other attributes for each app.
# You can see what attributes are available in your version of
# market_bot by printing a simple constant included in the gem.
puts MarketBot::Android::App::MARKET_ATTRIBUTES.inspect

Simple API Examples

require 'rubygems'
require 'market_bot'

# Download/parse the leaderboard.
lb =, :game)

# Download/parse the details for the first and last entries of the leaderboard.
first_app =[:market_id])
last_app =[:market_id])
puts "First place app (#{first_app.title}) price: #{first_app.price}"
puts "Last place app (#{last_app.title}) price: #{last_app.price}"

# Search for apps.
sq ='donkeys')
puts "Results found: #{sq.results.count}"

# Download/parse developer pages.
developer ='Zynga')
puts "Results found: #{developer.results.count}"

# Print the rating for an app.

# Check if an app exists and has a title.
def app_exists?(app_id)
    return !!
    return false
app_exists?('com.king.candycrushsaga')  # Return's true.
app_exists?('')  # Return's false.

Advanced API Examples

require 'rubygems'
require 'market_bot'

# Create a reusable hydra object with 5 http workers.
hydra = => 5)

# Download/parse the leaderboard.
lb =, :game, :hyda => hydra)

# Download/parse the details for the first and last entries of the leaderboard using the batch API.
first_app =[:market_id], :hydra => hydra)
last_app =[:market_id], :hydra => hydra)
last_app.enqueue_update do |a|
  # Callback example.  This block will execute on a successful
  puts "Callback... title: #{a.title}"

# You must manually check if an error occurred when using the batch API without callbacks.
puts "First place app (#{first_app.title}) price: #{first_app.price}" unless first_app.error
puts "Last place app (#{last_app.title}) price: #{last_app.price}" unless last_app.error

Excessive Use

Google will block your IP address if you attempt to scrape large quantities of data. Please contact me if you are looking for commercial data solutions.

Contributing to Market Bot

  1. Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
  2. Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
  3. Fork the project.
  4. Start a feature/bugfix branch.
  5. Commit and push until you are happy with your contribution.
  6. Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
  7. Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.


Copyright (c) 2011 - 2015 Chad Remesch. See LICENSE.txt for further details.

Jump to Line
Something went wrong with that request. Please try again.