alicli documentation

search-api

search-api

Read a cached search snapshot, or explicitly trigger a new device search.

alicli search-api products --keyword "adjustable bracket" --json
alicli search-api suppliers --keyword "metal components" --since 20 --json
ALICLI_LANE=example-ops alicli search-api products \
  --keyword "adjustable bracket" --trigger --json

Read versus trigger

Without --trigger, the command reads the vendor snapshot and does not operate the device. --keyword selects an exact keyword; when omitted on a read, the vendor chooses the snapshot. --since asks for results newer than a sequence. It saves repeated data transfer, not a liveness check.

A trigger requires a keyword and lane, holds the account lock, checks the reported app-running state when available, and calls the search endpoint. It accepts both supported response shapes. If no fresh capture is confirmed, it returns an error rather than treating triggered:true as success. The trigger response is a summary; read the matching snapshot afterward to get cards.

Field or optionMeaning
coveragenever_captured when capturedAt is absent, otherwise stale or fresh according to the vendor flag.
capturedAtVendor capture timestamp in milliseconds. Check it against the search you requested.
seq / unchangedSnapshot version and whether it changed relative to --since. Neither proves a trigger worked.
resultsProducts or suppliers in this snapshot. An empty array without a capture is not proof of zero search results.

There is no CLI keyword-list command. The old search verb refuses and has no vision fallback. A failed capture does not identify whether the cause is app state, legitimate empty results or capture failure.

contact inspect · contact · doctor · retired