Skip to content

implustech/go-playstore-scraper

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-playstore-scraper

It provides an api to retrieve the info of any particular app in the play store.

Installing

go get "github.com/asmsh/go-playstore-scraper"

Notes

Still in beta.
Check the changes before upgrading.
See issues for not supported app fields.

Examples

  • Using the app id(package name), extract all the app info.
package main

import (
	"fmt"
	"github.com/asmsh/go-playstore-scraper/api/apps"
)

func main() {
	app, e := apps.GetAppById("com.google.android.youtube")
	if e != nil {
		fmt.Println(e.Error())
	} else {
		fmt.Printf("screenshots urls: %q\n", app.ScreenShotsUrls)
	}
}
  • Using the app id, extract all the app info in a specific locale, by passing a specific country and a language.
package main

import (
	"fmt"
	"github.com/asmsh/go-playstore-scraper/api/apps"
	"github.com/asmsh/go-playstore-scraper/locales"
)

func main() {
	app, e := apps.GetAppByIdAdv("com.google.android.youtube", locales.US, locales.Arabic)
	if e != nil {
		fmt.Println(e.Error())
	} else {
		fmt.Printf("app description: %q\n", app.Description)
	}
}
  • Using the app id, extract only specific fields of the app info.
package main

import (
	"fmt"
	"github.com/asmsh/go-playstore-scraper/api/apps"
	"github.com/asmsh/go-playstore-scraper/api/apps/fields"
)

func main() {
	app, e := apps.GetAppById("com.google.android.youtube", fields.Rating, fields.RatingCount)
	if e != nil {
		fmt.Println(e.Error())
	} else {
		fmt.Printf("app rating: %q\n", app.Rating)
		fmt.Printf("app rating count: %q\n", app.RatingCount)
	}
}
  • Using the url of the app, extract all the app info .
package main

import (
	"fmt"
	"github.com/asmsh/go-playstore-scraper/api/apps"
)

func main() {
	url := "https://play.google.com/store/apps/details?id=com.google.android.youtube"
	app, e := apps.GetAppByUrl(url)
	if e != nil {
		fmt.Println(e.Error())
	} else {
		fmt.Printf("developer name: %q\n", app.DevName)
	}
}
  • Using the url of the app, extract only specific fields of the app info.
package main

import (
	"fmt"
	"github.com/asmsh/go-playstore-scraper/api/apps"
	"github.com/asmsh/go-playstore-scraper/api/apps/fields"
)

func main() {
	url := "https://play.google.com/store/apps/details?id=com.google.android.youtube"
	app, e := apps.GetAppByUrl(url, fields.InAppExperience)
	if e != nil {
		fmt.Println(e.Error())
	} else {
		fmt.Printf("in-app experience: %q\n", app.InAppExperience)
	}
}
  • Using the url of the app, extract all the app info in a specific locale, by passing a specific country and a language.
package main

import (
	"fmt"
	"github.com/asmsh/go-playstore-scraper/api/apps"
	"github.com/asmsh/go-playstore-scraper/locales"
)

func main() {
	url := "https://play.google.com/store/apps/details?id=com.google.android.youtube"
	app, e := apps.GetAppByUrlAdv(url, locales.US, locales.Arabic)
	if e != nil {
		fmt.Println(e.Error())
	} else {
		fmt.Printf("app category: %q\n", app.Category)
	}
}
more features are yet to come...

About

A web scraper lib for play store

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%