Read get google custom search API key for more information.

The Custom Search JSON API lets you develop websites and applications to retrieve and display search results from Google Custom Search programmatically. With this API, you can use RESTful requests to get either web search or image search results in JSON format.

Custom Search JSON API requires the use of an API key. An API key is a way to identify your client with Google.

Google Custom Search API Key
By calling the API user issues requests against an existing instance of Custom Search Engine. Therefore, before using the API, you need to create one in the Control Panel. Once it is created, you can find the engine’s ID in the Setup > Basics > Details section of the Control Panel. This is the cx parameter used by the API.
After you have an API key, your application can append the query parameter key=yourAPIKey to all request URLs. The API key is safe for embedding in URLs, it doesn’t need any encoding.

You may also like