JavaScript Quickstart

Note: this is for development and demonstration purposes only. RapidAPI Keys and Client IDs in the below examples will be visible in client-side code, which may or may not meet your implementation needs.

You can easily add Domainr-style instant search to your web and app projects via JavaScript (and optionally, jQuery). The code is available from CDNJS, NPM, or GitHub.

Steps

  1. Get an API key from RapidAPI, or a client_id (for high-volume commercial users).
  2. Via CDNJS, include domainr-search-box.min.js and domainr-search-box.css in your page (or host these files yourself).
  3. Add an empty div under your input element; the Domainr Search Box will fill it with results.
  4. Configure the search box, customizing as needed.
  5. Style the results accordingly, via CSS.

Note: If you wish to keep your RapidAPI API key secret, you can proxy Domainr API requests through a server you control. In this example the key is published in client-side code, and thus visible (e.g. via browser developer tools) to your site’s visitors, and could be compromised.