SearchApp’s imageSearch
method; for SSR use the standalone
fetchImageSearch.
Prerequisite: the search app is registered (
.use(search())), your app is wrapped in
<GloodProvider>, and https://search.glood.ai is in your CSP connectSrc. See
Installation.1. Get the image as a data: URL
Pass exactly one source: image (base64 or a data: URL) or imageUrl (an http(s)
URL, fetched server-side). From a file input, convert to a data: URL:
2. Run the search
Retrieve theSearchApp via useGloodAnalytics().getApp('search') and call
imageSearch:
ImageSearchParams;
res is an ImageSearchResponse
and each product is a SearchProduct.
imageSearch always runs against the app’s controlEndpoint (non-edge) — the vision
pipeline isn’t available on regional edges. This routing is automatic; see
Configuration → Edge vs. non-edge routing.3. Image constraints
Images are validated server-side; anything outside these returns400:
4. From a URL, or on the server
PassimageUrl instead of image to search by a hosted image, and use
fetchImageSearch
when you don’t have a React component (loaders, mobile backends):
5. Attribution
Attribute clicks withsearch_type: 'image' via the SearchApp track helpers
(trackResultClick),
each taking a SearchTrack:
See also
fetchImageSearch— standalone signature- Search & Discovery → Image search
- Search API Reference