The Google Play Store is the primary app store for billions of Android phones and tablets. It's also available on Chromebooks and Googlebooks, Wear OS smartwatches, cars with Android Automotive ("Cars with Google Built-in"), and the Google Play Games launcher on PC.

With the Google Play Store API, you can retrieve the contents of app/game search results, category home pages, and the Play Store's main home page. If you need the contents of individual app listings, you can use the Google Play Product API. The information is provided in simple JSON or Markdown format, with SerpApi handling the web scraping, HTML parsing, and other challenges for you.

๐Ÿ“š
This guide focuses on apps and games from the Google Play Store, but you can also retrieve results for books, as well as movies and TV shows (also known as Google TV).

What can you scrape from the Google Play Store?

Here's some of the data you can extract for applications and games on the Google Play Store, using SerpApi:

  • Search results: The list of applications and game results for a specified search. Each result can include a title, link, thumbnail icon, package name/product ID, reviews rating, publisher, category, download count, screenshot collection, preview video, price, description, and other information.
  • App listings: The listing for an app or game on the Play Store, including a title, a description, screenshots, requested permissions, device compatibility, categories, and more. This uses the Google Play Product API.
  • Home page: The main landing page of the Google Play Store's apps section, including highlighted apps, recommended categories and lists, and promoted events. You can also use the gl option to see the home page in different countries.
  • Category pages: The pages for individual app and game categories, like "Communication," "Arcade," or "Photography. You need to use the Google Play Store API for app category pages, and the Google Play Games API for game category pages.
  • Top charts: The top free apps, top grossing apps, or other similar lists. You can fetch the results for individual app categories or the entire Play Store, and use the gl option to see results for different countries.
A search on the Play Store for "Adobe", with the original page next to the parsed JSON.
SerpApi fetches and parses Play Store results as structured JSON or Markdown.

Getting started with SerpApi

You need a free SerpApi account before you can use the Google Play Store APIs. You can upgrade to a paid account in the future if you need more search capacity, faster speeds, or other features.

First, create an account and verify your email and other details. After that, get the API key from your account dashboard.

The API key in the dashboard

You should store your API key in a safe location if you are sharing or publishing your code. If the key is leaked or stolen, you can make a new one from the SerpApi account dashboard.

Install the SerpApi library (optional)

You can use SerpApi's official libraries for Python, JavaScript, Ruby, Java, and other languages. They aren't required, but they provide a simple wrapper around the API requests.

The APIs can also be used with cURL, fetch() in Node.js, or anything else that can send GET requests and process a JSON response.

Review the Google Play Store documentation

SerpApi has extensive documentation for each of its APIs, covering all supported parameters and filters, code examples for popular languages, and example JSON responses. Google Play Store access is divided into a few different APIs with their own documentation:

  • The Google Play Store API is for retrieving app/game search results, the main "Apps" home page, top charts (e.g. top free apps, top grossing apps), and the home pages for individual app categories.
  • The Google Play Games API can fetch the main "Games" home page, the home pages for individual game categories, and top charts (e.g. top free games). You can also use it to search for games, but the results are identical to the regular Play Store API.
  • The Google Play Product API can fetch the entire listing for a given app or game, including the description, user reviews, compatibility information, required permissions, and more.
  • The Google Play Movies API allows you to search for movies and TV shows available to rent/buy through the Play Store (which is also the library used by Google TV and YouTube), view top charts (e.g. new movies, best selling), and parse the "Movies & TV" home page.
  • The Google Play Books API can retrieve the "Books" home page, search for eBooks and audiobooks on the Play Store, and top charts (e.g. new releases, top selling books).

If you call the Play Store API, Play Games API, Play Movies API, and Play Books API without any parameters, they will return the home pages for their respective store sections. You can add a q parameter to those APIs to perform a search. The Play Product API requires a product_id parameter for the app or game you want to fetch.

How to scrape home pages, categories, and top charts

Let's start with fetching the Play Store home page, the home pages for individual app and game categories, and the top charts (like the top free apps). If you're using the "FAMILY" category, you can also specify an age range.

The results will be identical across all libraries and GET requests, so use whichever method you want.

GET request with JSON

