Google custom search JSON API is a RESTFUL API that lets you develop applications to get and show search results (web search, images) from Google custom search programatically. With this API, you can use RESTful requests to get either web search or image search results in JSON format.

The existing documentation on creating a google custom search using the API method is confusing and we will try to simplify the process here. If you are not a big fan of google custom search, you can try out other best search for sites.

In this article, we will see how we can create a custom search engine using the Google custom search API. We will also see what are the limitations of google custom search API and how we can overcome them.

Create your custom search engine using expertrec

Create a custom search engine at

The usual API call is

Here parameters could be –

  1. q– query string
  2. cx– Custom search engine ID.
  3. fileType– bmp, gif, jpg, png, pdf etc
  4. num-number of search results to display
  5. searchType- search type.
  6. sort-Sort by functionality to use.

For a list of all query parameters, go to this link.

Google custom search JSON API simplified

A sample API call would be like this-

The response of this API will be in JSON format for you to consume to build your search application.


Getting your google custom search API Key

  1. Go to
  2. Click on get a key.Google custom search JSON API simplified
  3. Click create new project.Google custom search JSON API simplified
  4. This will generate your new API key.Google custom search JSON API simplified
  5. You can restrict the usage of this API key in your Google API console

Google custom search JSON API simplified

Getting your CX / Search engine ID:

Go to your custom search / site search control panel-> edit search engine->Basics->Details->Search engine ID.

This is your search engine ID.

Google custom search JSON API simplified

Testing your google custom search JSON API-

You can test your google custom search API using the Google API explorer 

google custom search JSON simplifiedYou could try out ExpertRec’s site search API, which is easier to implement with no coding needed at all. Expertrec’s site search API is also available if in case you want to go through the API route.

Limitations of Google custom search API-

  1. You can only retrieve a maximum of 10 search results at a time.
  2. Query limit of 100 per day.

ExpertRec’s Google custom search replacement API to overcome 

Go to  and enter your website and sitemap URLs to get your crawl done. Go and click on your demo link.

Get your expertrec site search API

Go to to get your API key


The API will be of this format-

Expertrec site search API parameters-

  1. org_id- Your unique ID that identifies your website/ websites.
  2. q- Keyword.
  3. page- pagination
  4. size- number of search results to be displayed.

The results will be in JSON format-


Create your expertrec custom search engine

muthali ganesh

Muthali loves writing about emerging technologies and easy solutions for complex tech issues. You can reach out to him through chat or by raising a support ticket on the left hand side of the page.