Skip to content

Use Cases

DannylydST edited this page Aug 6, 2026 · 2 revisions

Use Cases

Real automation patterns built on the Sorftime Data CLI. Full recipe book: resources/use-cases.md in the repo.

1. Batch product intelligence (200 ASINs)

# asins.txt: one ASIN per line
bash scripts/batch.sh ProductRequest asins.txt --param asin --domain 1 --out products.jsonl

# Extract the key fields into CSV
cat products.jsonl | python3 -c "
import json, sys
for line in sys.stdin:
    d = json.loads(line).get('data', {})
    print(','.join([d.get('Asin',''), str(d.get('SalesPrice','')), str(d.get('ListingSalesVolumeOfMonth','')), str(d.get('Ratings',''))]))
"

2. Category trend monitoring (daily pull)

# Category Trend for a node, appended to a local log daily (cron / launchd)
sorftime api CategoryTrend '{"nodeId":"3743561"}' --domain 1 \
  | grep -v "^info:" | jq . >> category-trend-$(date +%F).jsonl

3. Keyword reverse-lookup for a competitor ASIN

sorftime api ASINRequestKeyword '{"asin":"B0CVM8TXHP","pageSize":100}' --domain 1 \
  | grep -v "^info:" | jq '.data[0:20]'
# → ranked keyword list the ASIN ranks for — competitor keyword strategy in one call

4. Hijacker monitoring setup

# Register a seller/hijacker monitoring task for an ASIN
sorftime api ProductSellerSubscription '{"asin":"B0CVM8TXHP"}' --domain 1

# Check task status, then collect results
sorftime api ProductSellerTasks '{"taskId":"<taskId>"}' --domain 1
sorftime api ProductSellerDataCollect '{"taskId":"<taskId>"}' --domain 1

5. Cross-platform price comparison

# Same keyword across Amazon (domain 1) and Walmart (domain 28)
sorftime api ProductSearch '{"keyword":"bluetooth earbuds"}' --domain 1 | grep -v "^info:" | jq '.data[0:5] | map({Asin, SalesPrice})'
sorftime api ProductSearch '{"keyword":"bluetooth earbuds"}' --domain 28 | grep -v "^info:" | jq '.data[0:5] | map({Asin, SalesPrice})'

6. 1688 sourcing price check

sorftime api ProductSearchFromName '{"name":"iRobot Roomba"}' --domain 26 | grep -v "^info:" | jq .

7. TikTok creator & video analytics (US only, domain=301)

sorftime api AuthorRequest '{"authorId":"<authorId>"}' --domain 301 | grep -v "^info:" | jq .
sorftime api VideoRequest '{"videoId":"<videoId>"}' --domain 301 | grep -v "^info:" | jq .

⚠️ AuthorRequest / VideoRequest / VideoTagSearch are US-site only — other domains return 401.

Patterns to remember

  • Always sleep 1 between batch calls (rate-limit errors: 500/501/694) — batch.sh does this by default
  • Large payloads (CategoryTree ~10MB) → save to a local file and jq the node you need; never load in full
  • Field names are non-standard — check resources/_field_aliases.md when a field seems missing