This will get the home page for the "Apps" section of the Google Play Store in the United States, including its recommended apps and promoted events, with a response in JSON format:

https://serpapi.com/search.json?engine=google_play&gl=us&hl=en&api_key=YOUR_KEY_GOES_HERE

To see the home page and top charts for apps in the Entertainment category, you would just set apps_category to ENTERTAINMENT like this:

https://serpapi.com/search.json?engine=google_play&gl=us&hl=en&apps_category=ENTERTAINMENT&api_key=YOUR_KEY_GOES_HERE

You can check the full list of app categories and game categories. App categories need the engine set to google_play, and game categories need the engine set to google_play_games.

Those responses include a chart_options item, telling you which top charts are available. For apps, these are usually the "Top free," "Top grossing," and "Top paid" charts:

"chart_options": [
    {
      "text": "Top free",
      "value": "topselling_free"
    },
    {
      "text": "Top grossing",
      "value": "topgrossing"
    },
    {
      "text": "Top paid",
      "value": "topselling_paid"
    }
  ],

You can add one of those to the chart parameter in the request. For example, this would fetch the top free apps in the Photography category:

https://serpapi.com/search.json?engine=google_play&gl=us&hl=en&apps_category=PHOTOGRAPHY&chart=topselling_free&api_key=YOUR_KEY_GOES_HERE

Also, SerpApi's JSON Restrictor feature can trim the API response to specific values. This checks the Communication apps category and only returns the title and link of each promoted app:

https://serpapi.com/search.json?engine=google_play&gl=us&hl=en&apps_category=COMMUNICATION&json_restrictor=organic_results[].items[].{title,link}&api_key=YOUR_KEY_GOES_HERE

This can be useful if you need more efficient parsing, like when using an LLM with a limited context window.

GET request with Markdown

If you want a more human-readable format, or if the data will be used with LLMs, you can try Markdown output instead of JSON.

This will fetch the "Apps" home page in Canada in Markdown format, giving you a Markdown table for each section:

https://serpapi.com/search.md?engine=google_play&gl=ca&hl=en&api_key=YOUR_KEY_GOES_HERE

Here's how you can get the home page for Finance apps:

https://serpapi.com/search.md?engine=google_play&gl=ca&hl=en&apps_category=FINANCE&api_key=YOUR_KEY_GOES_HERE

Finally, this will retrieve the top grossing apps in the Music & Audio category:

https://serpapi.com/search.md?engine=google_play&gl=ca&hl=en&apps_category=MUSIC_AND_AUDIO&chart=topgrossing&api_key=YOUR_KEY_GOES_HERE

Markdown output supports all the same parameters and options as JSON requests. You can also combine it with the JSON Restrictor to make the responses even more efficient.

Python

This fetches the "Apps" home page of the Google Play Store in the United States, and displays the title, subtitle, and link for each app highlight, using the official SerpApi Python library:

import serpapi
client = serpapi.Client(api_key=YOUR_KEY_GOES_HERE)

response = client.search({
  "engine": "google_play",
  "hl": "en",
  "gl": "us",
  "store": "apps"
})

for list in response["items_highlight"]:
    for app in list:
      print(f"\n{app['title']} - {app['subtitle']}\n=====\n{app['link']}\n")

Here's how you can retrieve the top free apps in the "Food & Drink" category, and show the name and URL for each one:

import serpapi
client = serpapi.Client(api_key=YOUR_KEY_GOES_HERE)

response = client.search({
  "engine": "google_play",
  "hl": "en",
  "gl": "us",
  "store": "apps",
  "apps_category": "FOOD_AND_DRINK",
  "chart": "topselling_free"
})

for index, app in enumerate(response["top_charts"]):
    print(f"{index + 1}. {app['title']}: {app['link']}")

Ruby

This uses the SerpApi Ruby gem to check the Play Store "Apps" home page in Canada, and then shows each highlighted app:

require "serpapi"

settings = {
  engine: "google_play",
  api_key: YOUR_KEY_GOES_HERE,
  gl: "ca",
  store: "apps"
}

response = SerpApi::Client.new(settings)

for list in response.search[:items_highlight] do
  for app in list do
    puts "\n#{app[:title]} - #{app[:subtitle]}\n======\n#{app[:link]}\n"
  end
