Documentation
JavaScript Quickstart (deprecated)
Fastly update
Domainr joined Fastly in 2023, and the Domain Research API is now part of the Fastly API. These original Domainr API docs are now deprecated, though we are leaving them online for users who haven't migrated to the Fastly API yet.
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 NPM and GitHub.
Steps
- Get an API key from RapidAPI, or a
client_id(for high-volume users). - Include the
domainr-search-box.min.jsanddomainr-search-box.cssin your page. - Add an empty
divunder yourinputelement; the Domainr Search Box will fill it with results. - Configure the search box, customizing as needed.
- 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.