Custom Search

Custom Search JSON/Atom API

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.

Data format

JSON/Atom Custom Search API can return results in one of two formats. JSON is the default data format; you can get results in Atom format by specifying the alt=atom query parameter.

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.

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/Atom Custom Search API requires the use of an API key.

Pricing

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 Cloud Console. Additional requests cost $5 per 1000 queries, up to 10k queries per day.
  • Google Site Search (paid).

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.