-
Notifications
You must be signed in to change notification settings - Fork 0
Use Cases
DannylydST edited this page Aug 6, 2026
·
2 revisions
Real automation patterns built on the Sorftime CLI. Full recipe book: resources/use-cases.md in the repo.
# 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',''))]))
"# 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).jsonlsorftime 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# 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# 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})'sorftime api ProductSearchFromName '{"name":"iRobot Roomba"}' --domain 26 | grep -v "^info:" | jq .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.
-
Always
sleep 1between batch calls (rate-limit errors: 500/501/694) —batch.shdoes this by default -
Large payloads (CategoryTree ~10MB) → save to a local file and
jqthe node you need; never load in full -
Field names are non-standard — check
resources/_field_aliases.mdwhen a field seems missing