end

Here's how you can list the most popular free Weather apps in Canada:

require "serpapi"

settings = {
  engine: "google_play",
  api_key: YOUR_KEY_GOES_HERE,
  gl: "ca",
  store: "apps",
  apps_category: "WEATHER",
  chart: "topselling_free"
}

response = SerpApi::Client.new(settings)

response.search[:top_charts].each_with_index do |app, index|
  puts "\n#{index + 1}. #{app[:title]} - #{app[:link]}\n"
end

JavaScript and Node.js

This will retrieve the Play Store's "Apps" home page in the United Kingdom, using the SerpApi JavaScript library, and display each highlighted app with its title, subtitle, and link:

import { getJson } from 'serpapi';

let settings = {
  engine: "google_play",
  api_key: YOUR_KEY_GOES_HERE,
  gl: "uk",
  store: "apps",
}

let search = await getJson(settings);

for (let list of search.items_highlight) {
  for (let app of list) {
    console.log(`\n${app.title} - ${app.subtitle}\n======\n${app.link}`)
  }
}

Here's how you can list the United Kingdom's top grossing apps in the "Tools" category:

import { getJson } from 'serpapi';

let settings = {
  engine: "google_play",
  api_key: YOUR_KEY_GOES_HERE,
  gl: "uk",
  store: "apps",
  apps_category: "TOOLS",
  chart: "topgrossing"
}

let search = await getJson(settings);

for (let [i, app] of search.top_charts.entries()) {
  console.log(`${i +1}. ${app.title} - ${app.link}`)
}

cURL

This is how you can fetch the Play Store's "Apps" home page in Germany with a cURL request:

curl --get https://serpapi.com/search \
 -d api_key="YOUR_KEY_GOES_HERE" \
 -d engine="google_play" \
 -d store="apps" \
 -d hl="en" \
 -d gl="de"

How to scrape app search results

The Google Play Store API can also perform searches for apps, giving you the same results as the Play Store's website or mobile application. You just pass a q parameter in your API request, containing the query you want.

๐ŸŽฎ
The Google Play Store combines apps and games into the same search results. Here, "apps" refers to both categories.

As with the other modes, the API results are the same across all libraries and GET requests.

GET request with JSON

This searches for "puzzle game" in the Play Store with the United States as the region:

https://serpapi.com/search.json?engine=google_play&q=puzzle+game&gl=us&hl=en&api_key=YOUR_KEY_GOES_HERE

If you need more than the first page of results, check the serpapi_pagination object in the response, and make another call with the URL in the next key:

"serpapi_pagination": {
  "next": "https://serpapi.com/search.json?engine=google_play&gl=us&hl=en&next_page_token=SECT__&q=puzzle+game&store=apps",
  "next_page_token": "SECT__"
}

You can also use JSON Restrictor to limit the API response to specific objects and values. This will run the same search for "puzzle game" but only include the title and link of each result:

https://serpapi.com/search.json?engine=google_play&q=puzzle+game&gl=us&hl=en&json_restrictor=organic_results[].items[]{title,link}&api_key=YOUR_KEY_GOES_HERE

This is especially useful for LLMs with a limited context window, or any other situation where you need server-side parsing.

GET request with Markdown

The API can also create responses in Markdown format instead of JSON, which can be a better option for human-readable results or input for AI models.

This will search for "messaging" apps in the United States, and provide the result in Markdown:

https://serpapi.com/search.md?engine=google_play&q=messaging&gl=us&hl=en&api_key=YOUR_KEY_GOES_HERE

Markdown supports all the same parameters as JSON output, and it also works with JSON Restrictor. Just use search.md instead of search.json in your request.

Python

This searches for "battle royale" apps in the United States, and returns the title and link of each result, using the official Python integration:

import serpapi
client = serpapi.Client(api_key=YOUR_KEY_GOES_HERE)

response = client.search({
  "engine": "google_play",
  "hl": "en",
  "gl": "us",
  "store": "apps",
  "q": "battle royale",
})

for index, app in enumerate(response["organic_results"][0]["items"]):
    print(f"{index + 1}. {app['title']}: {app['link']}")

