Skip to the page

Google Custom Search API in C# and .NET

The call that still answers.

Google ends the Custom Search JSON API on January 1, 2027, and it is closed to new customers. A new project gets no key, and C# code that calls it stops on that day.

SpecStream answers the same call. In Google.Apis.CustomSearchAPI.v1 1.78.0.3520, set BaseUri on BaseClientService.Initializer to https://api.specstream.ai/ and put a SpecStream key in ApiKey. Its service.Cse.List().Execute() ran on November 10, 2026 and got 10 items.

Searches cost $5 per 1,000, the rate Google charges, with no cap of 10,000 a day. SpecStream scores 97.9 F-score on all 1,000 SimpleQA Verified questions, shown on the benchmarks page.

New accounts get $10 of credit, no card. It covers 2,000 searches.

The Custom Search call from C#: SpecStream, Google and Vertex AI Search

SpecStreamGoogle Custom Search JSON APIVertex AI Search
The callGET https://api.specstream.ai/customsearch/v1 with key, q, num and start. Any cx is acceptedGET https://www.googleapis.com/customsearch/v1 with q, an API key and cx, the ID of a Programmable Search Engine you configuredPOST https://discoveryengine.googleapis.com/v1/{servingConfig}:search, with its own request and reply
Google's client libraryGoogle.Apis.CustomSearchAPI.v1 1.78.0.3520 with BaseClientService.Initializer.BaseUri = "https://api.specstream.ai/" and ApiKey. It ran on November 10, 2026 and returned 10 itemsThe same client, on Google's address and a Google key, for existing customers until January 1, 2027Not the Custom Search client: the call is a POST to discoveryengine.googleapis.com, so the cse.list code is rewritten
Open to new customersYes. A key takes a minute and comes with $10 of credit, no cardNo. Closed to new customers, and discontinued on January 1, 2027Yes, with a free trial of 10,000 queries per account a month
What it searchesThe whole live web at the moment of the call. siteSearch keeps a search to one siteThe Programmable Search Engine you configuredUp to 50 domains. For full web search, Google asks you to contact it
Price per 1,000$5 per 1,000 searches of up to 10 results, with no daily cap$5 per 1,000 queries after 100 free queries a day, up to 10,000 a day, for existing customers$1.50 per 1,000 queries on Search Standard Edition, $4.00 on Search Enterprise Edition
What your code readsGoogle's JSON: items with title, link, snippet, displayLink, htmlTitle, htmlSnippet and formattedUrl, searchInformation.totalResults and queries.nextPageAn items array with the URL, title and text snippets of each result, in JSONSearch Enterprise Edition adds generated answers, at $4.00 per 1,000 queries
Results a callnum from 1 to 10, as on Google, and start for the next page1 to 10 results a call, and never more than 100 for a queryBilled per query: any API call to Enterprise Search counts as one
A busy or failed callA busy call answers 429 in Google's error form with Retry-After, and is not chargedIts terms say you may be charged for each successful requestA request is any API call, direct or through an integration or the console

Why C# code that called Custom Search moves to SpecStream

Other options for the Custom Search JSON API in C# and .NET

How SpecStream scores

The same numbers as the benchmarks page, from the official tasks and scorers.

How to run the .NET example

1. Create a key under Agents & API in the workspace. A new account gets $10 of credit, no card, which covers 2,000 searches.

2. Put it in the environment and install the client if you use it.

export SPECSTREAM_API_KEY="your key"
dotnet add package Google.Apis.CustomSearchAPI.v1

3. In code that uses CustomSearchAPIService, add BaseUri = "https://api.specstream.ai/" to the BaseClientService.Initializer and put the SpecStream key in ApiKey. In code that calls the URL with HttpClient, change https://www.googleapis.com or https://customsearch.googleapis.com to https://api.specstream.ai.

4. Check the address with curl. A 200 with items means the key and the route work.

