ProductPromotion
Logo

Go.Lang

made by https://0x3d.site

GitHub - n0madic/google-play-scraper: Golang scraper to get data from Google Play Store
Golang scraper to get data from Google Play Store. Contribute to n0madic/google-play-scraper development by creating an account on GitHub.
Visit Site

GitHub - n0madic/google-play-scraper: Golang scraper to get data from Google Play Store

GitHub - n0madic/google-play-scraper: Golang scraper to get data from Google Play Store

google-play-scraper

GoDoc Go Report Card Coverage Status

Golang scraper to get data from Google Play Store

This project is inspired by the google-play-scraper node.js project

Installation

go get -u github.com/n0madic/google-play-scraper/...

Usage

Get app details

Retrieves the full detail of an application.

package main

import (
    "github.com/davecgh/go-spew/spew"
    "github.com/n0madic/google-play-scraper/pkg/app"
)

func main() {
    a := app.New("com.google.android.googlequicksearchbox", app.Options{
        Country:  "us",
        Language: "us",
    })
    err := a.LoadDetails()
    if err != nil {
        panic(err)
    }
    err = a.LoadPermissions()
    if err != nil {
        panic(err)
    }
    spew.Dump(a)
}

Search apps

Retrieves a list of apps that results of searching by the given term.

package main

import (
    "fmt"

    "github.com/n0madic/google-play-scraper/pkg/search"
)

func main() {
    query := search.NewQuery("game", search.PricePaid,
        search.Options{
            Country:  "ru",
            Language: "us",
            Number:   100,
            Discount: true,
            PriceMax: 100,
            ScoreMin: 4,
        })

    err := query.Run()
    if err != nil {
        panic(err)
    }

    errors := query.LoadMoreDetails(20)
    if len(errors) > 0 {
        panic(errors[0])
    }

    for _, app := range query.Results {
        if !app.IAPOffers {
            fmt.Println(app.Title, app.URL)
        }
    }
}

Get category

Returns a list of clusters for the specified application category.

package main

import (
    "fmt"

    "github.com/n0madic/google-play-scraper/pkg/category"
    "github.com/n0madic/google-play-scraper/pkg/store"
)

func main() {
    clusters, err := category.New(store.Game, store.AgeFiveUnder, category.Options{
        Country:  "us",
        Language: "us",
        Number:   100,
    })
    if err != nil {
        panic(err)
    }

    clusterName := "New & updated games"
    err = clusters[clusterName].Run()
    if err != nil {
        panic(err)
    }

    for _, app := range clusters[clusterName].Results {
        fmt.Println(app.Title, app.URL)
    }
}

Get collection

Retrieve a list of applications from one of the collections at Google Play.

package main

import (
    "fmt"

    "github.com/n0madic/google-play-scraper/pkg/collection"
    "github.com/n0madic/google-play-scraper/pkg/store"
)

func main() {
    c := collection.New(store.TopNewPaid, collection.Options{
        Country: "uk",
        Number:  100,
    })
    err := c.Run()
    if err != nil {
        panic(err)
    }

    for _, app := range c.Results {
        fmt.Println(app.Title, app.Price, app.URL)
    }
}

Get developer applications

Returns the list of applications by the given developer name or ID

package main

import (
    "fmt"

    "github.com/n0madic/google-play-scraper/pkg/developer"
)

func main() {
    dev := developer.New("Google LLC", developer.Options{
        Number: 100,
    })
    err := dev.Run()
    if err != nil {
        panic(err)
    }

    for _, app := range dev.Results {
        fmt.Println(app.Title, "by", app.Developer, app.URL)
    }
}

Get reviews

Retrieves a page of reviews for a specific application.

Note that this method returns reviews in a specific language (english by default), so you need to try different languages to get more reviews. Also, the counter displayed in the Google Play page refers to the total number of 1-5 stars ratings the application has, not the written reviews count. So if the app has 100k ratings, don't expect to get 100k reviews by using this method.

package main

import (
    "fmt"

    "github.com/n0madic/google-play-scraper/pkg/reviews"
)

func main() {
    r := reviews.New("com.activision.callofduty.shooter", reviews.Options{
        Number: 100,
    })

    err := r.Run()
    if err != nil {
        panic(err)
    }

    for _, review := range r.Results {
        fmt.Println(review.Score, review.Text)
    }
}

Get similar

Returns a list of similar apps to the one specified.

package main

import (
    "fmt"

    "github.com/n0madic/google-play-scraper/pkg/similar"
)

func main() {
    sim := similar.New("com.android.chrome", similar.Options{
        Number: 100,
    })
    err := sim.Run()
    if err != nil {
        panic(err)
    }

    for _, app := range sim.Results {
        fmt.Println(app.Title, app.URL)
    }
}

Get suggest

Given a string returns up to five suggestion to complete a search query term.

package main

import (
    "fmt"

    "github.com/n0madic/google-play-scraper/pkg/suggest"
)

func main() {
    sug, err := suggest.Get("chrome", suggest.Options{
        Country:  "us",
        Language: "us",
    })
    if err != nil {
        panic(err)
    }

    for _, s := range sug {
        fmt.Println(s)
    }
}

Articles
to learn more about the golang concepts.

Resources
which are currently available to browse on.

mail [email protected] to add your project or resources here ๐Ÿ”ฅ.

FAQ's
to know more about the topic.

mail [email protected] to add your project or resources here ๐Ÿ”ฅ.

Queries
or most google FAQ's about GoLang.

mail [email protected] to add more queries here ๐Ÿ”.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory