Skip to content

App Ranks

Where your app sits in the App Store's top 100, country by country, checked every hour on your Mac, with a notification when its best rank moves. The iPhone sees it too.

by TailApps · Version 1 · Updated 20 hours ago

Price
Free
Works on
Mac · iPhone (as a card)
Permissions
3

What it does

  • Lives where you glance

    Menu bar, TailApps Dock, Dashboard, a floating window, and a card on your iPhone.

  • Stays up to date

    Runs its script ranks.sh on your Mac every 1 hour

  • Asks you to set up

    App Store id (the digits after id in its link), Countries (two-letter codes), Chart

What it may do

TailApps shows this list before installing and asks you once. The card can do nothing else.

  • Run its script ranks.sh

    script:ranks.sh

  • Connect to rss.marketingtools.apple.com

    net:rss.marketingtools.apple.com

  • Show notifications

    notify

Scripts

Everything it runs is here to read before you install.

ranks.sh
#!/bin/sh
# Your app's place in Apple's public top-100 charts, one country at a time, as JSON:
# { "countries": [{ "country": "gb", "rank": 12, "name": "…" }, …], "best": 12, "best_country": "gb", "charted": 3, "name": "…" }
# $1 = the App Store id (the digits after "id" in the app's link), $2 = countries like "us,gb,pl", $3 = top-free or top-paid.
id="$1"
chart="$3"
case "$id" in ''|*[!0-9]*) echo "The app id is the digits after \"id\" in its App Store link, like 1234567890" >&2; exit 1 ;; esac
case "$chart" in top-free|top-paid) ;; *) chart=top-free ;; esac
out=""
fetched=0
for c in $(printf '%s' "$2" | tr ',;' '  '); do
  c=$(printf '%s' "$c" | tr 'A-Z' 'a-z' | tr -cd 'a-z')
  [ ${#c} -eq 2 ] || continue
  if feed=$(curl -fsS --max-time 12 "https://rss.marketingtools.apple.com/api/v2/$c/apps/$chart/100/apps.json" 2>/dev/null); then
    fetched=$((fetched + 1))
  else
    feed='{}'
  fi
  row=$(printf '%s' "$feed" | jq -c --arg id "$id" --arg c "$c" '
    (.feed.results // []) as $r
    | { country: $c,
        rank: ($r | map(.id) | index($id) | if . == null then null else . + 1 end),
        name: ($r | map(select(.id == $id)) | .[0].name) }' 2>/dev/null) || row="{\"country\":\"$c\",\"rank\":null,\"name\":null}"
  out="$out${out:+,}$row"
done
# No chart at all (offline, or Apple's feed is down) is an error, not "out of the top 100" everywhere.
[ "$fetched" -gt 0 ] || { echo "Couldn't reach the App Store charts" >&2; exit 1; }
printf '[%s]' "$out" | jq -c '
  (map(select(.rank != null))) as $in
  | { countries: .,
      best: ($in | map(.rank) | min),
      best_country: (if ($in | length) > 0 then ($in | min_by(.rank) | .country) else null end),
      charted: ($in | length),
      name: ($in | map(.name) | .[0]) }'
Report App Ranks?

Tell us what’s wrong with this card. We read every report.

What’s wrong