Guide
How to Track App Store Keyword Rankings on a Mac
To track App Store keyword rankings on a Mac, run one Search API request per keyword and country from Terminal, find your app's ID in the returned list, append the position to a CSV file, and let launchd repeat it every day. macOS already includes everything the check needs, so you can start with one command and add the schedule later.
Updated
Step 1: Check one keyword in Terminal
Replace 1234567890 with your app's numeric ID (the digits after id in its App Store URL; Streakly is a hypothetical app):
curl -s "https://itunes.apple.com/search?term=habit+tracker&country=us&media=software&entity=software&limit=200" | grep -o -E '"trackId": ?[0-9]+' | grep -n -E '[: ]1234567890$'
If your app is in the results, the output looks like 14:"trackId":1234567890, and the number before the colon is your rank. No output means your app is not in the returned list. The parameters are the ones Apple documents for the Search API: term, country, media, entity and limit.
Step 2: Turn it into a log
Save this as ~/aso/rank-log.sh (create the folder first with mkdir -p ~/aso):
#!/bin/zsh
APP_ID=1234567890
OUT="$HOME/aso/ranks.csv"
[[ -f $OUT ]] || echo "date,country,term,rank" > "$OUT"
check() { # $1 = country, $2 = term with + for spaces
local body n
body=$(curl -sf "https://itunes.apple.com/search?term=$2&country=$1&media=software&entity=software&limit=200") \
&& [[ $body == *'"resultCount"'* ]] \
|| { echo "$(date +%F),$1,${2//+/ },error" >> "$OUT"; return; }
n=$(print -r -- "$body" | grep -o -E '"trackId": ?[0-9]+' | grep -n -E "[: ]$APP_ID\$" | cut -d: -f1)
echo "$(date +%F),$1,${2//+/ },${n:-200+}" >> "$OUT"
}
for country in us gb de; do
for term in habit+tracker streak+counter; do
check $country $term
sleep 4
done
done
Run it with zsh ~/aso/rank-log.sh and open ranks.csv in Numbers. Two details matter. First, a failed request or a response without a result count writes error, not 200+, so a network problem or a rate-limit response never looks like a ranking drop. Second, sleep 4 keeps the script near 15 calls a minute, under the approximately 20 calls per minute Apple states for the API. Six checks take about 24 seconds; 20 keywords in 5 countries is 100 checks, about 7 minutes.
Step 3: Schedule it with launchd
Apple's scheduled-jobs documentation says cron is still supported but deprecated in favor of launchd. Save this as ~/Library/LaunchAgents/com.example.rank-log.plist, with your own user name in the path:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.example.rank-log</string>
<key>ProgramArguments</key>
<array>
<string>/bin/zsh</string>
<string>/Users/you/aso/rank-log.sh</string>
</array>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>9</integer>
<key>Minute</key>
<integer>0</integer>
</dict>
</dict>
</plist>
Load it with launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/com.example.rank-log.plist, test it once with launchctl kickstart gui/$(id -u)/com.example.rank-log, and remove it with launchctl bootout gui/$(id -u)/com.example.rank-log. Apple documents that if the Mac is asleep at the scheduled time, a StartCalendarInterval job runs when it wakes, and that a powered-off Mac waits for the next scheduled time. So a Mac that sleeps through the 9:00 slot still logs when it wakes, while a Mac that is powered off at 9:00 skips that day.
Step 4: Read the CSV
Add a column for what you changed, as the rank tracking routine describes, and compare week over week, not day over day; the trend comparison guide shows how. Rating counts and results vary by device, account, time and personalization, so the script gives you a steady yardstick, not what every person sees.
When the script stops being worth it
A script is enough for a handful of keywords in a few countries. It does not estimate volume or difficulty, show who ranks ahead of you, or localize keywords for you. If you track more than about 30 keywords, or more than a few storefronts, or you want the top apps next to each rank, a desktop app saves time. See the Mac tool comparison for options, including web tools that also work in a Mac browser.
In LocalASO
LocalASO is a Mac app (macOS 14 or later) that shows rank for each keyword in up to 52 storefronts on one board, with a "Losing to" list and a daily history that stays in a database on your Mac. It reads the same public search results as the script. See the docs and the pricing page.
Questions
- Does the script need Node, Python or Homebrew?
- No. It uses curl, grep and cut, which come with macOS, and runs in zsh, the default shell.
- Will it run when my Mac is asleep?
- Apple's launchd documentation says a job scheduled with StartCalendarInterval runs when the Mac wakes if it was asleep at the scheduled time. If the Mac is powered off, it waits for the next scheduled time.
Sources
- Apple: performance-partners.apple.com/search-api (checked November 1, 2026)
- Apple: developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/ScheduledJobs.html (checked November 20, 2026)
Do this for every country, in minutes