Get Google Play Store Apps HTML Dynamic Badge
Asked Answered
A

4

26

Suppose I want to write some article on a web-site and publish a link to the discussed Android application (which is available on Google Play).

Is there a standard way to create "badge" for this application, which shows app's name, icon, descriptions, rating, download/install count? Something like this:

Android App in Goole Play

or this:

Android App in Mobile Search

or this:

Android App in Google Search

I found Google Play Badge Generator, but this "Badge Generator" does not do anything special, it is just a dummy static image. Other than that I could not find anything.

Annunciate answered 11/4, 2015 at 6:18 Comment(0)
H
10

I don't think there's an official way to do this (as you have already mentioned the Badge Generator). Anyway you can use one of the many Play Store API wrapper on github to extract the desidered information and build your own fancy badge.

E.g.:

Hemlock answered 15/4, 2015 at 8:19 Comment(3)
I found mentions of SmartAppBanner by following your links ( github.com/basiclines/SmartAppBanner ), but it is for iOS, not Android. Then googling around gave me hits on SO ( #13075194 ), but this is not exactly what I looking for, though very similar.Annunciate
Perhaps, my knowledge is lacking, but all wrappers seems to be server-side?Annunciate
@Annunciate yes but they can be easly hosted somewhere for free (like on Heroku) as mentioned on github.com/basiclines/GooglePlay-JSAPIHemlock
S
7

There´s a fully embedable html widget http://playboard.me/android/widgets/apps you can use out of the box.

You can customize look and feel as they´ve got class per item so you can hide or remove things with css or javascript. Even the "widget by..." has a class pb-wd-footeryou can set to be hidden and leave the widget clean.

Slap answered 15/4, 2015 at 8:24 Comment(5)
It seems to be a widget for playboard.me ?Annunciate
there´s an html embedable code. Just generate the code and change the links for it to go to googleplay!Slap
eduyayo, perhaps I do not understand you. This widget is for PlayBoard web-site. It REQUIRES you to specify link to app on PlayBoard site. Otherwise it will not work.Annunciate
How doi they know your html linka to their site?... Anyway, if such's the case, you can ultimatelly change the link href with javascript. But i really don't see how that could be the caseSlap
eduayao, their widget's script parses html and looks for href's to their site, then it asks their site/server to do all heavy work. Link to play store is purely optional.Annunciate
W
5

You can try this.

https://github.com/facundoolano/google-play-scraper

{
  appId: "com.dxco.pandavszombies",
  title: "Panda vs Zombie: Elvis rage",
  url: "https://play.google.com/store/apps/details?id=com.dxco.pandavszombies&hl=en",
  icon: "https://lh6.ggpht.com/5mI27oolnooL__S3ns9qAf_6TsFNExMtUAwTKz6prWCxEmVkmZZZwe3lI-ZLbMawEJh3=w300",
  minInstalls: 10000,
  maxInstalls: 50000,
  score: 4.9,
  reviews: 2312,
  description: "Everyone in town has gone zombie.",
  descriptionHTML: "Everyone in town has gone <b>zombie</b>.",
  developer: "DxCo Games",
  genre: "Action",
  price: "0",
  free: true
}

Fetch data using ajax jsonp and create html UI to include in your page. Hope you should be good to go.

Wise answered 16/4, 2015 at 14:12 Comment(3)
Seems to be server-side solution?Annunciate
Client side solution. But you need to install this plugin using npm, so that all dependencies gets added to your project.Wise
This is server side actually (it's a node.js module) but it would be pretty easy to port it to the browser if needed, either using browserify or just translating the code (it's written with cheerio which has the same syntax as jquery)Mcgough
M
1

I wanted almost the same thing for my project's GitHub page. I wanted the different versions my app has on F-Droid, GitHub release and on Playstore.

I found a cool badge generator http://shields.io/ that can also get data from an endpoint.

I forked google-play-scraper and added the shields.io endpoint requirements. See my heroku branch for the changes needed.

It's free and a mouse click away to deploy to https://heroku.com from GitHub. After the deploy I have my badge.

Here is how it looks like (static image)

You can also check out the google-play-api repo, it's also using google-play-scraper and the RESTful API is already implemented. You would only need to set up how you want to show the information.

Mariahmariam answered 12/12, 2020 at 17:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.