Phantombookman is right.
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.