Command reference

Every ranksy command, with its flags and the API endpoint that it calls. Your API key needs the permission of that endpoint. The scope listed for each command applies only to keys created before permissions. Add --json to any command to get the raw response, which the linked API reference describes.

Commands that read an app's data need --app <id>, or app in the config file. Paths below use :app for that ID.

Generated from ranksy 0.9.1.

Global options

These options work with every command, before or after the command name.

  • Name
    --json
    Type
    flag
    Description

    Emit raw JSON instead of a table.

  • Name
    --api-key <API_KEY>
    Type
    option
    Description

    API key (overrides RANKSY_API_KEY and config). Environment variable: RANKSY_API_KEY.

  • Name
    --base-url <BASE_URL>
    Type
    option
    Description

    API base URL. Environment variable: RANKSY_BASE_URL.

  • Name
    --app <APP>
    Type
    option
    Description

    Default app id.

  • Name
    --watch <SECS>
    Type
    option
    Description

    Re-run the command every N seconds.

  • Name
    -q, --quiet
    Type
    flag
    Description

    Suppress non-essential output.

ranksy login

Save an API key to the local config.

  • Scope: none
  • Writes the key to the config file. Makes no API call.
ranksy login [OPTIONS] <KEY>
  • Name
    <KEY>
    Type
    argument
    Description

    API key from Settings > API Keys (rk_live_... or rk_test_...). Required.

GET/api/v1/apps

ranksy whoami

Show the apps accessible with this key (the API has no dedicated whoami endpoint).

ranksy whoami [OPTIONS]
GET/api/v1/apps

ranksy apps list

List the apps of the key's team, with their ids.

ranksy apps list [OPTIONS]
GET/api/v1/apps/:app/rankings

ranksy rankings get

Current keyword rankings of the app.

ranksy rankings get [OPTIONS]
  • Name
    --keyword <KEYWORD>
    Type
    option
    Description

    Narrow the snapshot to one keyword (text or slug); same data as rankings by-keyword.

GET/api/v1/apps/:app/rankings/by-keyword/:keyword

ranksy rankings by-keyword

Scraped rank rows for a single keyword.

ranksy rankings by-keyword [OPTIONS] <KEYWORD>
  • Name
    <KEYWORD>
    Type
    argument
    Description

    Keyword text or slug. Required.

  • Name
    --limit <LIMIT>
    Type
    option
    Description

    Rows to return, 1 to 50. Default: 20.

GET/api/v1/apps/:app/keywords

ranksy keywords list

Keywords the app ranks for, with organic and sponsored rank.

ranksy keywords list [OPTIONS]
POST/api/v1/apps/:app/keywords

ranksy keywords track

Start tracking a keyword (needs keywords:write).

ranksy keywords track [OPTIONS] <KEYWORD>
  • Name
    <KEYWORD>
    Type
    argument
    Description

    Keyword text. Required.

DELETE/api/v1/apps/:app/keywords/:keyword

ranksy keywords untrack

Stop tracking a keyword; accepts the keyword text or its slug (needs keywords:write).

  • Scope: keywords:write
  • API reference: not on this site yet. The OpenAPI spec describes it.
  • The keyword is turned into its slug before the call, so "Email Marketing" and email-marketing both work.
ranksy keywords untrack [OPTIONS] <KEYWORD>
  • Name
    <KEYWORD>
    Type
    argument
    Description

    Keyword text or slug. Required.

GET/api/v1/apps/:app/keywords/cannibalization

ranksy keywords cannibalization

Keyword cannibalization report.

ranksy keywords cannibalization [OPTIONS]
  • Name
    --days <DAYS>
    Type
    option
    Description

    Days to look back, 1 to 365. Default: 30.

GET/api/v1/apps/:app/keywords/ad-performance

ranksy keywords ad-performance

Paid keyword ad performance.

ranksy keywords ad-performance [OPTIONS]
  • Name
    --start-date <START_DATE>
    Type
    option
    Description

    First day, YYYY-MM-DD. Default: 30 days ago.

  • Name
    --end-date <END_DATE>
    Type
    option
    Description

    Last day, YYYY-MM-DD. Default: today.

  • Name
    --min-pageviews <MIN_PAGEVIEWS>
    Type
    option
    Description

    Skip keywords with fewer page views. Default: 0.

  • Name
    --sort-by <SORT_BY>
    Type
    option
    Description

    installs, pageviews or conversion_rate. Default: installs.

  • Name
    --limit <LIMIT>
    Type
    option
    Description

    Keywords to return, 1 to 50. Default: 30.

