When users visit a website and have difficulty finding a product or service they’re looking for, they tend to leave immediately. The likelihood of them coming back after a bad user experience is unfortunately low. That’s the worst-case scenario for a website. An excellent user experience, on the other hand, won’t only satisfy them but also increase the conversion rate. Happy customers, happy owners!
E-commerce businesses in particular prefer customer search engines to optimize user experience and increase conversion rates. Ever wondered why? A customized website search gives your customers the best possible online shopping experience. The improved user experience will increase your conversion rates and sales. You can also get insights via the API to analyze your customers’ search intent and keywords.
In this post, I’ll explain how you can create a Custom Search JSON API, a Programmable Search Engine, and check SERP rankings for free.
What’s Google Custom Search API?
Custom Search is a web tool provided by Google that allows developers to create a Programmable Search Engine based on the Google search engine. This means that you can generate instant searches on your website, just like in Amazon. This way, your customers can find what they’re looking for instantly. However, Google’s custom search requires an API (Application Program Interface) key that allows you to identify your customer to Google. The API takes your custom search results and delivers them in JSON format.
APIs allow us to share important data. It’s a reusable interface provided by the application that shares its capabilities, so that the features of one application can be used in another application.
Custom Search JSON API has two versions: normal API and Search Site Restricted JSON API. Both offer 100 free search queries per day. You can add up to 10k queries per day for $5 per 1000 queries. Custom Search Site Restricted JSON API, on the other hand, has no daily query limit.
Why should you use a Custom Search API for your business?
According to Shopify, the search bar is one of the key driver of sales. They say that 13.8 percent of a website’s total revenue stems from search bar usage. That makes it clear how important a search bar is to a website.
Let’s say that you’ve an e-commerce website that sells outdoor gears and there are thousands of products in your online store. People want to find the right product as quickly as possible, as you would appreciate. With custom search, you can give them what they’re looking for in no time. The user who accesses the desired product effortlessly is almost ready to buy. In short, the search bar is a beacon that allows users to find their way around a website.
At the same time, you can allow users to discover other products and services they may need in the future. Better search bar results lead to better sales opportunities. In addition, visitors who use an on-site search bar have higher chance of returning than others. This means that custom search will increase your conversion rates.
Limits of the API
Custom Search JSON API provides free 100 searches per day for results. If a keyword search returns 200 results, you can view only the first ten pages. If you pay $5 per 1000 searches, you can increase your daily request to 10,000. However, you can make a request by filling out a form to increase the default limit of 10,000 queries per day.
Is Custom Search JSON API free?
You can make 100 free requests per day per Google account. It’s also possible to increase your daily Custom Search request up to 10,000 by paying a fee, which is $5 per 1000 queries.
How to boost your SEO efforts with Custom Search JSON API
You can use custom search JSON API to find out if your website is ranking for a particular keyword. This data can influence your SEO efforts.
Let’s assume that we’ve a company in Turkey that buys plastic chairs. When someone searches for chairs in Turkey, I want to check if my website shows up in the results or not. If it does, you would want to know which position it is being displayed in, right? This information can improve our SEO strategy.
How to get started step by step
Step 1: Set up your Programmable Search Engine and access its API.
You can set up your PSE from the Control Panel (the easier way) or create an XML file with the engine definition by following the steps below:
- With the Control Panel, you can set up your own PSE in minutes. Log in to the Control Panel with your Google account.
- Enter the website(s) you want to include in your search engine. You can add any website URLs (not just yours) or individual page URLs.
- Give your search engine a name and choose the language of your search engine.
- Click “Create.” That’s it!
- After that, you can change and customize it as you like and paste the code into your website. It’s also possible to preview and test your PSE.
Brands and customers have different needs, for sure. That’s why the search box, results page, and results are customizable for each website. In the Control Panel, you can personalize and edit your search engine. “The Region”, “the Language”, “Sites to search” or “Search the entire web” are the basic settings you need to change first.
If you want to search the entire web with your Custom Search, you should turn on “Search the entire web” and delete the added URL under “Sites to search”. However, the total number of results will be different from Google’s results. In addition, Custom Search engine excludes many URLs like forums. However, the general web search results aren’t available in Site Restricted JSON API.
How to use your Programmable Search Engine
First, open your Control Panel. Then go to Setup> Public URL. This way, you can share it with your users. However, it’s difficult to always share a link with your users. That’s why you can embed a search box on your website. Then, your visitors can find out the search engine themselves.
Second, install a search box on your website by following the steps below:
- Open your Control Panel and click on your search engine.
- Go to “Setup” and click on “Basics”.
- In the “Details”, click on “Get Code” to copy and paste it into the HTML code of your website, where you want your search engine to appear.
You can easily embed your search engine with the embed code. However, with the JSON API, you’ve more control over your custom search engine.
Step 2: Get your API key
- Custom Search JSON API requires an API key to identify your client to Google. Open your Control Panel and follow these steps: Setup > Basics > Search Engine ID. The API will use this ID.
- Open this page and click on “Get a key”.
You can directly access the documents you’re searching for by using certain parameters to make the search results more effective. The most important parameters you should use in your custom search engine as explained below:
gl: Refers to the geographic location of the end user. Highlights the search result that matches the value of the country of origin parameter.
hl: Sets the language of the user interface.
start: The index of the first result returned.
Step 3: Check SERP rankings for free
PEMAVOR offers a free SERP Ranking Checker that allows you to check SERP rankings for 100 keywords per day. You just need to use the Google Custom Search Engine & App Script and save the results in Google Sheets. It’s possible to schedule the tool to run automatically on a daily basis.
The Google App script pulls the top 10 search results from PSE for each keyword in your listing by connecting to Custom Search JSON API. You can read how to use SERP Ranking Checker to apply Google Sheet settings.
PEMAVOR uses the API for some scripts in SEO automation. With this tool, it’s possible to cluster keywords into topics based on SERP results. The company has also received help from the API for the Semantic Keyword Clustering Tool.
Create and activate your Google Cloud project
You can also get the API key by registering with Google Cloud, aside from the link we provided above. After you open Google Cloud, click on Console in the top left corner. Then click on “API credentials-APIs & Services”, located under the “Quick Access” section. Now, you’ll see the text “Show Key”. Here you can retrieve your API key.
When you click on the “Activate” button, you’ll need to provide various details, such as payment, country, and profession. This will give you access to all cloud platform products, such as Google Maps API or Firebase. You’ll also get a $300 credit for 90 days as a gift.
How to query more than 100 keywords per day by using multiple API endpoints
Let’s say we created a Programmable Search Engine. Then, we created our Custom Search JSON API using Google Cloud but 100 queries per day aren’t enough for us, and we’ve no budget. What can we do at this point? Since Google Cloud allows you to create up to 12 projects, we can create 12 projects separately for 100 free queries per day. This way, we can reach up to a total of 1200 queries per day.