aso

repository·master·Indexed 21 days ago

https://github.com/facundoolano/aso

A Node.js library for App Store Optimization (ASO) on iTunes and Google Play. It provides tools for keyword analysis, visibility scoring, and keyword suggestion generation. Key features include calculating keyword difficulty and traffic scores, estimating app discoverability via the visibility() function, and extracting keywords from app titles and descriptions. The library utilizes google-play-scraper and app-store-scraper for data gathering.

Tokens
5.8K
Snippets
16
Records
21
Agent score
75%

What's inside aso

  1. Overview of App Store Optimization (aso)

    master

    The aso library is a Node.js tool designed to assist with App Store Optimization for both iTunes and Google Play. It provides functions to calculate keyword scores, generate keyword suggestions, and assess app visibility.

    Important Note on Throttling: The library relies on google-play-scraper and app-store-scraper to gather data. Because many requests are performed under the hood, you may encounter throttling limits if you make too many calls in a short period of time.

  2. Initialize an ASO client for iTunes or Google Play

    master

    To use the aso module, call the main function with a store identifier as the first argument. You can specify either 'itunes' or 'gplay'. You can also pass an optional configuration object as the second argument to override scraper behaviors (e.g., setting a different country).

    const gplay = require('aso')('gplay');
    const itunes = require('aso')('itunes');
    
    // Example with custom country configuration
    const itunesRussia = require('aso')('itunes', { country: 'ru' });
  3. Understand the structure of the visibility score report

    master

    The visibility score report returned by the visibility engine is composed of three main parts:

    1. Aggregate Score

    • score: A single numeric value representing the total visibility, calculated as the sum of all keyword scores plus the global and category collection scores.

    2. Keyword Scores (keywords)

    An object where keys are keywords and values are objects containing:

    • traffic: The traffic score for that keyword.
    • rank: The app's rank for that keyword (1-indexed).
    • score: The weighted score for that keyword based on rank and traffic.

    3. Collection Scores (collections)

    Contains rankings for the app within specific lists:

    • global: { rank, score } representing the app's position in the global list.
    • category: { rank, score } representing the app's position within its specific category.
  4. Configure store backend options

    master

    When initializing the client, you can pass an options object as the second argument to override the underlying scraper settings (google-play-scraper or app-store-scraper). These options are applied to every method call.

    Commonly used keys include:

    • country: Target a specific country (e.g., 'ru').
    • cache: Enable/disable caching.
    • throttle: Control request frequency.

    Refer to the respective scraper documentation for the full list of supported options.

    const itunesRussia = require('aso')('itunes', { country: 'ru' });
  5. Available ASO client modules

    master

    The object returned by getClient() contains several specialized modules for performing App Store Optimization tasks. These modules are built on top of the selected store implementation:

    • app: Methods for retrieving app-specific metadata and information.
    • scores: Methods for calculating or retrieving keyword scores.
    • suggest: Methods for generating keyword suggestions.
    • visibility: Methods for analyzing app visibility metrics.

    Additionally, the client object includes various constants exported by the library.

  6. Configure keyword suggestion strategies

    master

    The suggest function relies on a strategy option to determine which apps are used to generate keyword suggestions. If no strategy is provided, it defaults to c.CATEGORY.

    Valid strategies are determined by the getStrategies(store) internal mapping. When calling suggest(opts), the opts.strategy value must correspond to a valid handler within the strategies registry, otherwise an Error('invalid suggestion strategy') will be thrown.

  7. Use keyword suggestion strategies

    master

    The aso library provides several strategies to discover apps or keywords based on different starting points. These strategies are generated by calling the build(store) function, where store is your initialized data store.

    Available strategies (mapped via constants in c):

    • SIMILAR: Finds apps that the store considers similar to a specific appId.
    • COMPETITION: Identifies the top 10 keywords for a specific appId, then returns the top 10 apps for each of those keywords (excluding the original app).
    • CATEGORY: Finds the top apps within the same category or collection as the provided appId (excluding the original app).
    • ARBITRARY: Returns specific apps if you provide an explicit array of appIds.
    • KEYWORDS: Returns the top 10 apps for each keyword provided in a seed list.
    • SEARCH: Takes seed keywords, expands them using search suggestions (up to 15 suggestions per seed), extracts keywords from those suggestions, and then returns the top apps for all discovered keywords.
    // Assuming 'store' is an initialized instance of the aso store
    const buildStrategies = require('aso/lib/suggest/strategies');
    const c = require('aso/lib/constants'); // Import constants to access strategy keys
    
    const strategies = buildStrategies(store);
    
    // Example: Using the COMPETITION strategy
    const competitionApps = await strategies[c.COMPETITION]({ appId: '12345' });
    
    // Example: Using the SEARCH strategy
    const searchApps = await strategies[c.SEARCH]({ keywords: ['fitness', 'workout'] });
  8. Performance note: Google Play vs iTunes

    master
    Functions in this module (especially scores) are significantly slower on Google Play than on iTunes. This is because Google Play requires real-time HTML scraping of search results and individual app details, whereas iTunes provides a more direct API. To mitigate this, consider implementing your own memoization or periodic scanning strategy.
  9. Get keyword difficulty and traffic scores with `scores()`

    master

    The scores(keyword) function evaluates a specific keyword to determine how hard it is to rank for (difficulty) and how much traffic it generates (traffic).

    Difficulty measures ranking difficulty based on titleMatches, competitors, installs (or reviews for iTunes), rating, and age. A lower score is better.

    Traffic estimates volume based on suggest (search suggestions), ranked (category rankings), installs, and length. A higher score is better.

    Returns a Promise that resolves to an object containing detailed statistics for both metrics.

    const aso = require('aso')('gplay');
    
    aso.scores('panda').then(console.log);
  10. Estimate app discoverability with `visibility()`

    master

    The visibility(appId) function estimates an app's discoverability within the store. It aggregates how well the app ranks for its target keywords, the traffic score of those keywords, and its global/category rankings.

    Arguments:

    • appId: The Google Play package ID or the iTunes numerical/bundle ID.

    Returns a Promise resolving to an object containing keywords (with traffic, rank, and score), collections (global and category ranks), and an overall score.

    const aso = require('aso')('gplay');
    
    // Google Play
    aso.visibility('com.dxco.pandavszombies').then(console.log);
    
    // iTunes
    aso.visibility(284882215).then(console.log);
  11. Generate keyword suggestions with `suggest()`

    master

    The suggest(options) function returns an array of commonly used keywords based on a specific strategy.

    Options:

    • strategy: The selection method. See below for available strategies.
    • num: Number of suggestions to return (default: 30).
    • appId: Store app ID (required for CATEGORY, SIMILAR, and COMPETITION). Supports numerical or bundle IDs for iTunes.
    • apps: Array of app IDs (required for ARBITRARY).
    • keywords: Array of seed keywords (required for KEYWORDS and SEARCH).

    Strategies:

    • aso.CATEGORY: Looks at apps in the same category as the provided appId.
    • aso.SIMILAR: Looks at apps marked as "similar" (Google Play) or "customers also bought" (iTunes).
    • aso.COMPETITION: Looks at apps targeting the same keywords as the provided appId.
    • aso.ARBITRARY: Uses a provided list of apps.
    • aso.KEYWORDS: Looks at apps targeting the provided keywords.
    • aso.SEARCH: Uses seed keywords to find search completion suggestions, then finds apps targeting those results.
    const aso = require('aso')('gplay');
    
    // Example: Suggestions by category
    aso.suggest({
      strategy: aso.CATEGORY,
      appId: 'com.dxco.pandavszombies',
      num: 5
    }).then(console.log);