GET/api/v1/apps/:app/keywords/installs-by-source

ranksy keywords installs-by-source

Installs attributed to each keyword.

ranksy keywords installs-by-source [OPTIONS]
  • Name
    --start-date <START_DATE>
    Type
    option
    Description

    First day, YYYY-MM-DD. Default: 30 days ago.

  • Name
    --end-date <END_DATE>
    Type
    option
    Description

    Last day, YYYY-MM-DD. Default: today.

  • Name
    --keyword <KEYWORD>
    Type
    option
    Description

    Only this keyword.

  • Name
    --sort-by <SORT_BY>
    Type
    option
    Description

    total_installs, organic_installs or ad_installs. Default: total_installs.

  • Name
    --limit <LIMIT>
    Type
    option
    Description

    Keywords to return, 1 to 50. Default: 30.

GET/api/v1/apps/:app/keywords/:keyword/trends

Daily organic/sponsored trend for one keyword.

ranksy keywords trends [OPTIONS] <KEYWORD>
  • Name
    <KEYWORD>
    Type
    argument
    Description

    Keyword text, matched exactly. Required.

  • Name
    --days <DAYS>
    Type
    option
    Description

    Days to look back, 1 to 90. Default: 14.

GET/api/v1/apps/:app/reviews

ranksy reviews list

The app's App Store reviews.

ranksy reviews list [OPTIONS]
GET/api/v1/apps/:app/installs

ranksy installs get

Installs attributed by traffic source.

ranksy installs get [OPTIONS]
GET/api/v1/apps/:app/listing

ranksy listing get

Fetch the app's store listing (needs apps:read).

ranksy listing get [OPTIONS]
GET/api/v1/apps/:app/retention/cohorts

ranksy retention-cohorts

Customer retention cohorts.

ranksy retention-cohorts [OPTIONS]
  • Name
    --mode <MODE>
    Type
    option
    Description

    Cohort basis: install or subscription. Default: install.

  • Name
    --group-by <GROUP_BY>
    Type
    option
    Description

    Cohort size: day, week or month. Default: month.

  • Name
    --periods <PERIODS>
    Type
    option
    Description

    Periods per cohort; capped at 60 days, 52 weeks or 36 months. Default: 12.

  • Name
    --include-test
    Type
    flag
    Description

    Include test and development stores.

GET/api/v1/apps/:app/uninstall-reasons

ranksy uninstall-reasons

Uninstall reason breakdown.

ranksy uninstall-reasons [OPTIONS]
  • Name
    --days <DAYS>
    Type
    option
    Description

    Days to look back, 1 to 90. Default: 30.

GET/api/v1/apps/:app/active-trials

ranksy active-trials

Active free trials.

ranksy active-trials [OPTIONS]
  • Name
    --include-test
    Type
    flag
    Description

    Include test and development stores.

GET/api/v1/apps/:app/churned-customers

ranksy churned-customers

Churned customers.

ranksy churned-customers [OPTIONS]
  • Name
    --months <MONTHS>
    Type
    option
    Description

    Months to look back, 1 to 12. Default: 6.

  • Name
    --page <PAGE>
    Type
    option
    Description

    Page number. Default: 1.

  • Name
    --per-page <PER_PAGE>
    Type
    option
    Description

    Rows per page, 1 to 100. Default: 50.

GET/api/v1/apps/:app/store-installs

ranksy store-installs

Store install records.

ranksy store-installs [OPTIONS]
  • Name
    --status <STATUS>
    Type
    option
    Description

    INSTALLED, UNINSTALLED, CLOSED, FROZEN or all. Default: INSTALLED.

  • Name
    --channel <CHANNEL>
    Type
    option
    Description

    Only stores from this first-touch channel.

  • Name
    --installed-after <INSTALLED_AFTER>
    Type
    option
    Description

    Only stores installed on or after this date, YYYY-MM-DD.

  • Name
    --installed-before <INSTALLED_BEFORE>
    Type
    option
    Description

    Only stores installed on or before this date, YYYY-MM-DD.

  • Name
    --include-test
    Type
    flag
    Description

    Include test and development stores.

  • Name
    --page <PAGE>
    Type
    option
    Description

    Page number. Default: 1.

  • Name
    --per-page <PER_PAGE>
    Type
    option
    Description

    Rows per page, 1 to 100. Default: 50.

