Search Widget

Embed the Recuity job search on your own website with two lines of HTML.

The widget gives your visitors the full search experience: search, filters and job details. It needs no framework and no backend integration, and it works in plain HTML, WordPress blocks, and React, Vue or Angular apps alike.

Embed

Add the script and the element to any page.

HTML
<script async src="https://recuity.ai/widget/v1.js"></script>
<recuity-search publishable-key="rk_pub_…"></recuity-search>

On its own like this, the widget starts as the search box, location box and button. Results, filters and job details appear once the visitor searches. Add query, with any of the filter attributes below, to have it load already showing results.

The widget needs no CSS library of its own. Everything it draws lives in a Shadow DOM, so it does not depend on Bootstrap, Tailwind or any other stylesheet you load, and none of them can disturb it.

The widget uses a widget key (rk_pub_…), which you create on your Search Widget page. A widget key is publishable, so it is safe to include in HTML. It only works for job search: the widget rejects your secret API keys, and every other endpoint rejects publishable keys. The same page generates a ready-made, branded snippet.

On the same page you can deactivate a key to switch search off on the sites using it, and reactivate it later with the same embed code. You can also rotate a key: it gets a new value, the old one stops working immediately, and you paste the new embed code into your site. While a key is deactivated, deleted or out of date, the widget shows "Search is unavailable on this page".

How your key is protected

A publishable key is visible to anyone who views your page, so the key alone is not what protects your search.

Allowed websites. The key works only on the website domains you list for it, so another website cannot embed your search.

Browser check. Before a visitor's first search, the widget confirms it is running in a real browser. The check is invisible and takes a moment. A script that copies your key cannot search with it.

Visitor limit. Each visitor can make up to 300 searches a day. A visitor who reaches the limit sees a message asking them to come back tomorrow.

Network limit. One network address, such as a campus or an office, can make up to 50,000 searches a day through one key. This stops a single address running up searches by posing as many visitors.

None of this needs any setup from you or your visitors. Like any public web page, your results can still be read by someone who visits your site in a real browser.

Your privacy policy

The browser check is done by Cloudflare Turnstile and runs invisibly for your visitors. Turnstile collects technical information about the visitor's browser and device to decide whether it is a real browser. If your privacy policy lists the services your site uses, add Turnstile and link to the Cloudflare Turnstile Privacy Addendum.

If your site sends a Content-Security-Policy

Most sites need nothing here. If yours sends a Content-Security-Policy header, allow these, or the widget cannot load:

DirectiveAllowUsed for
script-srchttps://recuity.aiThe widget script
connect-srchttps://recuity.aiSearch requests
frame-srchttps://recuity.aiThe hidden frame that runs the browser check
img-srchttps://company-logos.s3.uk.io.cloud.ovh.netEmployer logos on job cards. Without it the cards show the company initial

If the frame is blocked, the widget shows "Search is unavailable on this page" and your browser's console names the missing frame-src entry.

Element attributes

AttributeDescription
publishable-keyRequired. Your rk_pub_… widget key
query, locationRender the widget already searched for these terms
location-type, job-types, seniority-level, job-attributesPre-applied filters, comma-separated (e.g. location-type="Remote,Hybrid"). They take the same values as the job search API
discovery-periodPre-applied filter: how many days back to look
distancePre-applied filter: kilometres from the location (ignored if there is no location)
job-actionsThe buttons shown beside Apply on a job: copy-link, save, or both separated by a space. Left out, a job shows Copy link only. job-actions="" shows Apply alone
apply-url-templateRoute Apply clicks to your own page without JavaScript, e.g. https://your.site/apply?job={jobId}&to={jobUrl}

Theming

For the common case, set your brand colours as attributes.

HTML
<recuity-search publishable-key="rk_pub_…"
    primary-color="#0E4DA4" accent-color="#5B8DEF"
    border-radius="12px" font-family="Inter, sans-serif" height="700px"></recuity-search>

On a wide page the widget stays centred and grows no wider than 1400px, so the search bar lines up with the job list and details. Change this with the max-width attribute, for example max-width="900px", or max-width="none" to fill the page.

Once results show, the widget is as tall as the browser window less 100px, which leaves room for your site's header, and stays between 480px and 1000px. Set height to change this, for example height="700px" for a fixed height, or height="max(480px, calc(100vh - 160px))" if your header is taller.

The default follows the browser window, not the space around the widget. If you place the widget inside an iframe, a modal or a tab panel, set a fixed height.

Hover, tint and focus shades are derived from the primary colour automatically. For full control, override the widget's design tokens from your own stylesheet. CSS custom properties inherit into the widget.

CSS
recuity-search {
  --rw-primary: #0E4DA4;   /* buttons, active states, links */
  --rw-accent:  #5B8DEF;   /* focus rings, secondary accents */
  --rw-text:    #1a1a2e;   /* body text */
  --rw-muted:   #5a6478;   /* secondary text */
  --rw-bg:      #f7f8fa;   /* widget background */
  --rw-surface: #ffffff;   /* cards and inputs */
  --rw-radius:  10px;      /* corner radius scale */
  --rw-font:    Inter, sans-serif;
  --rw-height:  700px;     /* overall height once results show */
  --rw-max-width: 1400px;  /* widest the widget grows; "none" fills the page */
}
Attributes win over stylesheet variables when both are set.

Events & programmatic search

The widget is a standard custom element, so you listen to its DOM events and call its methods like any other element. Every event carries the job payload, including the original job posting URL.

JavaScript
const widget = document.querySelector('recuity-search');

// Apply is cancelable: call preventDefault() to take over navigation
widget.addEventListener('apply', (e) => {
  e.preventDefault();                    // stop the default new-tab open
  const { id, jobUrl, jobTitle } = e.detail.job;
  location.href = '/careers/apply?job=' + id +
                  '&redirect=' + encodeURIComponent(jobUrl);
});

// Save shows only when job-actions includes "save", and is entirely yours to persist
widget.addEventListener('save',   (e) => myApp.saveJob(e.detail.job));
widget.addEventListener('unsave', (e) => myApp.removeJob(e.detail.job.id));
widget.savedJobIds = myApp.getSavedIds();   // paints saved state

// Trigger a search from your app, e.g. "jobs related to my profile".
// The script loads asynchronously, so wait for the widget before calling its methods
customElements.whenDefined('recuity-search').then(() => widget.search({
  q: profile.jobTitle + ' ' + profile.skills.join(' '),
  location: profile.city,
  seniorityLevel: [profile.seniority],
}));

Events, properties and methods

MemberKindDescription
applyEventApply clicked. Cancelable. By default it opens the original job_url in a new tab. e.detail.job is { id, jobTitle, jobUrl, companyName, companyUrl, location, job }
copy-linkEventCopy link clicked, after the original job posting's address is on the clipboard
save, unsaveEventSave toggled. The button shows only when job-actions includes save. Persistence is the host page's responsibility
savedJobIdsPropertyArray of job ids to show as saved
search(criteria)MethodRuns a search with { q, location, jobTypes, seniorityLevel, locationType, jobAttributes, discoveryPeriod, distance }. The filter UI updates to match