The JSON/Atom 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 or Atom format.
There are also two external documents that are helpful resources for using this API:
- Google WebSearch Protocol (XML): The JSON/Atom Custom Search API provides a subset of the functionality provided by the XML API, but it instead returns data in JSON or Atom 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.
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.
JSON/Atom Custom Search API requires the use of an API key.
- Custom Search Engine (free edition) users can obtain the key from the Google API Console.
- Google Site Search (paid edition) users can find their API key in the Control Panel in Business > XML & JSON tab.
JSON/Atom Custom Search API pricing and quotas depend on the engine's edition:
- Custom Search Engine (free)
- For CSE users, the 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.
- Google Site Search (paid).
- For detailed information on GSS usage limits and quotas, please check GSS pricing options.