Google Custom Search Engine pricing
Asked Answered
B

1

12

The pricing regarding CSE is a little bit vague:

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

  1. Does one query equal one keyword regardless of pagination used, or one request? (in this sense XML is more efficient than JSON, as it allows 20 in num parameter, as opposed to JSONs 10)
  2. Are the queries counted per API key, or per cx key?
Burglary answered 8/5, 2017 at 17:7 Comment(0)
P
11

It is vague and you are not the first to be puzzled. When I did my research I found this blog post helpful.

Assume you are talking about Custom Search Engine (terms you noted in your Q) and NOT Google Site Search (paid from the start). The reason I ask is that the XML function is only for Google Site Search customers. There is the JSON/Atom API and Custom Search API available for CSE.

For Q1, one Query = one request. You can use as many keywords or other parameters in your request (see comments in the blog post I referenced), but you will always be limited to 100 results.

For Q2, the billing is enabled through the API console. Once enabled (and in order to allow the 101st query) your code must include both your cx and API key. So in theory you could set up multiple search engines within your API and stay under the 100 request limit, but I have not seen a way to allow an API to support multiple cx keys.

Papain answered 2/7, 2017 at 17:42 Comment(2)
This is indeed very weird, as developers.google.com/custom-search/docs/overview states that there's XML resultset for CSE, but that redirects to error page. So in that affect, in Q1 it's better to get all the results and perform pagination on your own. For Q2 those were my thoughts as well regarding going under the limit.Burglary
Is this pricing same worldwide, no matter what region are you in?Spot

© 2022 - 2024 — McMap. All rights reserved.