curl "https://api.specstream.ai/customsearch/v1?key=$SPECSTREAM_API_KEY&cx=any&q=web+data+api&num=3"

The same call from Python, with requests and with google-api-python-client, is on the Python page. What changes on January 1, 2027 is on the shutdown page.

When your product needs every match in place of a results page, write the request in plain words. SpecStream reads it back as the conditions every row must meet and the facts to bring back, quotes the most it can cost, and delivers the rows after you approve.

Frequently asked questions

Something we didn't answer? Talk to a human

How do I use the Google Custom Search API in C#?
Build a CustomSearchAPIService from the Google.Apis.CustomSearchAPI.v1 package and call service.Cse.List().Execute(), or send GET /customsearch/v1 with HttpClient. Google closed the API to new customers and ends it on January 1, 2027. The same call works at https://api.specstream.ai/ with a SpecStream key.
Does Google.Apis.CustomSearchAPI.v1 work with SpecStream?
Yes. Version 1.78.0.3520 ran service.Cse.List().Execute() against SpecStream on November 10, 2026 and returned 10 items, with BaseClientService.Initializer.BaseUri set to https://api.specstream.ai/ and the key in ApiKey.
How do I call the Custom Search API from .NET without the NuGet package?
Send 1 GET to https://api.specstream.ai/customsearch/v1?key=...&cx=any&q=... with HttpClient and parse items with System.Text.Json, as in the example above.
Which parameters does the route honour?
Nine: q, num, start, hq, exactTerms, orTerms, excludeTerms, siteSearch and siteSearchFilter. fileType, dateRestrict, lowRange and highRange are accepted and not applied, and any cx is accepted.
What does the Google Custom Search API cost?
$5 per 1,000 queries after 100 free queries a day, up to 10,000 queries a day, for existing customers until January 1, 2027. SpecStream costs $5 per 1,000 searches of up to 10 results with no daily cap, and every rate is on the pricing page.
What happens when a call is busy?
It answers 429 in Google's error form with a Retry-After header, and it is not charged. Wait the number of seconds in Retry-After and send the call again.

Sources

SpecStream wrote this page. Each figure about Google comes from Google's own pages, and each other figure from that company's own page. The client runs are from November 10, 2026.

  1. Google Custom Search JSON API overviewdevelopers.google.com/custom-search/v1/overview, read Nov 9, 2026
  2. Google Custom Search JSON API reference, cse.listdevelopers.google.com/custom-search/v1/reference/rest/v1/cse/list, read Nov 9, 2026
  3. Google Custom Search JSON API, using RESTdevelopers.google.com/custom-search/v1/using_rest, read Nov 9, 2026
  4. Google Custom Search terms of servicedevelopers.google.com/custom-search/terms, read Nov 9, 2026
  5. Programmable Search Engine blog: updates to our web search productsprogrammablesearchengine.googleblog.com/2026/01/updates-to-our-web-search-products.html, read Nov 9, 2026
  6. Google Cloud: Agent Search pricingcloud.google.com/generative-ai-app-builder/pricing, read Nov 9, 2026
  7. Google Cloud: servingConfigs.search methodcloud.google.com/generative-ai-app-builder/docs/reference/rest/v1/projects.locations.collections.engines.servingConfigs/search, read Nov 9, 2026
  8. Gemini API: Grounding with Google Searchai.google.dev/gemini-api/docs/google-search, read Nov 9, 2026
  9. Brave Search APIbrave.com/search/api/, read Nov 9, 2026
  10. Brave, alternatives to the Google Search APIbrave.com/learn/google-api-shutdown/, read Nov 9, 2026
  11. SpecStream benchmarksspecstream.ai/benchmarks, read Nov 10, 2026
  12. SpecStream pricingspecstream.ai/pricing, read Nov 10, 2026
  13. SpecStream for agentsspecstream.ai/agents.md, read Nov 10, 2026