Google has a custom search API that comes in two flavors — ad-supported or $5/thousand queries (beyond 100 free queries a day). You can either use their Search Element API (HTML, comes with standard Google Search UI, customizable) or build your own UI with the JSON API.
Obviously you’re talking about a consumer offering, but I just want to point out that paid, ad-free Google Search does exist and is pretty easy to set up.