What I Wish Someone Had Told Me Before I Got Stuck With a $400 Search Bill

I ran a site that aggregated product data. Simple enough. I needed to pull results from Google for about 50 queries a day on average, sometimes spiking to 200 when I launched a new category. I signed up for the Google Custom Search JSON API, looked at the pricing page, saw "100 free searches per day," and thought I was set. I wasn't set. About three weeks in, I got a notification that my free quota was exhausted and every request beyond that was costing me $5 per thousand queries. That 50-queries-a-day spike had quietly pushed me over the limit because the free tier is exactly 100 per day, not per 24 hours reset at midnight your time — it's a rolling window tied to your API key, and the billing dashboard doesn't make this obvious until you're already looking at a charge. Here's how the pricing actually works, the way I wish it was presented on Google's own page. The Custom Search JSON API operates under Google's Cloud Pricing structure with a two-tier model: a generous free allowance and a pay-as-you-go rate that kicks in the moment you exceed it. The free tier gives you 100 queries per day. That's it. No monthly rollover. If you don't use all 100 on Tuesday, you don't get 200 on Wednesday. Each day resets to exactly 100. The queries are counted per search request, not per result returned. A single request with start=1 and num=10 counts as one query, same as a request with start=1 and num=100 would. Google doesn't charge you based on how much data you pull back — they charge based on how many times you ask.

Once you go past 100 queries in a day, the rate is $5.00 USD per 1,000 queries. This is charged on a per-second basis through the Google Cloud Billing system. You don't pay monthly subscriptions. You pay for what you use, billed daily, and the charges appear on your Cloud Billing statement the following month. Let me walk through some real numbers. If you run a small internal tool with maybe 150 queries a day, that's 50 queries over your free tier times $0.005 per query, which comes to about $0.25 a day or roughly $7.50 a month. Manageable. If you're running a public-facing search feature and your users collectively hit 10,000 queries a day, you're paying $47.50 a day. That's $1,425 a month. Those are not rounding errors. I have the billing statements. There are a few things the pricing page doesn't tell you directly. First, the 100 free queries per day is per API key, not per project. If you create a second API key, it gets its own separate 100 queries. Some people exploit this. I didn't recommend it because Google can and does detect this pattern. Second, there is no "premium" tier with better rates at lower volumes. The $5 per 1,000 is flat. However, if you scale up significantly — I'm talking tens of millions of queries — you should open a conversation with a Google Cloud sales representative. They can negotiate enterprise pricing, and I've heard anecdotes of it dropping to around $1.50-$2 per thousand at very high volumes. You won't find this on the public pricing page. It only exists if you talk to a human.

Now let me tell you about the edge case that almost broke my project. I was using programmatic search for price monitoring across dozens of retailers. My scripts were making background queries every hour. I assumed that since my peak user-facing traffic was well under 100 queries per day, I'd stay free. What I hadn't accounted for is that Google's Custom Search API also enforces a queries-per-second limit on free accounts. It's 2 queries per second. My cron job was hammering the API at 3 per second during peak runs, and Google started returning HTTP 429 errors — "rate limit exceeded." These 429s count against your quota anyway, even though no results come back. So I was burning free queries on failed requests, and my actual useful searches were getting throttled into the paid tier by accident. The workaround was straightforward but took me two days to figure out. I implemented exponential backoff with jitter on the retry logic, and more importantly, I batched my background queries into a single burst per hour using a simple queue system with a 0.5-second delay between each request. I also switched to a single API key and consolidated all my queries under it so I could actually monitor usage from the Google Cloud Console rather than guessing. The Cloud Console does give you a per-key usage breakdown if you enable API metrics, but you have to explicitly turn it on — it's not active by default when you create a new key. Here's another thing nobody mentions: the search engine you create through the Custom Search Element must be configured to include or exclude specific sites, and this configuration is baked into the search engine ID, not the API key. If you create a search engine that searches the entire web, you're competing with millions of other developers for the same free quota, and Google has been known to silently throttle these general-purpose search engines more aggressively than site-specific ones. When I switched my search engine to target only a curated list of about 40 e-commerce domains instead of the full web, my 429 errors dropped significantly and the results became more relevant. Same API key, same pricing, completely different behavior.

Get the Full Details

Google Custom Search JSON API Pricing: Costs, Limits & 2026 Guide
Google Custom Search JSON API Pricing: Costs, Limits & 2026 Guide

There's also a subtle distinction between the Custom Search JSON API and the Programmable Search Engine widget. The widget — the embeddable search box you put on your own site — doesn't use API queries at all. It's served through Google's front end and doesn't count against your quota. If your goal is just to put a search box on a website, the widget might be all you need and it costs nothing. But if you need to capture the search results in your own application, process them, store them, or display them outside of Google's styling, you need the JSON API and you'll hit the pricing wall. I want to be straight about where this API falls apart. The Custom Search API does not give you raw SERP data the way some third-party tools do. Google's ToS explicitly prohibit scraping, and the Custom Search API is their sanctioned alternative, but it's deliberately limited. You get structured JSON responses with title, link, and snippet, but you don't get positional data, ads structure, or the kind of granular result metadata that SERP aggregation services provide. If your use case depends on knowing whether a result is position 1 organic versus position 2, or whether there's a shopping ad above the fold, this API isn't going to serve you well. It's designed for retrieval, not for competitive intelligence. Another real limitation: caching. Google's API doesn't cache repeated identical queries. Every request is a live query. Some people assume that if they query the exact same term twice within minutes, the second call is free or discounted. It isn't. Two requests, two counts against your daily quota. This matters more than you'd think if you're building a system that accidentally doubles up on requests due to race conditions or retry loops. I once had a flaky WebSocket connection that reconnected and re-fired five pending queries simultaneously, burning 250 free queries in six seconds before I noticed.

For anyone trying to keep costs down, here's what actually works. First, cache your results client-side or in a database with a TTL. Even a 1-hour cache on your own end can reduce API calls by 60-80% on repeat traffic. Second, use the start parameter for pagination instead of making multiple separate queries when you don't need to. If a user is browsing page 2 of results, they already got page 1 — that's one query, not two. Third, set up billing alerts at 50%, 80%, and 100% of your expected monthly spend in the Cloud Console. Without these, you won't know you've crossed into paid territory until the invoice arrives. If your use case is heavy — more than 5,000 queries per day consistently — you should seriously evaluate alternatives before committing. Serper.dev and the Serply API offer competitive pricing with more generous free tiers and better-structured data. Serper.dev gives you 2,500 free searches per month, which sounds less than Google's daily free tier at first glance, but the pricing at scale is significantly cheaper and the response format includes positional data and knowledge panel information that Google's API strips out. For my particular use case, I ended up migrating about 40% of my queries to Serper after I did the math on what Google was going to cost me at my projected volume. The migration took about a day of rewriting the request handlers because the JSON response structures are different. The bottom line is that the Google Custom Search API is free if your needs are small and predictable. It's moderately expensive if your needs are medium-sized and you haven't built caching into your system. It's very expensive if you're building a popular public search feature and you didn't read the terms carefully before launch. I learned this the hard way because the pricing page doesn't lead with the warnings — it leads with the free tier, which is generous but narrow. Set your expectations accordingly.