Back to demo

How It Works

Find images for a subject, remove logos and duplicates, and keep the source page for each result.

Why Exa

Image results need enough context to judge relevance and provenance. Exa returns image candidates with the pages that published them, giving the application both visual coverage and source attribution.

The Pipeline

Overview

The default Auto flow makes one live Exa Search request, then applies deterministic safety, quality, and deduplication checks before returning image tiles. The result-count and image-count controls are clamped server-side.

Steps

1

Search 15 relevant pages

POST /search uses type auto and numResults 15. The current interface does not send a category. The server adds x-exa-integration: image-search-demo for usage attribution.

/search

2

Request ranked image references and fallback candidates

The Auto schema marks images with x-exa-image-references and asks for the slider-selected target, clamped from 1 to 30. contents.extras also requests richImageLinks and imageLinks so the app can fill gaps when the structured image list returns too few candidates.

3

Filter, deduplicate, and preserve attribution

Application code removes SVGs, obvious logos and interface assets, tiny files, hotlink-protected image hosts, and duplicate URLs, alt text, or CDN asset variants. Each retained tile keeps the source page URL and title.

Endnote

The alternative legacy mode uses the same type auto and 15-page retrieval but omits the structured image-reference schema and expands page image metadata directly. The default Auto path is the one represented by the request above.