Through the use of two kinds of imidazole derivatives containing different O-functional units, three new Keggin- and one Wells-Dawson-polyoxometalate (POM)-based compounds, namely [Cu2La4(HPW12O40)] (1), [CuLa4(H2O)2(HPMo12O40)] (2), [Cu2La7(H2O)(H2P2W18O62)]·La(3), [Ag2(Lb4)(HPMo12O40)]·Lb·H2O (4)(La= (4-(2,5-dihydro-1H-imidazol-1-yl)benzaldehyde), and Lb=(4-(2,5-dihydro-1H-imidazol-1-yl)benzoic acid), were synthesized and characterized using single-crystal X-ray diffraction, elemental analyses, and infrared spectroscopy. The polyoxoanions occupy holes framed by two symmetrically oriented CuLa2 units in 1. In compound 2, the square-planar CuLa4 units form a two-dimensional (2D), supramolecular grid through π···π stacking interactions. The POMs occupy vacancies in this grid. In compound 3, the CuLa3 subunits connect the neighboring P2W18 units and an “S”-type chain is formed. Through hydrogen bonding interactions, the chains are connected to form a layer. In compound 4, the POM anions are linked by AgLb2 subunits to form a chain. All the chains are tied together to construct a layer structure with weak hydrogen bonding interactions between the terminal carboxylic acid functional groups of ligands Lb. The electrocatalytic and photocatalytic activities of all these four compounds were also studied.