1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "country": "US",
10 "language": "en",
11 "enableAppSearch": True,
12 "searchQueries": [
13 "spotify",
14 "minecraft",
15 ],
16 "searchMaxResults": 10,
17 "searchFetchFullDetails": False,
18 "enableTopCharts": True,
19 "chartCollections": ["top_free"],
20 "chartCategory": "GAME",
21 "chartsMaxResults": 10,
22 "chartsFetchFullDetails": False,
23 "enableAppDetails": False,
24 "appIds": [],
25 "appUrls": [],
26 "enableDeveloperApps": False,
27 "developerIds": ["Spotify AB"],
28 "developerUrls": [],
29 "developerMaxApps": 30,
30 "enableSimilarApps": False,
31 "similarAppIds": [],
32 "similarAppUrls": [],
33 "similarMaxResults": 10,
34 "enableReviews": False,
35 "reviewAppIds": [],
36 "reviewUrls": [],
37 "reviewsMaxPerApp": 10,
38 "reviewsSort": "most_helpful",
39 "enableScrapeByUrl": False,
40 "scrapeUrls": ["https://play.google.com/store/apps/details?id=com.spotify.music"],
41 "webhookFormat": "json",
42 "proxyConfiguration": {
43 "useApifyProxy": True,
44 "apifyProxyGroups": ["RESIDENTIAL"],
45 "apifyProxyCountry": "US",
46 },
47}
48
49
50run = client.actor("b2b_leads/google-play-charts-real-time-data-scraper").call(run_input=run_input)
51
52
53print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
54for item in client.dataset(run.default_dataset_id).iterate_items():
55 print(item)
56
57