MyNixOS website logo
Description

Interface to 'Sensor Tower' Mobile App Intelligence API.

Interface to the 'Sensor Tower' API <https://app.sensortower.com/api/docs/app_analysis> for mobile app analytics and market intelligence. Provides a small, consistent set of functions to retrieve app metadata, publisher information, download and revenue estimates, active user metrics, category rankings, aggregate game market denominators, and market trends. Four core verbs ('st_metrics', 'st_rankings', 'st_app'/'st_apps', 'st_filter') cover the common workflows with standardized parameters and tidyverse-friendly output. Supports both iOS and Android app ecosystems with unified data structures for cross-platform analysis.

sensortowerR

sensortowerR is a tidyverse-first R client for Sensor Tower's mobile app intelligence API. Four core verbs — st_metrics(), st_rankings(), st_app() / st_apps(), st_filter() — cover the vast majority of workflows with consistent parameters and long-format tibble output.

Upgrading from 0.9.x? See vignette("migrating-to-1.0"). Revenue is now in dollars by default (was cents). Most 0.9.x functions are .Defunct() stubs that will tell you exactly what to replace them with.

Installation

# From GitHub
remotes::install_github("econosopher/sensortowerR")

# From CRAN (once 1.0.0 is released)
install.packages("sensortowerR")

Authentication

Store your Sensor Tower API token as an environment variable:

usethis::edit_r_environ()
# SENSORTOWER_AUTH_TOKEN="YOUR_SECRET_TOKEN_HERE"

Restart your R session after updating .Renviron.

The four core verbs

st_metrics() — revenue and downloads

library(sensortowerR)
library(dplyr)

# Single app, unified across iOS + Android
royal_match <- st_apps("Royal Match") |> slice(1) |> pull(app_id)

sales <- st_metrics(
  app_id      = royal_match,
  metrics     = c("revenue", "downloads"),
  countries   = c("US", "JP", "GB"),
  date_from   = "2025-01-01",
  date_to     = "2025-12-31",
  granularity = "monthly"
)

# Returns long format by default: app_id, os, country, date, metric, value
# Revenue is in dollars. Pass `revenue_unit = "cents"` for raw integer cents.

st_rankings() — top charts, publishers, categories

top_ios_games <- st_rankings(
  entity   = "app",
  os       = "ios",
  category = 6014,
  country  = "US",
  limit    = 50
)

top_publishers <- st_rankings(
  entity  = "publisher",
  os      = "unified",
  country = "US"
)

st_app() and st_apps() — lookup vs. search

# Direct ID lookup
st_app(app_id = "55c5022f02ac64f9c0001f9f")

# Discovery by name
st_apps(query = "candy crush", os = "ios", limit = 10)

# Discovery by filter
rpg_filter <- st_filter(genre = "rpg", monetization = "in_app_purchases")
rpg_apps   <- st_apps(filter = rpg_filter, limit = 50)

st_filter() — the builder

st_filter() returns an st_filter S3 object that st_apps(), st_rankings(), and st_get_filtered_apps() all accept. Compose filters with c().

us_rpgs_2025 <- st_filter(
  date_from    = "2025-01-01",
  date_to      = "2025-12-31",
  genre        = "rpg",
  monetization = "free"
)

print(us_rpgs_2025)  # Human-readable summary
as.character(us_rpgs_2025)  # Server-side filter ID

# Combine two filters
combined <- c(us_rpgs_2025, st_filter(sdk = "unity"))

st_market_metrics() — tidy aggregate game market totals

Use st_market_metrics() when the analysis needs market/category denominator series in a tidy schema. It wraps Sensor Tower's aggregate /v1/{os}/games_breakdown endpoint through st_game_summary() and returns stable snake_case columns.

casino_market <- st_market_metrics(
  category    = c("7006", "game_casino"),
  countries   = "WW",
  os          = "unified",
  date_from   = "2025-01-01",
  date_to     = "2025-12-31",
  granularity = "monthly",
  shape       = "wide"
)

st_game_summary() — low-level aggregate game market totals

