1 | # app-store-scraper [![Build Status](https://secure.travis-ci.org/facundoolano/app-store-scraper.png)](http://travis-ci.org/facundoolano/app-store-scraper)
|
2 | Node.js module to scrape application data from the iTunes/Mac App Store.
|
3 | The goal is to provide an interface as close as possible to the
|
4 | [google-play-scraper](https://github.com/facundoolano/google-play-scraper) module.
|
5 |
|
6 | ## Installation
|
7 | ```
|
8 | npm install app-store-scraper
|
9 | ```
|
10 |
|
11 | ## Usage
|
12 | Available methods:
|
13 | - [app](#app): Retrieves the full detail of an application.
|
14 | - [list](#list): Retrieves a list of applications from one of the collections at iTunes.
|
15 | - [search](#search): Retrieves a list of apps that results of searching by the given term.
|
16 | - [suggest](#suggest): Given a string returns up to 50 suggestions to complete a search query term.
|
17 | - [similar](#similar): Returns the list of "customers also bought" apps shown in the app's detail page.
|
18 | - [reviews](#reviews): Retrieves a page of reviews for the app.
|
19 |
|
20 | ### app
|
21 | Retrieves the full detail of an application. Options:
|
22 |
|
23 | * `id`: the iTunes "trackId" of the app, for example `553834731` for Candy Crush Saga. Either this or the `appId` should be provided.
|
24 | * `appId`: the iTunes "bundleId" of the app, for example `com.midasplayer.apps.candycrushsaga` for Candy Crush Saga. Either this or the `id` should be provided.
|
25 |
|
26 | Example:
|
27 |
|
28 | ```javascript
|
29 | var store = require('app-store-scraper');
|
30 |
|
31 | store.app({id: 553834731}).then(console.log).catch(console.log);
|
32 | ```
|
33 |
|
34 | Results:
|
35 |
|
36 | ```javascript
|
37 | { id: 553834731,
|
38 | appId: 'com.midasplayer.apps.candycrushsaga',
|
39 | title: 'Candy Crush Saga',
|
40 | url: 'https://itunes.apple.com/us/app/candy-crush-saga/id553834731?mt=8&uo=4',
|
41 | description: 'Candy Crush Saga, from the makers of Candy Crush ...',
|
42 | icon: 'http://is5.mzstatic.com/image/thumb/Purple30/v4/7a/e4/a9/7ae4a9a9-ff68-cbe4-eed6-fe0a246e625d/source/512x512bb.jpg',
|
43 | genres: [ 'Games', 'Entertainment', 'Puzzle', 'Arcade' ],
|
44 | genreIds: [ '6014', '6016', '7012', '7003' ],
|
45 | primaryGenre: 'Games',
|
46 | primaryGenreId: 6014,
|
47 | contentRating: '4+',
|
48 | languages: [ 'EN', 'JA' ],
|
49 | size: '73974859',
|
50 | requiredOsVersion: '5.1.1',
|
51 | released: '2012-11-14T14:41:32Z',
|
52 | updated: '2016-05-31T06:39:52Z',
|
53 | releaseNotes: 'We are back with a tasty Candy Crush Saga update ...',
|
54 | version: '1.76.1',
|
55 | price: 0,
|
56 | currency: 'USD',
|
57 | free: true,
|
58 | developerId: 526656015,
|
59 | developer: 'King',
|
60 | developerUrl: 'https://itunes.apple.com/us/developer/king/id526656015?uo=4',
|
61 | developerWebsite: undefined,
|
62 | score: 4,
|
63 | reviews: 818816,
|
64 | currentVersionScore: 4.5,
|
65 | currentVersionReviews: 1323,
|
66 | screenshots:
|
67 | [ 'http://a3.mzstatic.com/us/r30/Purple49/v4/7a/8a/a0/7a8aa0ec-976d-801f-0bd9-7b753fdaf93c/screen1136x1136.jpeg',
|
68 | ... ],
|
69 | ipadScreenshots:
|
70 | [ 'http://a1.mzstatic.com/us/r30/Purple49/v4/db/45/cf/db45cff9-bdb6-0832-157f-ac3f14565aef/screen480x480.jpeg',
|
71 | ... ],
|
72 | appletvScreenshots: [],
|
73 | supportedDevices:
|
74 | [ 'iPhone-3GS',
|
75 | 'iPadWifi',
|
76 | ... ] }
|
77 | ```
|
78 |
|
79 | ### list
|
80 |
|
81 | Retrieves a list of applications from one of the collections at iTunes. Options:
|
82 |
|
83 | * `collection`: the collection to look up. Defaults to `collection.TOP_FREE_IOS`, available options can be found [here](https://github.com/facundoolano/app-store-scraper/blob/master/lib/constants.js#L3).
|
84 | * `category`: the application category to filter for. Defaults to no category, available options can be found [here](https://github.com/facundoolano/app-store-scraper/blob/master/lib/constants.js#L22)
|
85 | * `country`: the two letter country code to get the list from. Defaults to `us`.
|
86 | * `num`: the amount of elements to retrieve. Defaults to `50`, maximum allowed is `200`.
|
87 |
|
88 | Example:
|
89 |
|
90 | ```js
|
91 | var store = require('app-store-scraper');
|
92 |
|
93 | store.list({
|
94 | collection: store.collection.TOP_FREE_IPAD,
|
95 | category: store.category.GAMES_ACTION,
|
96 | num: 2
|
97 | })
|
98 | .then(console.log)
|
99 | .catch(console.log);
|
100 | ```
|
101 |
|
102 | Returns:
|
103 |
|
104 | ```js
|
105 | [ { id: '1091944550',
|
106 | appId: 'com.hypah.io.slither',
|
107 | title: 'slither.io',
|
108 | icon: 'http://is4.mzstatic.com/image/thumb/Purple30/v4/68/d7/4d/68d74df4-f4e7-d4a4-a8ea-dbab686e5554/mzl.ujmngosn.png/100x100bb-85.png',
|
109 | url: 'https://itunes.apple.com/us/app/slither.io/id1091944550?mt=8&uo=2',
|
110 | price: 0,
|
111 | currency: 'USD',
|
112 | free: true,
|
113 | description: 'Play against other people online! ...',
|
114 | developer: 'Steve Howse',
|
115 | developerUrl: 'https://itunes.apple.com/us/developer/steve-howse/id867992583?mt=8&uo=2',
|
116 | developerId: '867992583',
|
117 | genre: 'Games',
|
118 | genreId: '6014',
|
119 | released: '2016-03-25T10:01:46-07:00' },
|
120 | { id: '1046846443',
|
121 | appId: 'com.ubisoft.hungrysharkworld',
|
122 | title: 'Hungry Shark World',
|
123 | icon: 'http://is5.mzstatic.com/image/thumb/Purple60/v4/08/1a/8d/081a8d06-b4d5-528b-fa8e-f53646b6f797/mzl.ehtjvlft.png/100x100bb-85.png',
|
124 | url: 'https://itunes.apple.com/us/app/hungry-shark-world/id1046846443?mt=8&uo=2',
|
125 | price: 0,
|
126 | currency: 'USD',
|
127 | free: true,
|
128 | description: 'The stunning sequel to Hungry ...',
|
129 | developer: 'Ubisoft',
|
130 | developerUrl: 'https://itunes.apple.com/us/developer/ubisoft/id317644720?mt=8&uo=2',
|
131 | developerId: '317644720',
|
132 | genre: 'Games',
|
133 | genreId: '6014',
|
134 | released: '2016-05-04T09:43:06-07:00' } ]
|
135 | ```
|
136 |
|
137 | ### search
|
138 |
|
139 | Retrieves a list of apps that results of searching by the given term. Options:
|
140 |
|
141 | * `term`: the term to search for (required).
|
142 | * `device`: the device to filter for. Defaults to `store.device.ALL`, available options are `store.device.ALL`, `store.device.MAC`, `store.device.IOS`.
|
143 | * `num`: the amount of elements to retrieve. Defaults to `50`, maximum allowed is `200`.
|
144 | * `country`: the two letter country code to get the similar apps from. Defaults to `us`.
|
145 |
|
146 | Example:
|
147 |
|
148 | ```js
|
149 | var store = require('app-store-scraper');
|
150 |
|
151 | store.search({
|
152 | term: 'panda',
|
153 | num: 2,
|
154 | device: store.device.IOS,
|
155 | country : 'us'
|
156 | })
|
157 | .then(console.log)
|
158 | .catch(console.log);
|
159 | ```
|
160 |
|
161 | Results:
|
162 |
|
163 | ```js
|
164 | [
|
165 | { id: 903990394,
|
166 | appId: 'com.pandarg.pxmobileapp',
|
167 | title: 'Panda Express Chinese Kitchen',
|
168 | (...)
|
169 | },
|
170 | {
|
171 | id: 700970012,
|
172 | appId: 'com.sgn.pandapop',
|
173 | title: 'Panda Pop',
|
174 | (...)
|
175 | }
|
176 | ]
|
177 | ```
|
178 |
|
179 | ### suggest
|
180 |
|
181 | Given a string returns up to 50 suggestions to complete a search query term.
|
182 | A priority index is also returned which goes from `0` for terms with low traffic
|
183 | to `10000` for the most searched terms.
|
184 |
|
185 | Example:
|
186 |
|
187 | ```js
|
188 | var store = require('app-store-scraper');
|
189 |
|
190 | store.suggest({term: 'panda'}).then(console.log).catch(console.log);
|
191 | ```
|
192 |
|
193 | Results:
|
194 |
|
195 | ```js
|
196 | [
|
197 | { term: 'panda pop', priority: '7557' },
|
198 | { term: 'panda pop free', priority: '5796' },
|
199 | { term: 'panda', priority: '5512' },
|
200 | { term: 'panda express', priority: '5174' },
|
201 | { term: 'panda games', priority: '4773' },
|
202 | { term: 'panda pop 2', priority: '4695' },
|
203 | ...
|
204 | ]
|
205 | ```
|
206 |
|
207 | ### similar
|
208 | Returns the list of "customers also bought" apps shown in the app's detail page. Options:
|
209 |
|
210 | * `id`: the iTunes "trackId" of the app, for example `553834731` for Candy Crush Saga. Either this or the `appId` should be provided.
|
211 | * `appId`: the iTunes "bundleId" of the app, for example `com.midasplayer.apps.candycrushsaga` for Candy Crush Saga. Either this or the `id` should be provided.
|
212 | * `country`: the two letter country code to get the similar apps from. Defaults to `us`.
|
213 |
|
214 | Example:
|
215 |
|
216 | ```js
|
217 | var store = require('app-store-scraper');
|
218 |
|
219 | store.similar({id: 553834731, country : 'us'}).then(console.log).catch(console.log);
|
220 | ```
|
221 |
|
222 | Results:
|
223 |
|
224 | ```js
|
225 | [
|
226 | {
|
227 | id: 632285588,
|
228 | appId: 'com.nerdyoctopus.dots',
|
229 | title: 'Dots: A Game About Connecting',
|
230 | (...)
|
231 | },
|
232 | {
|
233 | id: 727296976,
|
234 | appId: 'com.sgn.cookiejam',
|
235 | title: 'Cookie Jam',
|
236 | (...)
|
237 | }
|
238 | (...)
|
239 | ]
|
240 | ```
|
241 |
|
242 | ### reviews
|
243 |
|
244 | Retrieves a page of reviews for the app. Options:
|
245 |
|
246 | * `id`: the iTunes "trackId" of the app, for example `553834731` for Candy Crush Saga. Either this or the `appId` should be provided.
|
247 | * `appId`: the iTunes "bundleId" of the app, for example `com.midasplayer.apps.candycrushsaga` for Candy Crush Saga. Either this or the `id` should be provided.
|
248 | * `country`: the two letter country code to get the reviews from. Defaults to `us`.
|
249 | * `page`: the review page number to retrieve. Defaults to `1`, maximum allowed is `10`.
|
250 | * `sort`: the review sort order. Defaults to `store.sort.RECENT`, available options are `store.sort.RECENT` and `store.sort.HELPFUL`.
|
251 |
|
252 | Example:
|
253 |
|
254 | ```js
|
255 | var store = require('app-store-scraper');
|
256 |
|
257 | store.reviews({
|
258 | appId: 'com.midasplayer.apps.candycrushsaga',
|
259 | sort: store.sort.HELPFUL,
|
260 | page: 2
|
261 | })
|
262 | .then(console.log)
|
263 | .catch(console.log);
|
264 | ```
|
265 |
|
266 | Returns:
|
267 |
|
268 | ```js
|
269 | [ { id: '1472864600',
|
270 | date: '2017-03-08T08:08:00.000Z',
|
271 | userName: 'Linda D. Lopez',
|
272 | userUrl: 'https://itunes.apple.com/us/reviews/id324568166',
|
273 | version: '1.80.1',
|
274 | score: 5,
|
275 | title: 'Great way to pass time or unwind',
|
276 | text: 'I was a fan of Bejeweled many moons ago...',
|
277 | url: 'https://itunes.apple.com/us/review?id=553834731&type=Purple%20Software' },,
|
278 | { id: '1472864708',
|
279 | date: '2017-02-08T08:08:00.000Z',
|
280 | userName: 'Jennamaxkidd',
|
281 | userUrl: 'https://itunes.apple.com/us/reviews/id223990784',
|
282 | version: '1.80.1',
|
283 | score: 1,
|
284 | title: 'Help! THE PROBLEM IS NOT FIXED!',
|
285 | text: 'STILL HAVING THE SAME ISSUE. It\'s happening again...',
|
286 | url: 'https://itunes.apple.com/us/review?id=553834731&type=Purple%20Software' },
|
287 | (...)
|
288 | ]
|
289 | ```
|