How to get Search API key
In this article, we're going to tell you how to create (which will take you only a couple of minutes!) and finally start using our Search widget.
In this article:
Creating API key
To get your API key, you need to go to Custom Search Introduction section and click Get a Key.
The popup window will come up. Here you need to enter a new project name, tick Yes box to accept Terms of Service and click Next.
A new popup window will appear where you can copy your API key to paste it to the widget.
Custom Search JSON API provides 100 search queries per day for free. You can learn more here.
If you need more, you may sign up for billing in the API Console. Additional requests cost $5 per 1000 queries, up to 10k queries per day.
Restricting your API key
You can either limit the websites (HTTP referrers), web servers (IP addresses), or mobile apps which can use it. You might want to make your API key accessible for your own domain and Elfsight apps only. In this case, add two items - *.elfsight.com/* and your domain name:
Please keep in mind that you need to change the way a referrer's inserted depending on the URLs which will use the key. Please pay attention to the instruction on the left of the page:
You can do the same thing with IP addresses, mobile apps and even specify the APIs your API key can call.
Done! Now you can continue configuring your Search widget.
If you have any questions left, please, feel free to contact our support team at https://help.elfsight.com/contact, we will be delighted to assist.