Skip to content
Google Play Store API for .NET(unofficial)
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
GooglePlayStoreApi
Test
.gitignore
GooglePlayStoreApi.sln
LICENSE
README.md

README.md

GooglePlayStoreApiNuGet Codacy grade

Install

Install as NuGet package

Install-Package GooglePlayStoreApi

.NET CLI

dotnet add package GooglePlayStoreApi

Usage

Search

var email = "abc@gmail.com";
var password = "mypassword";
var androidId = Guid.NewGuid().ToString("N").Substring(0, 16);

var client = new GooglePlayStoreClient(email, password, androidId);
var token = await client.GetGoogleToken();
var auth = await client.GetGoogleAuth(token);

var searchResult = await client.Search("gmail");
foreach (var appDetail in searchResult.PreFetch[0].Response.Payload.ListResponse.Doc[0].Child.Select(x => x.Child[0]))
{
  var appId = appDetail.Docid;
  var appName = appDetail.Title;

  Console.WriteLine($"{appId},{appName}");
}

AppDetail

var email = "abc@gmail.com";
var password = "mypassword";
var androidId = Guid.NewGuid().ToString("N").Substring(0, 16);

var client = new GooglePlayStoreClient(email, password, androidId);
var token = await client.GetGoogleToken();
var auth = await client.GetGoogleAuth(token);

var appDetail = await client.AppDetail("com.google.android.gm");
var appName = appDetail.DocV2.Title;
var descriptionHtml = appDetail.DocV2.DescriptionHtml;
var versionCode = appDetail.DocV2.Details.AppDetails.VersionCode;
var versionString = appDetail.DocV2.Details.AppDetails.VersionString;
var permissions = appDetail.DocV2.Details.AppDetails.Permission;
var offerType = appDetail.DocV2.Offer[0].OfferType;

Download APK

var email = "abc@gmail.com";
var password = "mypassword";
var androidId = ""; // use your real GSF ID(Google Service Framework ID)
var gmailPackageName = "com.google.android.gm";

var client = new GooglePlayStoreClient(email, password, androidId);
var token = await client.GetGoogleToken();
var auth = await client.GetGoogleAuth(token);

var appDetail = await client.AppDetail(gmailPackageName);
var offerType = appDetail.DocV2.Offer[0].OfferType;
var versionCode = appDetail.DocV2.Details.AppDetails.VersionCode;

await client.Purchase(gmailPackageName, offerType, versionCode);
var bytes = await client.DownloadApk(gmailPackageName);
File.WriteAllBytes("Gmail.apk", bytes);
You can’t perform that action at this time.