What should I use instead of Google’s Custom Search JSON API for site search?
With Google sunsetting their Custom Search JSON API a lot of people have been wondering, “where do I go?”. Relevan’s stepping in to fill the gap! All you need to do is put in your site map and we’ll scrape your site to give you a search index tuned to your data. On top of on-site search, Relevan can collect feedback and usage from your search to continually improve the results.
Say a shopper searches for “return policy.” Your returns portal, shipping FAQ, and policy page might all match. Which one should come first? If shoppers routinely skip the FAQ and open the policy, that tells us something about what “return policy” means on your store. You can send Relevan those clicks and any conversions you track. We use that feedback to tune rankings for your index offline.
Google has closed the API to new customers and gives existing customers until January 1, 2027 to switch. If your search box helps people find a guide in your docs or a return policy in your store, you can run the two APIs side by side while you migrate. Google’s retirement notice
How do I migrate my site search to Relevan?
Start with a few queries people already run on your site. Keep those handy so you can check the results before you switch traffic.
1. Index the site you want to search
In the Relevan console, open Indexes and choose From a Website from the create menu. Paste your sitemap URL and click Create index.
We’ll give you a TXT record to add at your DNS provider. Once you’ve added it, click Verify. The first sync starts as soon as we confirm you control the domain. You can watch the page count climb and try a search right there in the console.
2. Switch the search request
Suppose a shopper types “return policy.” In your Google request, that text goes in the q parameter. With Relevan, send it as query in the body of a POST to your index. Use size for the number of results you want.
curl -X POST "https://api.relevan.dev/v1/{orgId}/indexes/{indexName}/search" \
-H "x-api-key: $RELEVAN_API_KEY" \
-H "content-type: application/json" \
-d '{"query": "return policy", "size": 10}'Each result includes the page title, URL, and description, along with an explanation of why it matched. If your store and help center share a domain, you can narrow that search to the help section. You can also filter by language or last-modified date.
3. Check the results before sending traffic
Run those saved queries against both services. Check where the policy page lands for “return policy,” then try “start a return” and look for the returns portal. The words overlap, but the shopper is trying to do something different. Once you’ve checked the results and updated your app to read Relevan’s response, switch your search traffic over.
If your integration uses start, siteSearch, exactTerms, or excludeTerms, the Google Custom Search migration guide covers those parameters, compares costs, and includes a prompt you can give your coding agent.
What happens when you publish an update?
About once a day, Relevan checks your sitemap and fetches new or changed pages. Take a page out of the sitemap and we’ll remove it from the index. If you’ve just changed your return window and want the new policy to show up in search right away, click Sync now. You’ll find it alongside your sync history under Website source on the index Overview.
Each page becomes one document. Relevan indexes the body text along with the title, URL, description, section, language, and last-modified date. If the HTML contains little text because the page loads its content with JavaScript, we render it in a browser and index the text from there.
We check your DNS record before every sync. RelevanBot follows your site’s robots.txt and respects Crawl-delay. Our crawler docs show you how to identify it in your logs.
How much does site search cost?
Website search is available on every plan. The Free plan includes 10,000 searches and 2,000 fetched pages per month. Unchanged pages don’t count toward that fetch allowance. You can find the limits for each plan on our pricing page.
Index your website for free and try a query your visitors run every day. If there’s a search your current setup keeps getting wrong, bring it to a call with us.