This page from Google provides a way to make a Custom Search Engine on the fly using links in a webpage: [google.com...]
The same page above from Google also indicates that:
Already have a Custom Search Engine? It can now search over the links on pages you include.
I have pasted the code in a webpage I have full of links. And it worked nicely brining up search results from sites I linked to from my webpage. But how can I tie this up to my AdSense account?
Do I change by hand the id value from "searchbox_demo" to my AdSense id? I have not read that but its just a guess.
Seems there is NO way to integrate AdSense into the "on the fly" custom search engine unless you are using "linked custom search engines" through xml files you'd have to maintain, which is not something I want to do.
Custom Search Engine on the fly cannot be monetised with AdSense.
However, FarmBoy is right, AdSense for search is now powered by Custom Search. You may have already seen yesterday's blogpost [adsense.blogspot.com], which explains the new features this offers to publishers. We hope you and your users find them useful.