The general term for a spirit or deity in Shinto is kami.
Kami is a broad Japanese religious concept encompassing deities, spirits, forces of nature, sacred places, animals, and sometimes revered ancestors or historical figures. Mountains, waterfalls, trees, rocks, storms, and the sun may all be associated with kami when they inspire awe or are regarded as spiritually significant.
The word does not map perfectly onto the English terms “god” or “spirit.” Kami are not necessarily all-powerful, all-knowing, or morally perfect, and Shinto has no single universally fixed list of them. Japanese traditionally speaks of “eight million kami,” an expression meaning an innumerable multitude rather than a literal census.
Kodama are tree spirits, oni are supernatural ogres or demons, and yōkai is a wider category of uncanny beings and phenomena. They may overlap with popular ideas about spirits, but none is the standard general term asked for here. Early written accounts of kami and Shinto mythology appear in the Kojiki of 712 CE and the Nihon Shoki of 720 CE.