Welcome to WebmasterWorld Guest from 126.96.36.199
I don't think that is the case. As sometimes when I'm playing with ad placement on a local development machine. IE local websever, definately blocked by my firewall to the outside world, Google still serves relavent ads.
So I'm thinking when a page loads, the JS in the ad code sends google a text version of the page, the algos decide what ads to return, and it's sent back. There can be no other reason.
Is this correct? If so, thats a heck of a fast process.
I sometimes see ads served on pages located on my local PC, although I can't say they are relevant. If you're seeing targeted ads then maybe the directory structure or the page name is giving AdSense a clue.
If your web pages are URL only or not indexed at all Adsense seems to show ads targeted at a theme for
the entire website.
When a given page is truly indexed by Google (not just the Media Bot) then you get very well targeted ads, with targeting above and beyond the theme that Adsense has chosen for your site.
To notice this effect your site must truly have multiple topics. If you only have one topic, or theme, then you won't be able to notice this indexed versus non-indexed effect.
I've had pages become URL only many times (haven't we all). Shortly after this the ads on these pages become less targeted and fall back to the site "theme". When Google gets it's act together and reindexes the page, the ads become more accurately targeted. There is always some targeting to a "default site theme".
Adsense clearly uses the Google index status as a factor in selecting ads for a given page, in my opinion. (Why wouldn't they?)
There is a Google search API and I'm sure there's extensions to the API specifically for the Adsense and Adwords groups.