Is there an API that can be used to generate thumbnails of a webpage in C#? I don't want to use third-party websites as I'd rather render them myself.
There is a good article about using IE here: link
There is more information on this link to a previous SO
Here's an example of how to do it using GTK and Geko(Firefox) engine: http://tirania.org/blog/archive/2004/Jun-14.html
You should be able to do the same using Internet Explorer and WindowsForms if you prefer that.
LE: You do need to use an existing rendering engine like(Firefox's Geko, or Webkit, or Internet Explorer) instead of a html parser as this will allow you to capture the page as it is, with CSS, Flash, Java, etc
There's a program on CodeProject that might fit the bill...it's a "console" app (really a hidden WinForms app) using the WebBrowser control.
I played around with it a while back and it works pretty well
I use WebShot's C# interface and the System.Graphics API to generate thumbnails.
For a quick-and-dirty approach, you can instantiate an IE browser control and call the DrawToBitmap method. HOWEVER, this method is not strictly intended for public consumption. But it's accessible, and it does work. I wouldn't use it in production though.