From the provided URL:
https://app.sensortower.com/market-analysis/top-apps?os=unified&edit=1&granularity=weekly&start_date=2025-06-29&end_date=2025-07-28&duration=P30D&measure=DAU&comparison_attribute=absolute&country=US&country=AU...&category=0&device=iphone&device=ipad&device=android&metric=downloads&page=1&page_size=25&custom_fields_filter_mode=include_unified_apps&period=day
| Web Parameter | API Parameter | Notes |
|--------------|---------------|-------|
| os=unified | os | Direct mapping |
| measure=DAU | measure | Direct mapping (DAU, WAU, MAU, revenue, units) |
| comparison_attribute=absolute | comparison_attribute | Direct mapping |
| start_date=2025-06-29 | date or start_date | Depends on endpoint |
| end_date=2025-07-28 | end_date | Optional in API |
| category=0 | category | 0 means "All Categories" |
| page_size=25 | limit | API uses limit instead |
| page=1 | offset | API uses offset (calculate as (page-1)*limit) |
country=XX parameters (appears to be ~100 countries)regions parameter accepts comma-separated string or array| Web Parameter | Purpose | API Equivalent |
|--------------|---------|----------------|
| granularity=weekly | Data aggregation level | time_range in API |
| duration=P30D | ISO 8601 duration (30 days) | Calculated from start/end dates |
| period=day | Unknown - conflicts with granularity? | Possibly ignored |
device=iphone&device=ipad&device=androiddevice_type with values: "iphone", "ipad", "total", or none for Androidos=unified without device restrictionscustom_fields_filter_mode=include_unified_appscustom_tags_mode with same valuesedit=1 - UI state parameter (editing mode)metric=downloads - Seems redundant with measure=DAUduration=P30D - API calculates from date range# Convert extensive country list to regions parameter
st_parse_countries <- function(countries) {
# If more than 50 countries, suggest using "WW"
if (length(countries) > 50) {
message("Large country list detected. Consider using 'WW' for worldwide.")
return("WW")
}
# Otherwise return comma-separated
paste(countries, collapse = ",")
}
# In st_top_charts and other functions
if (!is.null(category) && category == "0") {
category <- NULL # Let API return all categories
message("Category '0' (All Categories) converted to NULL")
}
The custom_fields_filter_mode is already supported as custom_tags_mode in the API, but we should document the mapping:
# Web parameter name -> API parameter name
web_to_api_params <- list(
custom_fields_filter_mode = "custom_tags_mode",
page_size = "limit",
country = "regions"
)
#' Parse Sensor Tower Web URL into API Parameters
#'
#' @param url Character string. Sensor Tower web interface URL
#' @return List of API-compatible parameters
#' @export
st_parse_web_url <- function(url) {
parsed <- httr::parse_url(url)
query <- parsed$query
# Initialize API parameters
api_params <- list()
# Direct mappings
if (!is.null(query$os)) api_params$os <- query$os
if (!is.null(query$measure)) api_params$measure <- query$measure
if (!is.null(query$comparison_attribute)) {
api_params$comparison_attribute <- query$comparison_attribute
}
if (!is.null(query$start_date)) api_params$date <- query$start_date
if (!is.null(query$end_date)) api_params$end_date <- query$end_date
if (!is.null(query$granularity)) {
api_params$time_range <- switch(
query$granularity,
"daily" = "day",
"weekly" = "week",
"monthly" = "month",
"quarterly" = "quarter",
query$granularity
)
}
# Category (handle "0" as all categories)
if (!is.null(query$category)) {
if (query$category != "0") {
api_params$category <- query$category
}
}
# Countries (handle multiple values)
countries <- query[names(query) == "country"]
if (length(countries) > 0) {
api_params$regions <- if (length(countries) > 50) "WW" else paste(countries, collapse = ",")
}
# Page/limit
if (!is.null(query$page_size)) api_params$limit <- as.integer(query$page_size)
if (!is.null(query$page)) {
page <- as.integer(query$page)
limit <- as.integer(query$page_size %||% 25)
api_params$offset <- (page - 1) * limit
}
# Custom fields filter mode -> custom tags mode
if (!is.null(query$custom_fields_filter_mode)) {
api_params$custom_tags_mode <- query$custom_fields_filter_mode
}
# Extract custom filter ID if present
if (!is.null(query$custom_fields_filter_id)) {
api_params$custom_fields_filter_id <- query$custom_fields_filter_id
}
api_params
}
# Parse the provided URL
url <- "https://app.sensortower.com/market-analysis/top-apps?os=unified&..."
params <- st_parse_web_url(url)
# Use in API call
do.call(st_top_charts, params)
st_parse_web_url() to help users transition from web to APIAny scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.