When using custom filters from Sensor Tower web interface URLs with DAU sorting, the API was returning apps in incorrect order. NYT Games (5.6M DAU) was appearing at position #26 instead of #1.
/v1/{os}/sales_report_estimates_comparison_attributes endpointmeasure=DAU in the web URLuai=5a39e9681454d22f5a5e75ca (Word Puzzle filter)The package routed based on measure type:
- measure = "revenue" or "units" → sales_report_estimates_comparison_attributes endpoint
- measure = "DAU", "WAU", "MAU" → top_and_trending/active_users endpoint
entities.users_absolute (point-in-time DAU, e.g., 4.3M for NYT)dau_30d_us (30-day average DAU, e.g., 5.6M for NYT)entities.users_absolute gives wrong orderForce all measures to use the sales_report_estimates_comparison_attributes endpoint:
# In st_top_charts.R
is_active_users <- FALSE # Don't use active_users endpoint
is_sales <- TRUE # Always use sales_report_estimates_comparison_attributes
measure = "revenue" or "units" (not "DAU")measure = "revenue" even when wanting DAU datadau_30d_usmeasure = "revenue" to get DAU data feels like a hackThe active_users endpoint might be correct but:
1. We're missing a sort parameter (tried sort_by but didn't work)
2. The endpoint expects different parameters we haven't discovered
3. The web interface might be doing client-side sorting
4. There might be a third endpoint we haven't found
/sales_report_estimates_comparison_attributes in network tabdau_30d_usmeasure = "DAU" with sales endpointmeasure = "DAU" with sales endpoint - if it starts working, they fixed it# Test if sales endpoint accepts DAU directly (currently fails with 422)
test1 <- tryCatch(
st_top_charts(
os = "unified",
measure = "DAU", # Currently causes 422 error
custom_fields_filter_id = "5a39e9681454d22f5a5e75ca",
category = 7019,
regions = "US"
),
error = function(e) e
)
# Test if active_users endpoint sorts correctly (currently wrong order)
# Would need to temporarily revert the package changes to test
Keep current solution but monitor for: 1. API documentation updates 2. Changes in web interface behavior 3. User reports of issues
If Sensor Tower fixes their API to accept measure = "DAU" on the sales endpoint, we should update to use that directly rather than the current workaround.
/Users/phillip/Documents/vibe_coding_projects/SensorTowerR/R/st_top_charts.R - Main function/Users/phillip/Documents/vibe_coding_projects/SensorTowerR/R/utils.R - Parameter preparation/Users/phillip/Documents/vibe_coding_projects/blog_post_source/2025_08_20_puzzle/puzzle_kpi_table.R - Working exampleAny 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.