### Get Similar Apps by Bundle ID Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/api-reference/similar.md This example shows how to find similar apps using their bundle ID. It directly logs the resulting array of apps. ```javascript const store = require('app-store-scraper'); store.similar({ appId: 'com.midasplayer.apps.candycrushsaga' }) .then(apps => console.log(apps)) .catch(error => console.error(error)); ``` -------------------------------- ### Search Apps and Get Details Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/README.md Example of searching for apps by a term and then fetching the full details of the first result using its ID. ```javascript const store = require('app-store-scraper'); // Search for apps const results = await store.search({ term: 'panda', num: 10 }); // Get full details for first result const app = await store.app({ id: results[0].id }); ``` -------------------------------- ### Install App Store Scraper Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/INDEX.md Install the app-store-scraper package using npm. ```bash npm install app-store-scraper ``` -------------------------------- ### Get App Details with Ratings Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/configuration.md Fetches details for a specific app including its ratings count and histogram. Requires either an `id` or `appId`. This example specifies the app ID, requests ratings, and sets the country and language. ```javascript store.app({ id: 553834731, ratings: true, country: 'gb', lang: 'en' }) ``` -------------------------------- ### Suggest Search Terms Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/configuration.md Provides search term suggestions based on a prefix. Requires a search term and optionally accepts a country code. This example suggests terms starting with 'panda' in Japan. ```javascript store.suggest({ term: 'panda', country: 'jp' }) ``` -------------------------------- ### Promise API Example Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/README.md Demonstrates the basic usage of the promise-based API for fetching app details. Handle success with .then() and errors with .catch(). ```javascript store.app({ id: 553834731 }) .then(result => { /* handle success */ }) .catch(error => { /* handle error */ }) ``` -------------------------------- ### Display top suggestions Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/api-reference/suggest.md This example shows how to retrieve suggestions for a search term and then display only the top 10 suggestions, numbered for clarity. ```javascript const store = require('app-store-scraper'); store.suggest({ term: 'photo' }) .then(suggestions => { console.log('Top suggestions for "photo":'); suggestions.slice(0, 10).forEach((s, i) => { console.log(`${i + 1}. ${s.term}`); }); }) .catch(error => console.error(error)); ``` -------------------------------- ### AppSummary Return Type Example Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/api-reference/list.md This example shows the structure of the AppSummary object returned by the list function. When `fullDetail` is true, objects include all AppDetail fields. ```javascript [ { id: string, // iTunes trackId appId: string, // Bundle identifier title: string, // App name icon: string, // Icon image URL url: string, // iTunes app store URL price: number, // Price in currency (0 for free) currency: string, // Currency code free: boolean, // True if price is 0 description: string, // App description (if available) developer: string, // Developer name developerUrl: string, // Link to developer profile developerId: string, // Developer/artist ID genre: string, // Primary genre/category name genreId: string, // Primary genre ID released: string // Release date (ISO 8601) }, // ... more apps (when fullDetail: true, objects include all AppDetail fields) ] ``` -------------------------------- ### Get Similar Apps Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/README.md Find "Customers Also Bought" recommendations. ```APIDOC ## GET /similar ### Description Find "Customers Also Bought" recommendations. ### Method GET ### Endpoint /similar ### Parameters #### Query Parameters - **id** (string) - Required - The app's unique identifier. ``` -------------------------------- ### Search Similar Apps in Different Country Context Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/api-reference/similar.md This example demonstrates how to fetch similar apps for a specific app ID while specifying the country ('jp') and language ('ja') for the search context. ```javascript const store = require('app-store-scraper'); store.similar({ id: 553834731, country: 'jp', lang: 'ja' }) .then(apps => console.log(apps)) .catch(error => console.error(error)); ``` -------------------------------- ### Rate Limiting with Throttle Option Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/INDEX.md Demonstrates how to apply rate limiting for bulk operations by setting the 'throttle' option. This example makes one request per second for a list of app IDs. ```javascript const appIds = [/* 100+ app IDs */]; // Make 1 request per second Promise.all(appIds.map(id => store.app({ id, throttle: 1 }) )); ``` -------------------------------- ### Get suggestions for a search term Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/api-reference/suggest.md This snippet demonstrates how to get search suggestions for a given term. It logs the number of suggestions found and each suggested term. ```javascript const store = require('app-store-scraper'); store.suggest({ term: 'panda' }) .then(suggestions => { console.log(`Found ${suggestions.length} suggestions`); suggestions.forEach(s => console.log(s.term)); }) .catch(error => console.error(error)); ``` -------------------------------- ### Search and Get First Result Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/QUICK-REFERENCE.md Searches for apps based on a term and retrieves the details of the first result. Requires a subsequent call to `store.app` to get full details. ```javascript const results = await store.search({ term: 'panda', num: 1 }); const app = await store.app({ id: results[0].id }); ``` -------------------------------- ### Handle Errors with Promises Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/configuration.md Illustrates how to handle errors when using the app-store-scraper library, which returns Promises. This example shows how to use `.catch()` to identify and log different types of errors, such as missing parameters or 'App not found'. ```javascript store.app({ id: 123 }) .catch(error => { if (error.message.includes('404')) { console.log('App not found'); } else if (error.message.includes('required')) { console.log('Missing required parameter'); } else { console.log('Network or parsing error:', error); } }); ``` -------------------------------- ### Get reviews Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/START-HERE.txt Fetches reviews for a specific app, with support for pagination. ```APIDOC ## Get reviews ### Description Fetches reviews for a specific app, with support for pagination. ### Method Not applicable (SDK method) ### Endpoint Not applicable (SDK method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **id** (number) - Required - The ID of the app. - **page** (number) - Optional - The page number of reviews to retrieve. ``` -------------------------------- ### Memoize Store Queries Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/configuration.md Cache results of repeated queries to avoid redundant API calls. This example sets a cache with a 1-hour expiration. ```javascript const store = store.memoized({ maxAge: 1000 * 60 * 60 }); // 1 hour cache ``` -------------------------------- ### Get App Reviews Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/README.md Access paginated user reviews with sorting. ```APIDOC ## GET /reviews ### Description Access paginated user reviews with sorting. ### Method GET ### Endpoint /reviews ### Parameters #### Query Parameters - **id** (string) - Required - The app's unique identifier. - **page** (integer) - Optional - The page number for pagination. - **sort** (string) - Optional - The sorting order for reviews (e.g., 'recent', 'helpful'). ``` -------------------------------- ### Search Apps with Pagination and Filtering Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/configuration.md Performs a search for apps based on a term, with options for number of results, page number, country, and whether to return only IDs. This example searches for 'panda', requests 25 results on page 2, from Japan, and includes full details. ```javascript store.search({ term: 'panda', num: 25, page: 2, country: 'jp', idsOnly: false }) ``` -------------------------------- ### Get App Recommendations Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/INDEX.md Fetches a list of similar apps based on a given app ID. Displays the title and developer of the top 5 recommendations. Requires the app ID. ```javascript const store = require('app-store-scraper'); store.similar({ id: 553834731 }) .then(relatedApps => { console.log('Users also liked:'); relatedApps.slice(0, 5).forEach(app => { console.log(`- ${app.title} by ${app.developer}`); }); }); ``` -------------------------------- ### Get App Details Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/START-HERE.txt Retrieve specific details for an app using its ID. ```javascript store.app({ id: 553834731 }) ``` -------------------------------- ### Get Similar Apps Source: https://github.com/facundoolano/app-store-scraper/blob/master/README.md Retrieves a list of apps that are frequently bought together with the specified app. Requires either app ID or bundle ID. ```javascript var store = require('app-store-scraper'); store.similar({id: 553834731}).then(console.log).catch(console.log); ``` -------------------------------- ### Fetch App Reviews with Sorting Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/configuration.md Retrieves reviews for a specific app, with options for page number, sort order, and country. This example fetches reviews for app ID 553834731, on page 2, sorted by helpfulness, from the US. ```javascript store.reviews({ id: 553834731, page: 2, sort: store.sort.HELPFUL, country: 'us' }) ``` -------------------------------- ### Get suggestions for different countries Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/api-reference/suggest.md This snippet demonstrates how to fetch suggestions for the same search term from multiple App Store regions (US, Japan, Great Britain) concurrently using `Promise.all`. ```javascript const store = require('app-store-scraper'); Promise.all([ store.suggest({ term: 'panda', country: 'us' }), store.suggest({ term: 'panda', country: 'jp' }), store.suggest({ term: 'panda', country: 'gb' }) ]) .then(results => { console.log('US suggestions:', results[0].map(s => s.term)); console.log('JP suggestions:', results[1].map(s => s.term)); console.log('GB suggestions:', results[2].map(s => s.term)); }) .catch(error => console.error(error)); ``` -------------------------------- ### Get Search Suggestions Source: https://github.com/facundoolano/app-store-scraper/blob/master/README.md Fetches up to 50 search suggestions for a given query term, including a priority index. ```javascript var store = require('app-store-scraper'); store.suggest({term: 'panda'}).then(console.log).catch(console.log); ``` -------------------------------- ### Get All Apps from a Developer Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/api-reference/developer.md Fetches all applications published by a given developer ID. Logs the total number of apps and details for each app. ```javascript const store = require('app-store-scraper'); store.developer({ devId: 284882218 }) .then(apps => { console.log(`Developer has ${apps.length} apps`); apps.forEach(app => { console.log(`${app.title} - ${app.score}★ (${app.reviews} reviews)`); }); }) .catch(error => console.error(error)); ``` -------------------------------- ### Get Customer Reviews Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/api-reference/reviews.md Fetches customer reviews for a specified app. Supports sorting by recency or helpfulness and pagination. ```APIDOC ## GET /customerreviews ### Description Retrieves customer reviews for a specific app from the App Store. Reviews can be sorted by recency or helpfulness, and paginated up to 10 pages. ### Method GET ### Endpoint `https://itunes.apple.com/{country}/rss/customerreviews/page={page}/id={id}/sortby={sort}/json` ### Parameters #### Path Parameters - **country** (string) - Required - The country code for the App Store (e.g., 'us', 'gb'). - **page** (integer) - Optional - The page number of reviews to retrieve. Defaults to 1. Maximum 10 pages. - **id** (integer) - Required - The unique identifier of the app. - **sort** (string) - Optional - The sorting order for reviews. Use `mostRecent` for newest first or `mostHelpful` for most helpful first. Defaults to `mostRecent`. ### Request Example ```json { "country": "us", "id": 123456789, "page": 1, "sort": "mostHelpful" } ``` ### Response #### Success Response (200) - **reviews** (array) - An array of review objects, each containing details like author, rating, title, and content. #### Response Example ```json { "feed": { "entry": [ { "author": {"uri": "...", "name": "Reviewer Name"}, "rating": "5", "title": "Great App!", "content": "This app is fantastic and very useful." } ] } } ``` ``` -------------------------------- ### Fetching App Version History Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/QUICK-REFERENCE.md Get a list of past versions for an app, including version display, release notes, and dates. ```javascript store.versionHistory({ id: 324684580 }) // Returns [{ versionDisplay, releaseNotes, releaseDate, releaseTimestamp }, ...] ``` -------------------------------- ### Get App Details Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/QUICK-REFERENCE.md Fetches all available details for a specific app using its ID. Set `ratings: true` to include ratings and histogram data. ```javascript const app = await store.app({ id: 553834731, ratings: true // adds ratings & histogram }); ``` -------------------------------- ### Get Reviews Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/api-reference/reviews.md Fetches reviews for a specified app. You can provide either the app's ID or its bundle ID. Options include specifying the page number and sort order. ```APIDOC ## GET /reviews ### Description Fetches reviews for a specified app. You can provide either the app's ID or its bundle ID. Options include specifying the page number and sort order. ### Method GET ### Endpoint /reviews ### Parameters #### Query Parameters - **id** (number) - Required - The unique identifier of the app. - **appId** (string) - Required - The bundle ID of the app. - **page** (number) - Optional - The page number of reviews to fetch. Must be between 1 and 10. - **sort** (string) - Optional - The sort order for reviews. Must be one of `store.sort.RECENT` or `store.sort.HELPFUL`. ### Request Example ```javascript const store = require('app-store-scraper'); store.reviews({ id: 553834731 }) .then(reviews => { // Process reviews }) .catch(error => console.error(error)); ``` ### Response #### Success Response (200) - **reviews** (array) - An array of review objects. #### Response Example ```json [ { "userName": "User Name", "title": "Review Title", "score": 5, "version": "1.0.0", "text": "Review text content." } ] ``` ### Error Handling - **Error**: Neither `id` nor `appId` is provided. - **Error**: `sort` is not a valid sort option. - **Error**: `page` is less than 1. - **Error**: `page` is greater than 10. ``` -------------------------------- ### Autocomplete behavior with async/await Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/api-reference/suggest.md This example defines an asynchronous function `autocomplete` that takes a partial term and returns an array of suggested terms. It includes error handling for the suggestion process. ```javascript const store = require('app-store-scraper'); async function autocomplete(partialTerm) { try { const suggestions = await store.suggest({ term: partialTerm }); return suggestions.map(s => s.term); } catch (error) { console.error('Autocomplete failed:', error); return []; } } // Usage: autocomplete('pand').then(terms => { terms.forEach(term => console.log(term)); // Output: panda pop, panda pop free, panda, panda express, ... }); ``` -------------------------------- ### Get similar apps with country and language context Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/api-reference/similar.md Retrieves similar apps while specifying the country and language context for the search. This allows for region-specific recommendations. ```APIDOC ## Get similar apps with country and language context ### Description Retrieves similar apps while specifying the country and language context for the search. This allows for region-specific recommendations. ### Method POST ### Endpoint /similar ### Parameters #### Request Body - **id** (number) - Required - The App Store ID of the app to find similar apps for. - **country** (string) - Required - The two-letter country code (e.g., 'jp'). - **lang** (string) - Required - The two-letter language code (e.g., 'ja'). ### Request Example ```json { "id": 553834731, "country": "jp", "lang": "ja" } ``` ### Response #### Success Response (200) - **similarApps** (array) - An array of objects, where each object represents a similar app. ### Response Example ```json [ { "title": "Japanese App Example", "developer": "Japanese Developer" } ] ``` ### Throws - **Error** - If neither `id` nor `appId` is provided. ``` -------------------------------- ### Get App Ratings Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/configuration.md Fetches the ratings for a specific app. Requires the app's iTunes track ID and optionally accepts a country code. This example requests ratings for app ID 553834731 from Germany. ```javascript store.ratings({ id: 553834731, country: 'de' }) ``` -------------------------------- ### Get Developer Apps Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/configuration.md Retrieves a list of apps developed by a specific developer. Requires the developer's artist ID and optionally accepts country and language codes. This example fetches apps for developer ID 284882218 from France. ```javascript store.developer({ devId: 284882218, country: 'fr' }) ``` -------------------------------- ### Import and Initialize Memoized Store Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/configuration.md Import the app-store-scraper library and create a memoized version of the store object with default options. ```javascript const store = require('app-store-scraper'); const cachedStore = store.memoized(options); ``` -------------------------------- ### Get Search Suggestions Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/README.md Get search term suggestions for autocomplete. ```APIDOC ## GET /suggest ### Description Get search term suggestions for autocomplete. ### Method GET ### Endpoint /suggest ### Parameters #### Query Parameters - **term** (string) - Required - The search term to get suggestions for. ``` -------------------------------- ### Get Rating Distribution Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/README.md Get rating counts and distribution histogram. ```APIDOC ## GET /ratings ### Description Get rating counts and distribution histogram. ### Method GET ### Endpoint /ratings ### Parameters #### Query Parameters - **id** (string) - Required - The app's unique identifier. ``` -------------------------------- ### Get App Version History Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/README.md Get version release notes and history. ```APIDOC ## GET /version-history ### Description Get version release notes and history. ### Method GET ### Endpoint /version-history ### Parameters #### Query Parameters - **id** (string) - Required - The app's unique identifier. ``` -------------------------------- ### Importing the Scraper Library Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/QUICK-REFERENCE.md Import the main library and optionally initialize it with caching enabled. ```javascript const store = require('app-store-scraper'); const cached = store.memoized(); // with caching ``` -------------------------------- ### app() Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/INDEX.md Retrieve full application details from the App Store. ```APIDOC ## app() ### Description Retrieve full application details, including metadata, ratings, reviews, and screenshots, for a given app. ### Method `app(appId, options)` ### Parameters #### Path Parameters - **appId** (string) - Required - The unique identifier of the application. #### Query Parameters - **options** (object) - Optional - Configuration options for the request. - **country** (string) - Optional - The country code (e.g., 'us', 'gb'). - **lang** (string) - Optional - The language code (e.g., 'en', 'es'). - **cacheTTL** (number) - Optional - Time-to-live for cache in milliseconds. ### Returns `Promise` - A promise that resolves with the detailed information of the app. ``` -------------------------------- ### Bulk App Fetching with Promise.allSettled Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/README.md Demonstrates fetching details for multiple app IDs concurrently using `Promise.allSettled` and logging successes or failures. ```javascript const store = require('app-store-scraper').memoized(); const appIds = [553834731, 1046846443, 632285588]; // Fetch all, report successes and failures const results = await Promise.allSettled( appIds.map(id => store.app({ id })) ); results.forEach((result, i) => { if (result.status === 'fulfilled') { console.log(`✓ ${result.value.title}`); } else { console.log(`✗ ${result.reason.message}`); } }); ``` -------------------------------- ### Import and Use Default Constants Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/configuration.md Demonstrates importing the library and accessing various default constants for collections, categories, sort orders, devices, and markets. These constants are useful for configuring scraper options. ```javascript const store = require('app-store-scraper'); // Collections store.collection.TOP_FREE_IOS store.collection.TOP_PAID_IOS store.collection.TOP_GROSSING_IOS // ... more collections // Categories store.category.GAMES store.category.GAMES_ACTION store.category.ENTERTAINMENT // ... more categories // Sort orders store.sort.RECENT store.sort.HELPFUL // Devices store.device.IPAD store.device.MAC store.device.ALL // Markets (country code -> store ID mapping) store.markets.US store.markets.GB store.markets.JP // ... more countries ``` -------------------------------- ### Default Memoization Usage Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/configuration.md Demonstrates how to use the memoized store with default settings for caching. Subsequent calls with the same arguments will retrieve results from the cache. ```javascript const store = require('app-store-scraper'); // Default memoization (5 minute TTL, max 1000 items per method) const memoized = store.memoized(); memoized.app({id: 553834731}) .then(() => { // Second call uses cached result return memoized.app({id: 553834731}); }); ``` -------------------------------- ### Get ratings Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/START-HERE.txt Retrieves the ratings for a specific app. ```APIDOC ## Get ratings ### Description Retrieves the ratings for a specific app. ### Method Not applicable (SDK method) ### Endpoint Not applicable (SDK method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **id** (number) - Required - The ID of the app. ``` -------------------------------- ### Get Developer Apps Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/README.md Retrieve all apps by a specific developer. ```APIDOC ## GET /developer ### Description Retrieve all apps by a specific developer. ### Method GET ### Endpoint /developer ### Parameters #### Query Parameters - **developer_id** (string) - Required - The developer's unique identifier. ``` -------------------------------- ### list() Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/INDEX.md Retrieve curated application collections from the App Store. ```APIDOC ## list() ### Description Get a list of curated application collections (e.g., 'Top Free Apps', 'New Paid Apps') from the App Store. ### Method `list(options)` ### Parameters #### Query Parameters - **options** (object) - Optional - Options for listing collections. - **country** (string) - Optional - The country code (e.g., 'us', 'gb'). - **lang** (string) - Optional - The language code (e.g., 'en', 'es'). - **collection** (string) - Optional - The type of collection to retrieve (e.g., 'topfreeapplications', 'newapplications'). - **num** (number) - Optional - The number of results to return (default: 20). - **page** (number) - Optional - The page number for pagination (default: 1). - **cacheTTL** (number) - Optional - Time-to-live for cache in milliseconds. ### Returns `Promise` - A promise that resolves with an array of application summary objects from the specified collection. ``` -------------------------------- ### Get version history Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/START-HERE.txt Retrieves the version history for a specific app. ```APIDOC ## Get version history ### Description Retrieves the version history for a specific app. ### Method Not applicable (SDK method) ### Endpoint Not applicable (SDK method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **id** (number) - Required - The ID of the app. ``` -------------------------------- ### similar(opts) Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/QUICK-REFERENCE.md Retrieves a list of apps similar to a given app. ```APIDOC ## similar(opts) ### Description Retrieves a list of apps similar to a given app. ### Method `similar(opts)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **opts** (object) - Required - Options object. - **id** (number) - Optional - The app's Apple ID. - **appId** (string) - Optional - The app's bundle ID (e.g., 'com.example.app'). - **country** (string) - Optional - The two-letter country code (e.g., 'us', 'gb'). Defaults to 'us'. ### Request Example ```javascript store.similar({ id: 553834731 }) store.similar({ appId: 'com.example.app' }) ``` ### Response #### Success Response (200) - **AppDetail[]** (array) - An array of app detail objects for similar apps. ``` -------------------------------- ### Get privacy info Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/START-HERE.txt Retrieves privacy information for a specific app. ```APIDOC ## Get privacy info ### Description Retrieves privacy information for a specific app. ### Method Not applicable (SDK method) ### Endpoint Not applicable (SDK method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **id** (number) - Required - The ID of the app. ``` -------------------------------- ### similar() Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/MANIFEST.md Finds apps similar to a given app. ```APIDOC ## similar() ### Description Finds and returns a list of applications that are similar to a specified app. ### Method Not applicable (function call) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters - **appId** (string) - Required - The unique identifier of the app for which to find similar apps. - **options** (object) - Optional - Configuration options for finding similar apps. - **country** (string) - Optional - The country code for the app store. - **lang** (string) - Optional - The language for the app store. - **limit** (number) - Optional - The maximum number of similar apps to return. ### Request Example ```javascript similar("123456789", { limit: 5 }) ``` ### Response #### Success Response - **Array** - A list of similar apps. #### Response Example ```json [ { "appId": "666666666", "title": "Similar App X", "developer": "Studio Y", "url": "https://example.com/app/666666666" } ] ``` ``` -------------------------------- ### Get suggestions Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/START-HERE.txt Provides app suggestions based on a search term. ```APIDOC ## Get suggestions ### Description Provides app suggestions based on a search term. ### Method Not applicable (SDK method) ### Endpoint Not applicable (SDK method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **term** (string) - Required - The search term for which to get suggestions. ``` -------------------------------- ### Project File Structure Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/MANIFEST.md This snippet shows the directory structure of the app-store-scraper project, indicating the purpose of each file and directory. ```bash output/ ├── README.md ← Start here ├── INDEX.md ← Main reference ├── types.md ← Type definitions ├── configuration.md ← Options & config ├── errors.md ← Error catalog ├── MANIFEST.md ← This file └── api-reference/ ├── app.md ├── search.md ├── list.md ├── reviews.md ├── ratings.md ├── suggest.md ├── similar.md ├── developer.md ├── privacy.md └── version-history.md ``` -------------------------------- ### Get App Ratings Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/START-HERE.txt Fetch the ratings for a given app ID. ```javascript store.ratings({ id: 553834731 }) ``` -------------------------------- ### App Detail Object Structure Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/api-reference/similar.md Represents the detailed information returned for each app in the 'Customers Also Bought' list. This includes metadata like title, description, icon, pricing, and developer information. ```javascript [ { id: number, appId: string, title: string, url: string, description: string, icon: string, genres: string[], genreIds: string[], primaryGenre: string, primaryGenreId: number, contentRating: string, languages: string[], size: string, requiredOsVersion: string, released: string, updated: string, releaseNotes: string, version: string, price: number, currency: string, free: boolean, developerId: number, developer: string, developerUrl: string, developerWebsite: string, score: number, reviews: number, currentVersionScore: number, currentVersionReviews: number, screenshots: string[], ipadScreenshots: string[], appletvScreenshots: string[], supportedDevices: string[] }, // ... more similar apps ] ``` -------------------------------- ### Get developer portfolio Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/START-HERE.txt Fetches the portfolio of apps developed by a specific developer. ```APIDOC ## Get developer portfolio ### Description Fetches the portfolio of apps developed by a specific developer. ### Method Not applicable (SDK method) ### Endpoint Not applicable (SDK method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **devId** (number) - Required - The ID of the developer. ``` -------------------------------- ### reviews() Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/MANIFEST.md Fetches reviews for a given app. Supports filtering by country and language. ```APIDOC ## reviews() ### Description Retrieves user reviews for a specific application. ### Method Not applicable (function call) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters - **appId** (string) - Required - The unique identifier of the app. - **options** (object) - Optional - Configuration options for fetching reviews. - **country** (string) - Optional - The country code for the app store. - **lang** (string) - Optional - The language for the app store. - **sort** (string) - Optional - The sorting order for reviews (e.g., 'recent', 'helpful'). - **page** (number) - Optional - The page number for paginated results. ### Request Example ```javascript reviews("123456789", { sort: "helpful" }) ``` ### Response #### Success Response - **Array** - A list of reviews for the app. #### Response Example ```json [ { "id": "review123", "userName": "User A", "rating": 5, "title": "Great App!", "content": "This app is amazing and very useful.", "date": "2023-10-27T10:00:00Z" } ] ``` ``` -------------------------------- ### Get Search Suggestions Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/START-HERE.txt Obtain search suggestions based on a given term. ```javascript store.suggest({ term: 'panda' }) ``` -------------------------------- ### reviews(opts) Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/QUICK-REFERENCE.md Fetches reviews for a specific app, with options for pagination and sorting. ```APIDOC ## reviews(opts) ### Description Fetches reviews for a specific app, with options for pagination and sorting. ### Method `reviews(opts)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **opts** (object) - Required - Options object. - **id** (number) - Optional - The app's Apple ID. - **appId** (string) - Optional - The app's bundle ID (e.g., 'com.example.app'). - **page** (number) - Optional - The page number of reviews. Defaults to 1. - **sort** (string) - Optional - The sorting order (e.g., `store.sort.HELPFUL`). Defaults to `store.sort.RECENT`. - **country** (string) - Optional - The two-letter country code (e.g., 'us', 'gb'). Defaults to 'us'. ### Request Example ```javascript store.reviews({ id: 553834731 }) store.reviews({ id: 553834731, page: 2, sort: store.sort.HELPFUL }) store.reviews({ appId: 'com.example.app', country: 'us' }) ``` ### Response #### Success Response (200) - **Review[]** (array) - An array of review objects. ``` -------------------------------- ### Handle App Not Found Errors Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/api-reference/app.md Demonstrates how to catch and handle errors, specifically the 'App not found (404)' error, when an app ID does not correspond to an existing application. ```javascript const store = require('app-store-scraper'); store.app({ id: 9999999999 }) .catch(error => { if (error.message.includes('404')) { console.log('App not found'); } else { console.log('Network error:', error); } }); ``` -------------------------------- ### Async/Await Try-Catch for Safe App Retrieval Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/errors.md Use a try-catch block with async/await to gracefully handle potential errors when fetching app data. This pattern allows for specific error checks, such as '404 Not Found' or missing parameters, before returning null. ```javascript async function getAppSafe(appId) { try { const app = await store.app({ id: appId }); return app; } catch (error) { if (error.message.includes('404')) { console.log('App not found'); } else if (error.message.includes('required')) { console.log('Missing required parameter'); } else { console.log('Unexpected error:', error); } return null; } } ``` -------------------------------- ### Get App Version History Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/START-HERE.txt Fetch the version history for a given app ID. ```javascript store.versionHistory({ id: 324684580 }) ``` -------------------------------- ### Get App Privacy Info Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/START-HERE.txt Retrieve privacy information for a specific app ID. ```javascript store.privacy({ id: 324684580 }) ``` -------------------------------- ### list() Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/MANIFEST.md Lists apps from a specific collection and category. Useful for browsing curated lists. ```APIDOC ## list() ### Description Lists apps belonging to a specific collection and category within the app store. ### Method Not applicable (function call) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters - **collection** (string) - Required - The type of collection to list (e.g., 'topGrossing', 'newApplications'). - **category** (string) - Required - The category of apps to list. - **options** (object) - Optional - Configuration options for the list. - **country** (string) - Optional - The country code for the app store. - **lang** (string) - Optional - The language for the app store. - **device** (string) - Optional - The device type (e.g., 'iphone', 'ipad'). - **page** (number) - Optional - The page number for paginated results. ### Request Example ```javascript list("topGrossing", "games", { country: "us" }) ``` ### Response #### Success Response - **Array** - A list of app summaries within the specified collection and category. #### Response Example ```json [ { "appId": "112233445", "title": "Top Game A", "developer": "Studio X", "url": "https://example.com/app/112233445" } ] ``` ``` -------------------------------- ### Get Developer Portfolio Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/START-HERE.txt Retrieve the portfolio of apps developed by a specific developer ID. ```javascript store.developer({ devId: 284882218 }) ``` -------------------------------- ### similar() Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/START-HERE.txt Finds apps that are similar to a given app. Helps in discovering related applications. ```APIDOC ## similar() ### Description Find related apps. ### Method Not applicable (SDK function) ### Endpoint Not applicable (SDK function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```javascript const store = require('app-store-scraper'); store.similar({ "appId": "123456789" }).then(function(data) { console.log(data); }).catch(function(error) { console.error(error); }); ``` ### Response #### Success Response (200) Returns a list of similar apps. #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### Get App Reviews Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/START-HERE.txt Retrieve reviews for a specific app, paginated by page number. ```javascript store.reviews({ id: 553834731, page: 1 }) ``` -------------------------------- ### Get App Privacy Practices Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/README.md Retrieve app privacy practices and data policies. ```APIDOC ## GET /privacy ### Description Retrieve app privacy practices and data policies. ### Method GET ### Endpoint /privacy ### Parameters #### Query Parameters - **id** (string) - Required - The app's unique identifier. ``` -------------------------------- ### Getting Search Suggestions Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/QUICK-REFERENCE.md Retrieve suggested search terms based on a given input term. ```javascript store.suggest({ term: 'panda' }) // Returns array of suggested search terms ``` -------------------------------- ### suggest(opts: SuggestOptions) Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/api-reference/suggest.md Returns search term suggestions to help complete a search query. Given a partial term, returns up to 50 suggestions along with popularity indices for each term. ```APIDOC ## suggest(opts: SuggestOptions) ### Description Returns search term suggestions to help complete a search query. Given a partial term, returns up to 50 suggestions along with popularity indices for each term. ### Method POST ### Endpoint https://search.itunes.apple.com/WebObjects/MZSearchHints.woa/wa/hints ### Parameters #### Query Parameters - **term** (string) - Required - The search term prefix to get suggestions for. - **country** (string) - Optional - Two-letter country code for app store region. Defaults to "us". #### Request Body This function does not use a request body. Additional options for the HTTP request can be passed via `opts.requestOptions`. ### Request Example ```javascript const store = require('app-store-scraper'); store.suggest({ term: 'panda', country: 'us' }) .then(suggestions => { console.log(suggestions); }) .catch(error => { console.error(error); }); ``` ### Response #### Success Response Returns `Promise` - an array of suggestion objects. ```javascript [ { term: string // Suggested search term }, // ... more suggestions (up to 50) ] ``` #### Response Example ```json [ { "term": "panda" }, { "term": "panda express" }, { "term": "panda pop" } ] ``` ### Throws - **Error**: `term` option is missing or undefined. ``` -------------------------------- ### Fetching App Ratings and Histogram Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/QUICK-REFERENCE.md Get the overall ratings and a breakdown of ratings by star count for a specific app. ```javascript store.ratings({ id: 553834731 }) // Returns: { ratings: number, histogram: {'1': n, '2': n, '3': n, '4': n, '5': n} } ``` -------------------------------- ### list(opts: ListOptions): Promise Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/api-reference/list.md Retrieves a curated list of applications from iTunes App Store collections. Supports filtering by category, country, language, and number of results. Can optionally fetch full app details. ```APIDOC ## list(opts: ListOptions): Promise ### Description Retrieves a curated list of applications from iTunes App Store collections (e.g., top free apps, top paid apps, new releases). Supports filtering by category and can optionally fetch full app details. ### Method GET (Implicit) ### Endpoint (Not explicitly defined, assumed to be an SDK method call) ### Parameters #### Query Parameters - **opts.collection** (string) - Optional - Default: "topfreeapplications" (TOP_FREE_IOS) - Collection ID to retrieve. Valid values from [constants.collection](#collections) - **opts.category** (number) - Optional - Description: Category/genre ID for filtering. Must be a valid value from [constants.category](#categories) - **opts.country** (string) - Optional - Default: "us" - Two-letter country code for app store region - **opts.lang** (string) - Optional - Description: Language code for result text. Defaults to country-specific language - **opts.num** (number) - Optional - Default: 50 - Number of apps to retrieve. Maximum 200 - **opts.fullDetail** (boolean) - Optional - Default: false - When true, makes additional requests to fetch complete app details like those returned by `app()` - **opts.requestOptions** (object) - Optional - Description: Additional options passed to the HTTP request ### Response #### Success Response Returns `Promise` - array of app objects: ```json [ { "id": "string", "appId": "string", "title": "string", "icon": "string", "url": "string", "price": "number", "currency": "string", "free": "boolean", "description": "string", "developer": "string", "developerUrl": "string", "developerId": "string", "genre": "string", "genreId": "string", "released": "string" } ] ``` #### Response Example (Example response not provided in source) ``` -------------------------------- ### Get App Reviews Source: https://github.com/facundoolano/app-store-scraper/blob/master/README.md Retrieves a page of reviews for an app, with options for country, page number, and sort order (recent or helpful). ```javascript var store = require('app-store-scraper'); store.reviews({ appId: 'com.midasplayer.apps.candycrushsaga', sort: store.sort.HELPFUL, page: 2 }) .then(console.log) .catch(console.log); ``` -------------------------------- ### Get App Privacy Details Source: https://github.com/facundoolano/app-store-scraper/blob/master/README.md Retrieves privacy information for a given app ID. Currently supports the US App Store. ```javascript var store = require('app-store-scraper'); store.privacy({ id: 324684580, }) .then(console.log) .catch(console.log); ``` -------------------------------- ### Fetching Similar Apps Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/QUICK-REFERENCE.md Find apps that are similar to a given app, using either its ID or App ID. ```javascript store.similar({ id: 553834731 }) store.similar({ appId: 'com.example.app' }) ``` -------------------------------- ### app() Source: https://github.com/facundoolano/app-store-scraper/blob/master/_autodocs/MANIFEST.md Retrieves detailed information about a specific app. Requires either an app ID or an app ID. ```APIDOC ## app() ### Description Retrieves detailed information about a specific app using its unique identifier. ### Method Not applicable (function call) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters - **id** (string) - Required - The unique identifier of the app. - **appId** (string) - Required - An alternative identifier for the app. - **options** (object) - Optional - Configuration options for the function. - **country** (string) - Optional - The country code for the app store. - **lang** (string) - Optional - The language for the app store. ### Request Example ```javascript app("123456789") ``` ### Response #### Success Response - **AppDetail** (object) - Detailed information about the app. #### Response Example ```json { "appId": "123456789", "title": "Example App", "developer": "Example Developer", "url": "https://example.com/app/123456789" } ``` ```