Ruby

This uses the SerpApi Ruby gem to search for "emulator" apps in Canada, and returns the title and link of each result:

require "serpapi"

response = SerpApi::Client.new({
  engine: "google_play",
  api_key: YOUR_KEY_GOES_HERE,
  gl: "ca",
  store: "apps",
  q: "emulator"
})

response.search.dig(:organic_results, 0, :items).each_with_index do |app, index|
  puts "\n#{index + 1}. #{app[:title]} - #{app[:link]}"
end

JavaScript and Node.js

Here's how you can use the official JavaScript library to search for "racing" apps in the United Kingdom, and show the title and link for each result:

import { getJson } from 'serpapi';

let search = await getJson({
  engine: "google_play",
  api_key: YOUR_KEY_GOES_HERE,
  gl: "uk",
  store: "apps",
  q: "racing"
});

for (let [i, app] of Object.entries(search.organic_results[0].items)) {
  console.log(`${(Number(i) + 1)}. ${app.title} - ${app.link}`)
}

cURL

Here's how you could search for "messaging" apps in the United States with cURL:

curl --get https://serpapi.com/search \
 -d api_key="YOUR_KEY_GOES_HERE" \
 -d engine="google_play" \
 -d hl="en" \
 -d gl="us" \
 -d store="apps" \
 -d q="messaging"

How to scrape app listings and reviews

If you need the details from an app or game's full page on the Google Play Store, like the attached screenshots or user reviews, you can use the Google Play Product API. The results will be identical across all libraries and GET requests, so use whichever method you want.

The only required parameter for the Google Play Product API is product_id, which represents the package name or product ID for the app you want to check. You can find that in the URL for the app's listing, as the id parameter.

For example, the URL for YouTube in the Play Store includes the com.google.android.youtube ID:

https://play.google.com/store/apps/details?id=com.google.android.youtube&gl=us

The page for Minecraft contains com.mojang.minecraftpe as the ID:

https://play.google.com/store/apps/details?id=com.mojang.minecraftpe&gl=us

If you need to fetch the IDs for apps in an automation, you can use the Google Play Store API first to retrieve that information for any search results, then store that information for a request to the Google Play Product API.

GET request with JSON

This fetches the app listing for YouTube in the United States, with the response in JSON format:

https://serpapi.com/search.json?engine=google_play_product&product_id=com.google.android.youtube&gl=us&store=apps&platform=phone&api_key=YOUR_KEY_GOES_HERE

That response includes the app name, any warnings and notices (like "Contains ads"), the download count, content rating, screenshots, permissions, some recent reviews, and other information. If you want more reviews, add the all_reviews parameter like this:

https://serpapi.com/search.json?engine=google_play_product&product_id=com.google.android.youtube&gl=us&store=apps&all_reviews=true&platform=phone&sort_by=1&api_key=YOUR_KEY_GOES_HERE

For more examples of fetching app reviews, see our guide on how to scrape Google Play Store app reviews.

You can also exclude information you don't need with the JSON Restrictor feature. This example will only retrieve the attached screenshots and videos for the YouTube app listing:

https://serpapi.com/search.json?engine=google_play_product&product_id=com.google.android.youtube&gl=us&store=apps&platform=phone&sort_by=1&json_restrictor=media&api_key=YOUR_KEY_GOES_HERE

The JSON Restrictor is useful for LLMs with a limited context window, limiting bandwidth usage, and other situations where you need server-side parsing.

GET request with Markdown

SerpApi supports Markdown output for all engines, including the Google Play Store API and Google Play Product API. Here's how you could retrieve the listing for Minecraft in Markdown with a GET request:

https://serpapi.com/search.md?engine=google_play_product&product_id=com.mojang.minecraftpe&gl=us&store=apps&platform=phone&api_key=YOUR_KEY_GOES_HERE

This will fetch the most relevant app reviews in Markdown format:

https://serpapi.com/search.md?engine=google_play_product&product_id=com.mojang.minecraftpe&gl=us&store=apps&all_reviews=true&platform=phone&sort_by=1&api_key=YOUR_KEY_GOES_HERE

You can use all the same options from JSON mode in Markdown, and it also works with JSON Restrictor. Just use search.md instead of search.json in your request.

