All case studies
Custom Software API Development Iframe Integration

Building a search API and embeddable widget for Farnall

Farnall wanted their product search to work inside other people's websites. We built an API that powers a self-contained iframe widget, giving partners a fully functional search experience without exposing the underlying data or systems.

The Brief

Search that lives anywhere

Farnall needed a way for partner websites to offer product search without handing over their catalogue or requiring partners to build anything.

Farnall's product catalogue is the core of their business. Partners and resellers regularly needed to search and reference products, but giving them direct access to internal systems wasn't practical. They needed something that could sit inside a partner's website and feel native, while Farnall kept full control over the data and presentation.

The solution had to be simple for partners to adopt. No SDKs, no API keys to manage on their end, no frontend code to write. Just a single iframe embed that gives their visitors access to Farnall's search functionality.

On Farnall's side, they needed to control which domains could embed the widget, what product categories were visible per partner, and how results were displayed. The API had to be the single point of control for all of this.

Search had to live inside a partner's site

Farnall needed their product search to appear seamlessly within third-party websites via an iframe, without those partners needing access to the underlying data or infrastructure.

Controlled access to product data

The API had to serve search results to authorised iframes only. Partners would embed the search widget, but Farnall would retain full control over what data was exposed and how it was presented.

Fast, relevant results

End users searching within the embedded widget expected instant, accurate results. The API needed to handle filtering, keyword matching, and category navigation without any perceptible delay.

The API

One endpoint, complete control

We built a search API that Farnall owns and operates. It powers every embedded widget, handles access control, and serves results from a single source of truth.

RESTful search endpoint

A clean, documented API that accepts search queries, filters, and pagination parameters. Returns structured JSON that the iframe frontend consumes directly.

Embeddable iframe widget

A self-contained search interface designed to be dropped into any website via a single iframe tag. Handles its own styling, pagination, and result display without leaking into the host page.

Origin-based access control

The API validates requests against a whitelist of approved domains. Unauthorised origins receive no data, keeping Farnall's product catalogue protected.

Configurable search behaviour

Partners can pass parameters to control which product categories appear, how results are sorted, and whether certain filters are shown or hidden in their embedded instance.

How It Works

From embed to results in milliseconds

1

Partner embeds the iframe

A single line of HTML is all the partner needs. The iframe tag points to Farnall's hosted search widget, with optional parameters for category filtering and display preferences.

2

User searches within the widget

Visitors on the partner site type a query or browse categories. The iframe's frontend sends requests to the Farnall search API, passing along the partner's domain for validation.

3

API returns filtered results

The API checks the requesting origin, runs the query against Farnall's product index, and returns structured results. The iframe renders them instantly with no page reload.

4

Farnall stays in control

Product data, search logic, and access permissions all live on Farnall's infrastructure. Partners get a polished search experience without ever touching the underlying system.

The Widget

One line of HTML, full search experience

Partners drop a single iframe tag into their page. Everything else is handled by the widget and the API behind it.

The iframe widget is a standalone SvelteKit application that communicates exclusively with the Farnall search API. It renders its own search bar, filters, results grid, and product detail views entirely within the iframe boundary.

Because the widget is self-contained, it never interferes with the host page's styles or scripts. Partners don't need to worry about CSS conflicts, JavaScript clashes, or layout breakage. The widget adapts to whatever container width it's given.

From a user's perspective, the search feels like a native part of the partner's website. They type a query, browse results, and view product details without ever leaving the page.

Widget features

  • Responsive layout that adapts to the host container width
  • Keyword search with instant filtering
  • Category and attribute-based narrowing
  • Paginated results with configurable page size
  • Product detail views without leaving the iframe
  • Branded to match Farnall's visual identity

Need an API or embeddable widget?

We build APIs, search systems, and white-label tools that let your data work wherever it needs to. Let's talk.