Worked Example
Worked Example
This example searches for product images with two live providers and one free fallback.
Create provider rows
Configure
braveat priority10,tavilyat20, andduckduckgoat90.Prepare the query
$query = SearchQueryData::fromArray([ 'brand' => $product->brand, 'model' => $product->model, 'color' => $product->color, 'ean' => $product->ean, 'site' => $product->brand_domain, 'limit' => 10, 'metadata' => ['product_id' => $product->id], ]);Execute image search
$execution = app(SearchProviderManager::class)->searchImages($query);Persist audit context
Store
$execution->attempts,$execution->usedFallback, and each result fingerprint.
sequenceDiagram
participant Job as Catalog job
participant Manager as SearchProviderManager
participant Brave
participant Tavily
participant Store as Candidate store
Job->>Manager: searchImages(query)
Manager->>Brave: try priority 10
Brave-->>Manager: empty or failed
Manager->>Tavily: try priority 20
Tavily-->>Manager: normalized results
Manager-->>Job: execution result
Job->>Store: upsert candidates by fingerprint