Mediabot is the name given to the web crawler that Google uses to crawl the webpage for the purpose of analyzing the content so that Google AdSense can display contextually relevant ads to the page. Mediabot identifies itself with the user agent string "Mediapartners-Google/2.1".
Unlike other crawlers, Mediabot does not follow links to find new URLs that can be crawled, instead just visiting URLs that have included AdSense code. If the content is behind the login, the crawler can be given login so it can crawl the protected content.
Mediabot will usually visit the first page in seconds since the AdSense code is called from that page for the first time. After that he regularly revisits the page, but is unpredictable. Changes made on the page do not immediately cause changes to the ads displayed on the page.
Ads can still be displayed on the page even if Mediabot has not visited it yet. In this example, the selected ads will be based on a combination of overall domain themes and keywords that appear in the url string. If no ads can be matched to the page, either public service ads, blank spaces or solid colors are displayed, depending on the settings for that ad unit.
Video Mediabot
References
Source of the article : Wikipedia