GET/api/v1/apps/:app/lifecycle-events

ranksy lifecycle-events

Customer lifecycle events.

ranksy lifecycle-events [OPTIONS]
  • Name
    --event-type <EVENT_TYPE>
    Type
    option
    Description

    Only this event type, for example INSTALLED, TRIAL_STARTED, SUBSCRIBED or CHURNED.

  • Name
    --event-date-after <EVENT_DATE_AFTER>
    Type
    option
    Description

    Only events on or after this date, YYYY-MM-DD. Default: 30 days ago.

  • Name
    --event-date-before <EVENT_DATE_BEFORE>
    Type
    option
    Description

    Only events on or before this date, YYYY-MM-DD. Default: today.

  • Name
    --include-test
    Type
    flag
    Description

    Include test and development stores.

  • Name
    --page <PAGE>
    Type
    option
    Description

    Page number. Default: 1.

  • Name
    --per-page <PER_PAGE>
    Type
    option
    Description

    Rows per page, 1 to 100. Default: 50.

GET/api/v1/apps/:app/ltv/customers

ranksy ltv customers

Per-customer lifetime value.

ranksy ltv customers [OPTIONS]
  • Name
    --sort-by <SORT_BY>
    Type
    option
    Description

    ltv, current_mrr or installed_at. Default: ltv.

  • Name
    --page <PAGE>
    Type
    option
    Description

    Page number. Default: 1.

  • Name
    --per-page <PER_PAGE>
    Type
    option
    Description

    Rows per page, 1 to 100. Default: 50.

GET/api/v1/apps/:app/ltv/cohorts

ranksy ltv cohorts

Lifetime value by acquisition cohort.

ranksy ltv cohorts [OPTIONS]
  • Name
    --page <PAGE>
    Type
    option
    Description

    Page number. Default: 1.

  • Name
    --per-page <PER_PAGE>
    Type
    option
    Description

    Rows per page, 1 to 100. Default: 100.

GET/api/v1/apps/:app/traffic/overview

ranksy traffic overview

Traffic overview series.

ranksy traffic overview [OPTIONS]
  • Name
    --start-date <START_DATE>
    Type
    option
    Description

    First day, YYYY-MM-DD. Default: 30 days ago.

  • Name
    --end-date <END_DATE>
    Type
    option
    Description

    Last day, YYYY-MM-DD. Default: today.

  • Name
    --granularity <GRANULARITY>
    Type
    option
    Description

    daily or weekly. Default: weekly for ranges over 14 days, else daily.

GET/api/v1/apps/:app/traffic/attribution

ranksy traffic attribution

Install attribution by model.

ranksy traffic attribution [OPTIONS]
  • Name
    --start-date <START_DATE>
    Type
    option
    Description

    First day, YYYY-MM-DD. Default: 30 days ago.

  • Name
    --end-date <END_DATE>
    Type
    option
    Description

    Last day, YYYY-MM-DD. Default: today.

  • Name
    --model <MODEL>
    Type
    option
    Description

    first_touch, last_touch, linear, time_decay or position_based. Default: last_touch.

GET/api/v1/apps/:app/traffic/funnel

ranksy traffic funnel

Conversion funnel.

ranksy traffic funnel [OPTIONS]
  • Name
    --start-date <START_DATE>
    Type
    option
    Description

    First day, YYYY-MM-DD. Default: 30 days ago.

  • Name
    --end-date <END_DATE>
    Type
    option
    Description

    Last day, YYYY-MM-DD. Default: today.

  • Name
    --include-test
    Type
    flag
    Description

    Include test and development stores.

GET/api/v1/apps/:app/traffic/source-trends

Traffic source trends.

ranksy traffic source-trends [OPTIONS]
  • Name
    --start-date <START_DATE>
    Type
    option
    Description

    First day, YYYY-MM-DD. Default: 30 days ago.

  • Name
    --end-date <END_DATE>
    Type
    option
    Description

    Last day, YYYY-MM-DD. Default: today.

  • Name
    --granularity <GRANULARITY>
    Type
    option
    Description

    weekly or biweekly. Default: weekly.

GET/api/v1/apps

ranksy ads connect

