Custom Search JSON API

The JSON Custom Search 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.

Data format

JSON Custom Search API can return results in JSON data format.

There are also two external documents that are helpful resources for using this API:

  • Google WebSearch Protocol (XML): The JSON Custom Search API provides a subset of the functionality provided by the XML API, but it instead returns data in JSON format.
  • OpenSearch 1.1 Specification: This API uses the OpenSearch specification to describe the search engine and provide data regarding the results. Because of this, you can write your code so that it can support any OpenSearch engine, not just Google's custom search engine. There is currently no other JSON implementation of OpenSearch, so all the examples in the OpenSearch spec are in XML.

Prerequisites

Search engine ID

By calling the API user issues requests against an existing instance of a Custom Search Engine. Therefore, before using the API, you need to create one in the Control Panel. Follow the tutorial to learn more about different configuration options. You can find the engine's ID in the Setup > Basics > Details section of the Control Panel.

API key

JSON Custom Search API requires the use of an API key. Get a Key

Pricing

JSON Custom Search 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.

Send feedback about...

Custom Search