app-store-scraper-bun 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/list.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Fetch app lists (top apps, new apps, etc.)
3
+ */
4
+ import type { App, ListApp, ListOptions } from './types';
5
+ export declare function list(opts?: ListOptions): Promise<App[] | ListApp[]>;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Fetch app privacy details
3
+ */
4
+ import type { PrivacyDetails, PrivacyOptions } from './types';
5
+ export declare function privacy(opts: PrivacyOptions): Promise<PrivacyDetails>;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Fetch app ratings breakdown
3
+ */
4
+ import type { RatingsOptions, RatingsResult } from './types';
5
+ export declare function ratings(opts: RatingsOptions): Promise<RatingsResult>;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Fetch app reviews
3
+ */
4
+ import type { Review, ReviewsOptions } from './types';
5
+ export declare function reviews(opts: ReviewsOptions): Promise<Review[]>;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Search for apps in the App Store
3
+ */
4
+ import type { App, SearchOptions } from './types';
5
+ export declare function search(opts: SearchOptions): Promise<App[] | string[]>;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Fetch similar apps to a given app
3
+ */
4
+ import type { App, SimilarOptions } from './types';
5
+ export declare function similar(opts: SimilarOptions): Promise<App[]>;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Get search suggestions for a term
3
+ */
4
+ import type { Suggestion, SuggestOptions } from './types';
5
+ export declare function suggest(opts: SuggestOptions): Promise<Suggestion[]>;
@@ -0,0 +1,327 @@
1
+ /**
2
+ * App Store Scraper TypeScript Types
3
+ */
4
+ export type Collection = 'topmacapps' | 'topfreemacapps' | 'topgrossingmacapps' | 'toppaidmacapps' | 'newapplications' | 'newfreeapplications' | 'newpaidapplications' | 'topfreeapplications' | 'topfreeipadapplications' | 'topgrossingapplications' | 'topgrossingipadapplications' | 'toppaidapplications' | 'toppaidipadapplications';
5
+ export type Device = 'iPadSoftware' | 'macSoftware' | 'software';
6
+ export type Sort = 'mostRecent' | 'mostHelpful';
7
+ export type CountryCode = string;
8
+ export type MarketId = number;
9
+ export interface App {
10
+ id: number | string;
11
+ appId: string;
12
+ title: string;
13
+ url: string;
14
+ description: string;
15
+ icon: string;
16
+ genres: string[];
17
+ genreIds: string[];
18
+ primaryGenre: string;
19
+ primaryGenreId: number;
20
+ contentRating: string;
21
+ languages: string[];
22
+ size: string;
23
+ requiredOsVersion: string;
24
+ released: string;
25
+ updated: string;
26
+ releaseNotes: string;
27
+ version: string;
28
+ price: number | string;
29
+ currency: string;
30
+ free: boolean;
31
+ developerId: number;
32
+ developer: string;
33
+ developerUrl: string;
34
+ developerWebsite?: string;
35
+ score: number;
36
+ reviews: number;
37
+ currentVersionScore: number;
38
+ currentVersionReviews: number;
39
+ screenshots: string[];
40
+ ipadScreenshots: string[];
41
+ appletvScreenshots: string[];
42
+ supportedDevices: string[];
43
+ }
44
+ export interface AppWithRatings extends App {
45
+ ratings: number;
46
+ histogram: RatingsHistogram;
47
+ }
48
+ export interface ListApp {
49
+ id: string;
50
+ appId: string;
51
+ title: string;
52
+ icon: string;
53
+ url: string | undefined;
54
+ price: number;
55
+ currency: string;
56
+ free: boolean;
57
+ description?: string;
58
+ developer: string;
59
+ developerUrl?: string;
60
+ developerId?: string;
61
+ genre: string;
62
+ genreId: string;
63
+ released: string;
64
+ }
65
+ export interface RatingsHistogram {
66
+ 1: number;
67
+ 2: number;
68
+ 3: number;
69
+ 4: number;
70
+ 5: number;
71
+ }
72
+ export interface RatingsResult {
73
+ ratings: number;
74
+ histogram: RatingsHistogram;
75
+ }
76
+ export interface Review {
77
+ id: string;
78
+ userName: string;
79
+ userUrl: string;
80
+ version: string;
81
+ score: number;
82
+ title: string;
83
+ text: string;
84
+ url: string;
85
+ updated: string;
86
+ }
87
+ export interface PrivacyDetails {
88
+ managePrivacyChoicesUrl: string | null;
89
+ privacyTypes: PrivacyType[];
90
+ }
91
+ export interface PrivacyType {
92
+ privacyType: string;
93
+ identifier: string;
94
+ description: string;
95
+ dataCategories: PrivacyDataCategory[];
96
+ purposes: PrivacyPurpose[];
97
+ }
98
+ export interface PrivacyDataCategory {
99
+ dataCategory: string;
100
+ identifier: string;
101
+ dataTypes: string[];
102
+ }
103
+ export interface PrivacyPurpose {
104
+ purpose: string;
105
+ identifier: string;
106
+ dataCategories: PrivacyDataCategory[];
107
+ }
108
+ export interface VersionHistoryEntry {
109
+ versionDisplay: string;
110
+ releaseDate: string;
111
+ releaseNotes?: string;
112
+ }
113
+ export interface Suggestion {
114
+ term: string;
115
+ }
116
+ export interface RequestOptions {
117
+ method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
118
+ headers?: Record<string, string>;
119
+ timeout?: number;
120
+ }
121
+ export interface BaseOptions {
122
+ country?: string;
123
+ lang?: string;
124
+ requestOptions?: RequestOptions;
125
+ throttle?: number;
126
+ }
127
+ export interface AppOptions extends BaseOptions {
128
+ id?: number | string;
129
+ appId?: string;
130
+ ratings?: boolean;
131
+ }
132
+ export interface ListOptions extends BaseOptions {
133
+ collection?: Collection;
134
+ category?: number;
135
+ num?: number;
136
+ fullDetail?: boolean;
137
+ }
138
+ export interface SearchOptions extends BaseOptions {
139
+ term: string;
140
+ num?: number;
141
+ page?: number;
142
+ idsOnly?: boolean;
143
+ }
144
+ export interface DeveloperOptions extends BaseOptions {
145
+ devId: number | string;
146
+ }
147
+ export interface PrivacyOptions extends BaseOptions {
148
+ id: number | string;
149
+ }
150
+ export interface SuggestOptions extends BaseOptions {
151
+ term: string;
152
+ }
153
+ export interface SimilarOptions extends BaseOptions {
154
+ id?: number | string;
155
+ appId?: string;
156
+ }
157
+ export interface ReviewsOptions extends BaseOptions {
158
+ id?: number | string;
159
+ appId?: string;
160
+ sort?: Sort;
161
+ page?: number;
162
+ }
163
+ export interface RatingsOptions extends BaseOptions {
164
+ id: number | string;
165
+ }
166
+ export interface VersionHistoryOptions extends BaseOptions {
167
+ id: number | string;
168
+ }
169
+ export interface MemoizedOptions {
170
+ maxAge?: number;
171
+ max?: number;
172
+ primitive?: boolean;
173
+ normalizer?: (args: unknown[]) => string;
174
+ }
175
+ export interface ITunesLookupResponse {
176
+ resultCount: number;
177
+ results: ITunesApp[];
178
+ }
179
+ export interface ITunesApp {
180
+ trackId: number;
181
+ bundleId: string;
182
+ trackName: string;
183
+ trackViewUrl: string;
184
+ description: string;
185
+ artworkUrl512?: string;
186
+ artworkUrl100?: string;
187
+ artworkUrl60?: string;
188
+ genres: string[];
189
+ genreIds: string[];
190
+ primaryGenreName: string;
191
+ primaryGenreId: number;
192
+ contentAdvisoryRating: string;
193
+ languageCodesISO2A: string[];
194
+ fileSizeBytes: string;
195
+ minimumOsVersion: string;
196
+ releaseDate: string;
197
+ currentVersionReleaseDate?: string;
198
+ releaseNotes: string;
199
+ version: string;
200
+ price: number;
201
+ currency: string;
202
+ artistId: number;
203
+ artistName: string;
204
+ artistViewUrl: string;
205
+ sellerUrl?: string;
206
+ averageUserRating: number;
207
+ userRatingCount: number;
208
+ averageUserRatingForCurrentVersion: number;
209
+ userRatingCountForCurrentVersion: number;
210
+ screenshotUrls: string[];
211
+ ipadScreenshotUrls: string[];
212
+ appletvScreenshotUrls: string[];
213
+ supportedDevices: string[];
214
+ wrapperType?: string;
215
+ }
216
+ export interface RSSFeedResponse {
217
+ feed: {
218
+ entry: RSSFeedEntry[];
219
+ };
220
+ }
221
+ export interface RSSFeedEntry {
222
+ id: {
223
+ label: string;
224
+ attributes: {
225
+ 'im:id': string;
226
+ 'im:bundleId': string;
227
+ };
228
+ };
229
+ 'im:name': {
230
+ label: string;
231
+ };
232
+ 'im:image': Array<{
233
+ label: string;
234
+ }>;
235
+ link?: Array<{
236
+ attributes: {
237
+ rel: string;
238
+ href: string;
239
+ };
240
+ }> | {
241
+ attributes: {
242
+ rel: string;
243
+ href: string;
244
+ };
245
+ };
246
+ 'im:price': {
247
+ label: string;
248
+ attributes: {
249
+ amount: string;
250
+ currency: string;
251
+ };
252
+ };
253
+ summary?: {
254
+ label: string;
255
+ };
256
+ 'im:artist': {
257
+ label: string;
258
+ attributes?: {
259
+ href: string;
260
+ };
261
+ };
262
+ category: {
263
+ attributes: {
264
+ label: string;
265
+ 'im:id': string;
266
+ };
267
+ };
268
+ 'im:releaseDate': {
269
+ label: string;
270
+ };
271
+ }
272
+ export interface SearchResponse {
273
+ bubbles: Array<{
274
+ results?: Array<{
275
+ id: string;
276
+ }>;
277
+ }>;
278
+ }
279
+ export interface ReviewsFeedResponse {
280
+ feed: {
281
+ entry?: ReviewFeedEntry | ReviewFeedEntry[];
282
+ };
283
+ }
284
+ export interface ReviewFeedEntry {
285
+ id: {
286
+ label: string;
287
+ };
288
+ author: {
289
+ name: {
290
+ label: string;
291
+ };
292
+ uri: {
293
+ label: string;
294
+ };
295
+ };
296
+ 'im:version': {
297
+ label: string;
298
+ };
299
+ 'im:rating': {
300
+ label: string;
301
+ };
302
+ title: {
303
+ label: string;
304
+ };
305
+ content: {
306
+ label: string;
307
+ };
308
+ link: {
309
+ attributes: {
310
+ href: string;
311
+ };
312
+ };
313
+ updated: {
314
+ label: string;
315
+ };
316
+ }
317
+ export interface SuggestXMLResponse {
318
+ plist: {
319
+ dict: Array<{
320
+ array: Array<{
321
+ dict?: Array<{
322
+ string: string[];
323
+ }>;
324
+ }>;
325
+ }>;
326
+ };
327
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Fetch app version history
3
+ */
4
+ import type { VersionHistoryEntry, VersionHistoryOptions } from './types';
5
+ export declare function versionHistory(opts: VersionHistoryOptions): Promise<VersionHistoryEntry[]>;
package/package.json ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "app-store-scraper-bun",
3
+ "version": "1.0.0",
4
+ "description": "Modern TypeScript library for scraping Apple App Store data. Fully typed, minimal dependencies, optimized for Bun.",
5
+ "module": "dist/index.js",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "type": "module",
9
+ "exports": {
10
+ ".": {
11
+ "import": "./dist/index.js",
12
+ "types": "./dist/index.d.ts"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist"
17
+ ],
18
+ "scripts": {
19
+ "test": "bun test",
20
+ "typecheck": "tsc --noEmit",
21
+ "build": "bun run build:js && bun run build:types",
22
+ "build:js": "bun build src/index.ts --outdir dist --target node --format esm",
23
+ "build:types": "tsc -p tsconfig.build.json"
24
+ },
25
+ "keywords": [
26
+ "app-store",
27
+ "apple",
28
+ "itunes",
29
+ "scraper",
30
+ "typescript",
31
+ "bun",
32
+ "ios",
33
+ "app-store-scraper"
34
+ ],
35
+ "author": "rjyo",
36
+ "license": "MIT",
37
+ "repository": {
38
+ "type": "git",
39
+ "url": "git+https://github.com/rjyo/app-store-scraper-bun.git"
40
+ },
41
+ "homepage": "https://github.com/rjyo/app-store-scraper-bun#readme",
42
+ "bugs": {
43
+ "url": "https://github.com/rjyo/app-store-scraper-bun/issues"
44
+ },
45
+ "devDependencies": {
46
+ "@types/bun": "latest"
47
+ },
48
+ "peerDependencies": {
49
+ "typescript": "^5"
50
+ },
51
+ "dependencies": {
52
+ "cheerio": "^1.0.0"
53
+ }
54
+ }