A sensor comprising a semiconductor film having a plurality of mesopores and containing an oxide, and electrodes electrically connected to the semiconductor film, wherein at least part of surfaces in the mesopores is coated with an organic material.