stdicon
This site simply hosts icons for lots of filetypes that you can use and link to. You can use a file extention like
/html, a filename like
/movie.avi, a mimetype like
/application/pdf and/or choose from a specific set like
/neu/html or even combine them like
/neu/image/png. You can also use the
?size=16 to get a consistent size of icons, and the
?default=... to force a default instead of an HTTP 404.
Conversions
File extension to mimetype lookup like /extension/html or /extension/codemonkey.mp3 or in JSONP /extension/txt?callback=cb
Mimetype to file extension like /mimetype/application/postscript or /mimetype/application/zip
Or the whole dump in json or xml (from python mimetypes and apache)