Read google custom search script API for more information.
Google Custom search gives an easy way to integrate search on your website. But it is far from perfect and leaves many of us looking for alternatives. Google gives two ways of integrating custom search on a website.
- Google Custom Search Script
- Google Custom Search JSON API
Read on to find out more about those and more!
Google Custom Search Script
Google custom search script is relatively easier to get. To do so, follow the steps:
- Signup at cse.google.com
- Click on the ‘create a custom search engine’ button
- Click setup from the menu on the left side->Basics->sites to add->Add
- Add your website’s URL and save
- You can get the search engine script from Setup->Basics->get Code
Google Custom Search JSON API
Google also provides a way to programmatically set up the search. This is not all that very easy to use and I do not recommend following this method unless you are very comfortable with coding. Custom Search JSON API provides 100 search queries per day for free. 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. If you need more than 10k queries per day and your Custom Search Engine searches 10 sites or fewer, you may be interested in the Custom Search Site Restricted JSON API, which does not have a daily query limit.
Since the whole setup and configuration of the API method is quite expansive, I will not elaborate on it here. This article was written specifically as a guide to set up the custom search API. You can read that if you want more information.