Python

Here's how you can check several app listings, using the Python library, and display each app's permissions:

import serpapi
client = serpapi.Client(api_key=YOUR_KEY_GOES_HERE)

settings = {
  "engine": "google_play_product",
  "hl": "en",
  "gl": "us",
  "store": "apps",
  "platform": "phone",
}

apps_list = [
  "com.mojang.minecraftpe",
  "com.ninjakiwi.bloonstd6",
  "com.playstack.balatro.android",
  "com.facebook.katana",
  "com.whatsapp"
]

for app in apps_list:
    settings["product_id"] = app
    response = client.search(settings)
    # Games will have "about_this_game", other apps will have "about_this_app"
    info = response.get("about_this_app", None) or response.get("about_this_game", None)
    permissions = info.get("permissions", [])
    # Print a heading with the app's name
    print(f"\n{response['product_info']['title']}\n======")
    # Print each permission
    if permissions:
      for permission in permissions:
          print(f"{permission['type']} - {', '.join(permission['details'])}")
    else:
       print("No permissions listed.")

Ruby

This will use the official SerpApi Ruby gem to check several app listings, and display the full list of permissions for each app:

require "serpapi"

settings = {
  engine: "google_play_product",
  api_key: YOUR_KEY_GOES_HERE,
  hl: "en",
  gl: "us",
  store: "apps",
  platform: "phone"
}

apps_list = [
  "com.mojang.minecraftpe",
  "com.ninjakiwi.bloonstd6",
  "com.playstack.balatro.android",
  "com.facebook.katana",
  "com.whatsapp"
]

apps_list.each do |app|
  settings[:product_id] = app
  response = SerpApi::Client.new(settings)
  # Games will have "about_this_game", other apps will have "about_this_app"
  info = response.search[:about_this_game] || response.search[:about_this_app]
  permissions = info&.dig(:permissions) || []
  # Print a heading with the app's name
  puts "\n#{response.search[:product_info][:title]}\n======"
  if permissions.empty?
    puts "No permissions listed."
  else
    permissions.each do |permission|
      puts "#{permission[:type]} - #{permission[:details].join(', ')}"
    end
  end
end

JavaScript and Node.js

Here's how you can fetch the listings for several apps, using the SerpApi JavaScript library, and display a list of each app's permissions:

import { getJson } from 'serpapi';

let settings = {
  engine: "google_play_product",
  api_key: YOUR_KEY_GOES_HERE,
  hl: "en",
  gl: "us",
  store: "apps",
  platform: "phone"
}

const appsList = [
  "com.mojang.minecraftpe",
  "com.ninjakiwi.bloonstd6",
  "com.playstack.balatro.android",
  "com.facebook.katana",
  "com.whatsapp"
]

for (let app of appsList) {
  settings.product_id = app;
  let search = await getJson(settings);
  // Games will have "about_this_game", other apps will have "about_this_app"
  let info = search?.about_this_game || search?.about_this_app;
  let permissions = info?.permissions || [];
  // Print a heading with the app's name
  console.log(`\n${search.product_info.title}\n======`);
  if (permissions.length) {
    for (let permission of permissions) {
      console.log(`${permission.type} - ${permission.details.join(', ')}`)
    }
  } else {
    console.log("No permissions listed.")
  }
}

cURL

This is how you can fetch the app listing for WhatsApp in the United States, using a cURL request:

curl --get https://serpapi.com/search \
 -d api_key="YOUR_KEY_GOES_HERE" \
 -d engine="google_play_product" \
 -d product_id="com.whatsapp" \
 -d gl="us" \
 -d store="apps" \
 -d platform="phone" \
 -d sort_by="2"

Conclusion

The home pages, top charts, app listings, and search results of the Google Play Store can provide invaluable details about the Android app ecosystem. With the Google Play Store API and Google Play Product API from SerpApi, that information can be pulled into any automation or programming language.

Beyond the apps and games store, the Play Store is also one of the interfaces for Google's movie and TV library, and it's a place to buy eBooks and Audiobooks. The Google Play Movies API and Google Play Books API can help you fetch that information.

If you need help using SerpApi, please contact us.