Nonvisual opsins are transmembrane proteins expressed in the eyes and other tissues of many animals. When paired with a light-sensitive chromophore, nonvisual opsins form photopigments involved in various nonvisual, light-detection functions including circadian rhythm regulation, light-seeking behaviors, and seasonal responses. Here, we investigate the molecular evolution of nonvisual opsin genes in anuran amphibians (frogs and toads). We test several evolutionary hypotheses including the predicted loss of nonvisual opsins due to nocturnal ancestry and potential functional differences in nonvisual opsins resulting from environmental light variation across diverse anuran ecologies. Using whole-eye transcriptomes of 81 species, combined with genomes, multitissue transcriptomes, and independently annotated genes from an additional 21 species, we identify which nonvisual opsins are present in anuran genomes and those that are also expressed in the eyes, compare selective constraint among genes, and test for potential adaptive evolution by comparing selection between discrete ecological classes. At the genomic level, we recovered all 18 ancestral vertebrate nonvisual opsins, indicating that anurans demonstrate the lowest documented amount of opsin gene loss among ancestrally nocturnal tetrapods. We consistently found expression of 14 nonvisual opsins in anuran eyes and detected positive selection in a subset of these genes. We also found shifts in selective constraint acting on nonvisual opsins in frogs with differing activity periods, habitats, distributions, life histories, and pupil shapes, which may reflect functional adaptation. Although many nonvisual opsins remain poorly understood, these findings provide insight into the diversity and evolution of these genes across anurans, filling an important gap in our understanding of vertebrate opsins and setting the stage for future research on their functional evolution across taxa.