customsearch/v1 stop returning results. TinySearch has the same basic shape: one GET request in, a ranked list of titles, URLs and snippets out. To migrate, send query instead of q, move your key into an X-API-Key header, drop cx, and read results[].url where you read items[].link today.
Checked against Google’s documentation and the TinySearch reference on November 29, 2026. Real responses on this page were captured that day and trimmed.
At a glance
Who needs to migrate
Any code that callshttps://www.googleapis.com/customsearch/v1 (or customsearch.googleapis.com) needs a new search provider before January 1, 2027. That includes backend services, internal assistants, AI agents and scheduled jobs that use Google’s client libraries (build("customsearch", "v1") in Python, google.customsearch in Node.js).
Google’s notice on the API page reads: “The Custom Search JSON API is closed to new customers. Vertex AI Search is a favorable alternative for searching up to 50 domains. Alternatively, if your use case necessitates full web search, contact us to express your interest in and get more information about our full web search solution.” Vertex AI Search is being renamed Agent Search, and it uses a different API from customsearch/v1. If you search the whole web from your own servers, from apps or from agents, TinySearch covers that case.
Search boxes on your website are a separate case. Google’s help center says engines already set to “Search the entire web” can keep that setting until January 1, 2027, and that new engines must use “Sites to search”, which covers up to 50 domains. Nonprofit, accredited education and government engines are exempt from the 50-domain limit.
Find every call site before you change anything:
service = 'customsearch.googleapis.com' to see what still calls the API.
For each call site, write down the parameters it sends and the response fields it reads. The tables below map each one.
Migrate in seven steps
1
List every call site
Run the searches above. Note the parameters each call sends and the response fields it reads, such as
items[].link or searchInformation.totalResults.2
Create a TinyFish API key
Create a key at agent.tinyfish.ai/api-keys, one per environment. Keys are shown once, so store each as a secret straight away. See Authentication.
3
Translate the request
Rename and convert parameters with the request table. Remove
cx and key.4
Translate the response
Update field reads with the response table, or wrap TinySearch in the Google-shaped adapter while you move call sites one at a time.
5
Update error handling
Rewrite retries around TinySearch status codes and
error.details. The errors section covers which cases to retry and which to stop on.6
Run both side by side
Send the same real queries to both APIs while your Google access still works, and compare the results. See Test before you switch.
7
Cut over and clean up
Switch behind a feature flag, watch errors and latency, then remove the Google key and engine ID from your configuration before January 1, 2027.
Before and after
The same search, first with Google, then with TinySearch.position, site_name, title, snippet and url. Some also carry a date, and its format varies (an ISO timestamp, or text such as May 10, 2018). Snippets can include line breaks and markdown, so clean them if you display them as plain text.
Request parameters
Everycse.list parameter, and what to send instead.
Move your engine’s site list
If your engine searches a fixed list of sites, open it in the Programmable Search control panel, copy the patterns under Sites to search and Sites to exclude, and send their domains asinclude_domains and exclude_domains. Both take domains, not URL patterns. A domain also matched its subdomains when we tested on November 29, 2026, so *.example.com/* becomes example.com. A path pattern such as example.com/docs/* has no direct equivalent: filter results[].url in your code.
Response fields
Errors and limits
Google wraps errors as{"error": {"code", "message", "errors": [...], "status"}}. TinySearch returns {"error": {"code", "message", "details"}}. Branch on the HTTP status and error.details, not on the message text.
Successful responses and 429s carry
X-RateLimit-Limit and X-RateLimit-Remaining. Per-minute 429s also carry Retry-After, and responses have an X-Request-ID to quote to support. The full list is in Error codes.
The Python SDK retries transient errors for you and raises at once on the daily allowance. Set the retry count instead of adding your own loop:
A Google-shaped adapter
If many call sites read Google’s response shape, wrap TinySearch in a function that returns it. Move call sites over at your own pace, then delete the wrapper. The adapter raises on any Google parameter TinySearch has no equivalent for, so you find those in testing rather than in production. It also raises when a request fails, so a failure never looks like a search with no results.What has no equivalent
Check these against the parameters and fields your code uses before you start.What TinySearch adds
- News search.
domain_type=newsreturns recent articles withpublisheranddateon each result. The date is relative text, such as9 hours ago, and news snippets can be empty. - Research-paper search.
domain_type=research_paperreturnsauthors,venue,year,cited_by_countandpdf_url, and takespub_year_minandpub_year_max. - Calendar date windows.
after_dateandbefore_datetake plainYYYY-MM-DDdates. Google’sdateRestrictonly counts back from today. - Several sites in one request.
include_domainsandexclude_domainstake comma-separated lists. Google’ssiteSearchtakes one site. - Search intent.
purposetakes a sentence on why you are searching, used as extra signal for ranking. Leave it out and search behaves as before. - Page content from the same key. Google returns links and snippets only. TinyFetch takes up to 10 URLs per request, renders JavaScript-heavy pages in a real browser, and returns clean Markdown, HTML or JSON, with one result or one error per URL.
Search, then read the top results
Test before you switch
Different engines rank differently, so test on your own traffic while your Google access still works.- Take 50 to 200 real queries from your logs, including your hardest ones.
- Run each through both APIs with the same filters.
- Compare:
- Relevance: have someone who knows the domain label the top results for 20 to 30 queries. This is the real signal.
- Overlap: how many top-10 URLs both APIs return. Use it to find queries worth reading by hand.
- Latency: time both calls from your own servers, at p50 and p95.
- Downstream outcome: if search feeds a model or an assistant, compare the final answers.
- Agree the pass mark before you look at the numbers.
overlap.py
Cutover checklist
- Every call site to
customsearch/v1is listed, with the parameters it sends and the fields it reads - Nothing depends on image search,
num, query operators orsortwithout a workaround - A TinyFish API key exists for each environment, stored as a secret and sent only in the header
- Requests per minute at peak fit your limit, or you have a Search Pack or custom limit
- Retries follow the errors table, including the daily allowance case
- The side-by-side test met the pass mark you agreed
- The switch sits behind a feature flag, with a rollback plan
- Usage is monitored with the dashboard or the runs API
- The Google key and engine ID are removed before January 1, 2027
Migrate with a coding agent
Paste this prompt into Claude Code, Cursor, Codex or another coding agent at the root of your repository:Prompt
https://docs.tinyfish.ai/mcp. To give it TinySearch as a tool while it works, connect the TinyFish MCP server. In Claude Code:
FAQ
When does Google turn off the Custom Search JSON API?
On January 1, 2027. Google’s API page says the API is closed to new customers and that its pricing applies to existing customers “until the service discontinuation on January 1, 2027.”What happens to API calls after January 1, 2027?
Google says existing customers have until January 1, 2027 to move, and that its pricing applies “until the service discontinuation on January 1, 2027.” It has not said what the API will return after that, so plan for every call to fail and finish your switch before December 31.What does “This project does not have the access to Custom Search JSON API” mean?
Developers report this 403 from projects that Google no longer lets use the API, such as newly created ones. The API is closed to new customers, so the fix is to move that call to another search API.Will TinySearch return the same results as Google?
No. Each engine ranks differently, and Google’s own help center says Programmable Search results are already “unlikely to match those returned by Google Web Search.” Judge TinySearch on whether the results answer your users’ questions, using the side-by-side test.Do I need a search engine ID like cx with TinySearch?
No. TinySearch searches the web with no engine to set up. To limit results to particular sites, send them as include_domains, a comma-separated list.
How many results can I get per query?
Up to 10 per page, andpage runs from 0 to 10, so up to 110 results for one query. Google’s API stops at 100.
Does TinySearch support image search?
No. If your code calls Google withsearchType=image, keep a separate image source for that part.
Is TinySearch free to use?
Yes. The free tier gives you 30 requests a minute and 500 an hour, up to 12,000 a day, reset at 00:00 UTC. Beyond that, requests need a positive wallet balance.How do I get a higher rate limit?
Search Packs raise your limit to as much as 1,200 requests a minute, with no contract. For a Search Pack or custom limits, talk to us. A per-minute 429 also includesdetails.upgrade_url, where you can request a higher limit.
Can I search in Japanese or for a specific country?
Yes. Setlanguage (for example ja) and location (for example JP). If you set only one, TinySearch fills in the usual pairing: language=ja resolves to location=JP.
How do I get the full content of a result?
Pass its URL to TinyFetch, up to 10 URLs per request. It returns the page as Markdown, HTML or JSON.How do I monitor usage after the switch?
Use the dashboard, or the runs API (GET https://api.search.tinyfish.ai/usage), which filters by time window and by status.
Related
TinySearch API reference
Every parameter and response field
How-to guides
Country and language, site filters, date windows and research papers
Error codes
Every error code, retry rules and rate-limit headers
Book a switch call
Search Packs, custom limits and help with your move