HOSTED SEARCHBETA
Search widget
Add search over an index to any website with two lines of HTML.
Hosted search and WordPress are in private beta. Your account needs the beta enabled to use these APIs.
The snippet
HTML
<div data-nabdaq-search data-index="main-listings" data-key="nbd_pub_…"></div>
<script src="https://nabdaq.dev/widget/v1.js" async></script>The dashboard's Website tab on each index previews it, creates the browser key and writes the snippet. The widget shows a search box with autocomplete, a Buy/Rent control, removable chips and result cards.
Options
| Attribute | Does |
|---|---|
data-locale="ar" | Arabic, right to left |
data-purpose | "buy" (default), "rent" or "any" |
data-purpose-control="off" | Hide the Buy/Rent control |
data-attribution="off" | Hide "Search by Nabdaq" |
data-placeholder | The hint in the empty box |
data-per-page | Results per page (12) |
data-query | A search to show on arrival |
From a script: window.Nabdaq.mount(element, { index, key, … }). Theme with --nabdaq-accent, --nabdaq-accent-text, --nabdaq-radius, --nabdaq-font and --nabdaq-columns.
A site with a Content-Security-Policy must allow
https://nabdaq.dev in script-src and connect-src. Without a plan, or with a key that does not list the site, the widget hides itself instead of showing an error.