Use st_game_summary() when the analysis needs market/category/genre denominator series rather than title-level cohorts. It calls Sensor Tower's aggregate /v1/{os}/games_breakdown endpoint for os = "ios" or os = "android"; os = "unified" fetches the iOS and Android aggregate rows and sums them by date/country.

market <- st_game_summary(
  categories        = 7001,
  countries         = c("US", "JP", "GB"),
  os                = "unified",
  date_granularity  = "monthly",
  start_date        = "2025-01-01",
  end_date          = "2025-12-31"
)

# Enriched revenue columns are in dollars. Raw endpoint revenue is cents.

Do not build denominator time series by batching top-N rankings, top charts, custom-filter pagination, or 1,500-app rosters. Those are title cohorts, not market totals, and they will drift with roster selection and chart cutoffs. Use st_rankings() and st_apps(filter = ...) for discovery, leaderboards, and peer cohorts; use st_market_metrics() for category-backed denominators.

Function index

Core (4 unified verbs)

FunctionPurpose
st_metrics()Revenue / downloads across one or many apps, countries, dates
st_rankings()Top charts / publishers / categories
st_app() / st_apps()ID lookup / name search / filter-based discovery
st_filter()Build a reusable filter object
st_market_metrics()Aggregate game category market revenue/download denominators

Analytics

FunctionPurpose
st_active_users()DAU / WAU / MAU time series
st_retention()D1–D90 retention curves
st_retention_facets()Demographic retention breakdowns
st_ratings_facets()Ratings by demographic facets
st_reviews_by_rating_facets()Review counts per star rating
st_session_metrics()Session counts, duration, time spent
st_demographics()Age / gender breakdowns
st_app_enriched()Multi-metric enrichment for known apps
st_yoy_metrics()Year-over-year comparison helper
st_game_summary()Low-level game category / market summary from games_breakdown

Publishers

FunctionPurpose
st_publisher_apps()All apps owned by a publisher
st_publisher_portfolio()End-to-end publisher portfolio analysis

Low-level / power-user

FunctionPurpose
st_facets_metrics()Direct /facets/metrics access
st_get_filtered_apps()Raw filter-ID app listing
st_test_filter(), st_analyze_filter()Validate and inspect filters
st_discover_fields(), st_custom_fields_values()Introspect available filter fields
st_api_diagnostics()Debug API request issues
st_get_unified_mapping(), st_batch_app_lookup()Platform ID ↔ unified-ID resolution
st_categories()Full category list

Utilities

FunctionPurpose
st_gt_dashboard()Formatted gt table output
st_cache_info(), st_clear_id_cache(), st_clear_app_cache()Cache management
st_build_web_url(), st_parse_web_url()App-ID ↔ web URL
format_currency(), format_downloads(), format_percent(), format_retention(), format_market_share(), format_arpu(), format_users(), format_large_number()Human-readable number formatters
calculate_yoy_growth(), lookup_category_names()Analysis helpers
example_sensortower_data()Sample data for examples (no API call)

Data notes

Data TypeFunctionTime SeriesCoverage
Revenue / downloadsst_metrics()YesCountry-level
DAU / WAU / MAUst_active_users()YesCountry-level
Retentionst_retention(), st_retention_facets()SnapshotUS / WW primarily
Ratings / reviewsst_ratings_facets(), st_reviews_by_rating_facets()SnapshotWW
Rankingsst_rankings()Point-in-timeCountry-level

Parameter conventions (v1.0.0)

Every function uses the same parameter names:

ParameterMeaning
app_idScalar or vector of app IDs (unified, iOS, or Android — auto-resolved)
os"ios", "android", or "unified"
country / countriesISO-2 code (scalar) or vector of codes
date_from, date_toDates or ISO strings
granularity"daily", "weekly", "monthly", "quarterly"
metricsCharacter vector of metric names
auth_tokenOptional override of the env-var token
limitRow cap

Learn more

  • Vignette: vignette("migrating-to-1.0", package = "sensortowerR")
  • Vignette: vignette("tidy-active-users", package = "sensortowerR")
  • Vignette: vignette("custom-fields", package = "sensortowerR")
  • Changelog: NEWS.md

License

MIT (LICENSE file).

Metadata

Version

1.0.1

License

Unknown

Platforms (80)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arc-linux
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • sh4-linux
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows