Download the PHP package sunaoka/google-play-scraper without Composer
On this page you can find all versions of the php package sunaoka/google-play-scraper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sunaoka/google-play-scraper
More information about sunaoka/google-play-scraper
Files in sunaoka/google-play-scraper
Package google-play-scraper
Short Description A PHP scraper to get app data from Google Play
License MIT
Informations about the package google-play-scraper
Google Play Scraper
This is an imporoved fork of cstayyab/google-play-scraper to have more control over the package and future versions
A PHP scraper to get app data from Google Play.
Installation
Add sunaoka/google-play-scraper
as a require dependency in your composer.json
file:
Usage
First create a Scraper
instance.
There are several methods to configure the default behavior:
setDelay($delay)
: Sets the delay in milliseconds between requests to Google Play site.setDefaultLang($lang)
: Sets the default language for all requests.$lang
must be an ISO_639-1 two letter language code. If not set, the default language isen
.setDefaultCountry($country)
: Sets the default country for all requests.$country
must be an ISO_3166-1 two letter country code. If not set, the default country isus
.
getApp
Gets app information given its ID.
Parameters
$id
: Google Play app identifier.$lang
: (optional, defaults tonull
): Overrides the default language.$country
: (optional, defaults tonull
): Overrides the default country.
Example
Returns:
The following fields may contain a null
value: price
, last_updated
, size
, downloads
, version
, supported_os
, content_rating
, whatsnew
, video_link
and video_image
. The price
being null
means the app is free.
getApps
Gets information for multiple apps given their IDs.
Parameters
$ids
: Array of Google Play app identifiers.$lang
: (optional, defaults tonull
): Overrides the default language.$country
: (optional, defaults tonull
): Overrides the default country.
Example
getCategories
Returns an array with the existing categories in Google Play.
Example
Returns:
getCollections
Returns an array with the existing collections in Google Play.
Example
Returns:
getList
Retrieves a list of Google Play apps given a collection and optionally filtered by category.
Parameters
$collection
: Google Play collection to retrieve. See getCollections for possible values.$category
: (optional, defaults tonull
) Filter request by this category. See getCategories for possible values.$lang
: (optional, defaults tonull
): Overrides the default language.$country
: (optional, defaults tonull
): Overrides the default country.
Example
Returns:
getDetailList
Same as getList but returning full detail app data. An additional request is made for every app from the list in order to get its details.
getListChunk
Retrieves a chunk of a Google Play app list.
Parameters
$collection
: Google Play collection to retrieve. See getCollections for possible values.$category
: (optional, defaults tonull
) Filter request by this category. See getCategories for possible values.$start
: (optional, defaults to0
): Starting index. Must be a value between0
and180
.$num
: (optional, defaults to60
): Amount of apps to retrieve. Must be a value between0
and120
.$lang
: (optional, defaults tonull
): Overrides the default language.$country
: (optional, defaults tonull
): Overrides the default country.
Example
getDetailListChunk
Same as getListChunk but returning full detail app data. An additional request is made for every app from the list in order to get its details.
getSearch
Retrieves a list of Google Play apps given a search query and optionally filtered by price and rating.
Parameters
$query
: Search query.$price
: (optional, defaults toall
) Filter request by price. Possible values:all
,free
,paid
.$rating
: (optional, defaults toall
) Filter request by rating. Possible values:all
,4+
.$lang
: (optional, defaults tonull
): Overrides the default language.$country
: (optional, defaults tonull
): Overrides the default country.
Example
getDetailSearch
Same as getSearch but returning full detail app data. An additional request is made for every app from the search result in order to get its details.