Log in to Shopify Partners and map the Shopify apps of one organization to Ranksy apps (interactive). Run it once per Partners organization; each run adds to the connected ones.

  • Scope: apps:read
  • Guide: Sync App Store Ads
  • It lists your Ranksy apps so you can map each Shopify app to one. Give the same key ads:write too, for ads sync.
ranksy ads connect [OPTIONS]
  • Name
    --chrome <PATH>
    Type
    option
    Description

    Chrome binary (default: google-chrome, google-chrome-stable, chromium, chromium-browser on PATH). Environment variable: CHROME_BIN.

  • Name
    --port <PORT>
    Type
    option
    Description

    Chrome remote-debugging port (default 9333; an existing Chrome on it is reused).

  • Name
    --profile <DIR>
    Type
    option
    Description

    Chrome profile directory that keeps the Partners login (default: <data dir>/partners-chrome).

  • Name
    --org <ORG>
    Type
    option
    Description

    Partners organization id to add (default: detected after login; asked when you have several).

ranksy ads disconnect

Stop syncing a Partners organization and forget its app mappings.

  • Scope: none
  • Edits the config file. Makes no API call.
ranksy ads disconnect [OPTIONS] --org <ORG>
  • Name
    --org <ORG>
    Type
    option
    Description

    Partners organization id to remove.

POST/api/v1/apps/:app/shopify-ads/sync

ranksy ads sync

Pull ads data from Shopify Partners and push it to Ranksy (non-interactive; for cron). Syncs every connected organization, one after the other, unless --org picks one.

  • Scope: ads:write
  • Guide: Sync App Store Ads
  • One call per mapped app for each chunk of days. With --dry-run it makes no API call and needs no key.
ranksy ads sync [OPTIONS]
  • Name
    --chrome <PATH>
    Type
    option
    Description

    Chrome binary (default: google-chrome, google-chrome-stable, chromium, chromium-browser on PATH). Environment variable: CHROME_BIN.

  • Name
    --port <PORT>
    Type
    option
    Description

    Chrome remote-debugging port (default 9333; an existing Chrome on it is reused).

  • Name
    --profile <DIR>
    Type
    option
    Description

    Chrome profile directory that keeps the Partners login (default: <data dir>/partners-chrome).

  • Name
    --org <ORG>
    Type
    option
    Description

    Only sync this connected Partners organization (default: all of them).

  • Name
    --only-app <APP>
    Type
    option
    Description

    Only sync this mapped app, by Ranksy app id, Shopify app id (API key) or Shopify app name (case-insensitive). Repeat it for several apps; combines with --org. The organization's daily campaign list is still pulled; other apps' breakdowns, search terms and keywords are skipped, and nothing is pushed for them (default: all mapped apps).

  • Name
    --from <YYYY-MM-DD>
    Type
    option
    Description

    First day to pull, YYYY-MM-DD (default: --days before --to).

  • Name
    --to <YYYY-MM-DD>
    Type
    option
    Description

    Last day to pull, YYYY-MM-DD (default: yesterday, UTC).

  • Name
    --after <YYYY-MM-DD>
    Type
    option
    Description

    Only days after this date (exclusive), YYYY-MM-DD; alone, pulls up to yesterday.

  • Name
    --before <YYYY-MM-DD>
    Type
    option
    Description

    Only days before this date (exclusive), YYYY-MM-DD.

  • Name
    --days <N>
    Type
    option
    Description

    Number of complete days ending at --to, when --from is not given. Default: 3.

  • Name
    --chunk-days <N>
    Type
    option
    Description

    Days pulled per push to Ranksy (newest first). Default: 7.

  • Name
    --concurrency <N>
    Type
    option
    Description

    Days pulled from Partners in parallel. Default: 1.

  • Name
    --dry-run
    Type
    flag
    Description

    Pull and build the payloads, write them to --out, but don't POST to Ranksy.

  • Name
    --resume
    Type
    flag
    Description

    Reuse days already pulled into --out instead of pulling them again.

  • Name
    --out <DIR>
    Type
    option
    Description

    Directory for the raw day exports and payload files, one subfolder per organization (default: <cache dir>/ads-export).

ranksy update

Update ranksy to the latest release (or --check to only look).

  • Scope: none
  • Downloads the latest release from GitHub. Makes no Ranksy API call.
ranksy update [OPTIONS]
  • Name
    --check
    Type
    flag
    Description

    Report whether a newer version exists without installing it.