ProductFinder API

SearchRequest

terms
​string[] · minItems: 1 · maxItems: 10 · required

Search terms (1–10). Each item must be a non-empty string after trim. The server trims whitespace before searching.

Example: {"0":"yoga mat","1":"resistance bands"}
limit
​integer · min: 1 · max: 5

Maximum products to return per term. Defaults to 1 when omitted. Note: limit is not part of the cache key; a higher later limit only returns what that cached batch stored.

Example: 1
Default: 1

SearchResponse

​TermResult[] · required

One result object per input term, in the same order

TermResult

term
​string · required

The original (trimmed) search term from the request

Example: yoga mat
source
​string | null · required

Where the products came from for this term. Either the literal cache, or an identifier for the upstream provider that served the request.

null means every configured provider failed or none are configured; see error for details.

Example: cache
​Product[] · required

Matched products (may be empty on failure)

cachedFrom
​string

Present only when source is cache. Identifier of the upstream provider that originally fetched and stored this batch.

Example: vendor_a
fetchedAt
​string · date-time

ISO-8601 timestamp when this batch was fetched (or when the cached batch was originally stored). Absent when source is null.

Example: 2026-08-20T14:02:11.000Z
error
​string

Human-readable failure reason for this term. Present when source is null. This is not an HTTP-level error — the overall response status remains 200.

Example: No provider credentials configured

Product

images
​string[] · required

Image URLs (may be empty)

Default: []
name
​string | null

Product title

Example: Gaiam Yoga Mat
price
​number | null

Numeric price when available

Example: 24.99
currency
​string

ISO currency code

Example: USD
Default: USD
description
​string | null

Product description or joined feature bullets

url
​string | null · uri

Shop now product URL

Example: https://www.shoponline.com/dp/B00EXAMPLE

Error

error
​string · required

Human-readable error message

Example: Internal search error

HealthResponse

ok
​boolean · required

Always true when the process is serving requests

Example: true
dbWritable
​boolean · required

Whether a simple SQLite read succeeds

vendorAConfigured
​boolean · required

Whether the primary provider env vars are present (not validated live)

vendorBConfigured
​boolean · required

Whether the fallback provider env vars are present (not validated live)

cacheTtlHours
​number · required

Effective cache TTL in hours (CACHE_TTL_HOURS, default 24)

Example: 24