Google Custom Search
Programmable search engine for searching the web or specific sites
Google Custom Search (Programmable Search Engine) provides API access to Google search results. You create a search engine in Google's console, get a CX ID, and query it programmatically. It supports whole-web search or site-restricted search, image search, and filtering by date, language, and region. Results mirror Google's quality.
For OpenClaw agents, Google Custom Search gives you Google-quality results via API. The main trade-off is cost: only 100 free queries/day, then $5 per 1,000 queries (up to 10K/day). For most agent use cases, Brave Search provides a better value. Google Custom Search shines when you need Google-specific results or site-restricted searches across defined domains.
Tags: search, data
Category: Search
Use Cases
- Search Google programmatically when you need Google-quality results
- Build site-restricted search across specific domains (e.g., search only StackOverflow + GitHub)
- Find Google-indexed content for SEO analysis and competitive research
Tips
- Enable 'Search the entire web' in your CSE settings for general web search
- Use the dateRestrict parameter (e.g., d7 for last 7 days) to filter by recency
- For cost-efficiency, use Brave Search as primary and Google CSE only for targeted site-restricted searches
Known Issues & Gotchas
- Requires TWO pieces of setup: Google Cloud API key + Custom Search Engine CX ID
- Only 100 free queries/day — goes to $5/1K after that, max 10K/day
- By default, Custom Search Engines only search specified sites — enable 'Search the entire web' in settings
Frequently Asked Questions
Is this the same as regular Google search?
Very similar but not identical. Google Custom Search uses the same index but may return slightly different results than google.com. For most queries, the results are functionally equivalent.
Do I need both an API key and a CX ID?
Yes. You need a Google Cloud API key AND a Custom Search Engine ID (CX). Create the search engine at programmablesearchengine.google.com, then enable the API in Google Cloud Console.
Why use this over Brave Search?
Use Google Custom Search when you need Google-specific results, site-restricted search across defined domains, or when Google's index matters for your use case. Brave Search is better for most general agent web search.